patch attached this is what is left:
// pref dialog QPrefColorsUi.ui: <header>q3listbox.h</header> qcoloritem.h:#include <Q3ListBox> QPrefConvertersUi.ui: <header>q3listbox.h</header> QPrefCopiersUi.ui: <header>q3listbox.h</header> QPrefFileformatsUi.ui: <header>q3listbox.h</header> QPrefsDialog.C: Q3ListBoxItem * const item = // more tricky? QLyXKeySym.C:#include <Q3CString> QWorkArea.C:#include <Q3UriDrag> FileDialog.C: Q3FileDialog FileDialog_private.C: Q3FileDialog FileDialog_private.h: Q3FileDialog iconpalette.C:#include <Q3GridLayout> QBrowseBox.C: : Q3GridView QBrowseBox.h:#include <Q3GridView> // abdel working on this? QCitationFindUi.ui: <header>q3listbox.h</header> QCitationDialog.C: Q3ListBox QCitationDialog.h: Q3ListBox
Index: src/frontends/qt4/QBranches.C =================================================================== --- src/frontends/qt4/QBranches.C (revision 13794) +++ src/frontends/qt4/QBranches.C (working copy) @@ -1,5 +1,5 @@ /** - * \file QDocumentDialog.C + * \file QBranches.C * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * @@ -22,8 +22,10 @@ #include "support/lstrings.h" -#include <Q3ListView> +#include <QTreeWidget> +#include <QTreeWidgetItem> #include <QPixmap> +#include <QIcon> #include <QColor> #include <QColorDialog> @@ -37,7 +39,10 @@ : QWidget(parent, f) { setupUi(this); - branchesLV->setSorting(0); + branchesTW->setColumnCount(3); + branchesTW->headerItem()->setText(0, qt_("Name")); + branchesTW->headerItem()->setText(1, qt_("Activated")); + branchesTW->headerItem()->setText(2, qt_("Color")); } QBranches::~QBranches() @@ -54,30 +59,35 @@ { // store the selected branch - Q3ListViewItem * selItem = - branchesLV->selectedItem(); + QTreeWidgetItem * item = + branchesTW->currentItem(); QString sel_branch; - if (selItem != 0) - sel_branch = selItem->text(0); + if (item != 0) + sel_branch = item->text(0); - branchesLV->clear(); + branchesTW->clear(); BranchList::const_iterator it = branchlist_.begin(); BranchList::const_iterator const end = branchlist_.end(); for (; it != end; ++it) { + QTreeWidgetItem * newItem = + new QTreeWidgetItem(branchesTW); + QString const bname = toqstr(it->getBranch()); + newItem->setText(0, bname); + QString const sel = it->getSelected() ? qt_("Yes") : qt_("No"); - Q3ListViewItem * newItem = - new Q3ListViewItem(branchesLV, bname, sel); + newItem->setText(1, sel); + QColor const itemcolor = rgb2qcolor(it->getColor()); if (itemcolor.isValid()) { QPixmap coloritem(30, 10); coloritem.fill(itemcolor); - newItem->setPixmap(2, coloritem); + newItem->setIcon(2, QIcon(coloritem)); } // restore selected branch if (bname == sel_branch) - branchesLV->setSelected(newItem, true); + branchesTW->setItemSelected(newItem, true); } emit changed(); } @@ -100,8 +110,8 @@ void QBranches::on_removePB_pressed() { - Q3ListViewItem * selItem = - branchesLV->selectedItem(); + QTreeWidgetItem * selItem = + branchesTW->currentItem(); QString sel_branch; if (selItem != 0) sel_branch = selItem->text(0); @@ -115,26 +125,24 @@ void QBranches::on_activatePB_pressed() { - Q3ListViewItem * selItem = - branchesLV->selectedItem(); - toggleBranch(selItem); + toggleBranch(branchesTW->currentItem()); } -void QBranches::on_branchesLV_doubleClicked(Q3ListViewItem * selItem) +void QBranches::on_branchesTW_itemDoubleClicked(QTreeWidgetItem * item, int col) { - toggleBranch(selItem); + toggleBranch(item); } -void QBranches::toggleBranch(Q3ListViewItem * selItem) +void QBranches::toggleBranch(QTreeWidgetItem * item) { - if (selItem == 0) + if (item == 0) return; - QString sel_branch = selItem->text(0); + QString sel_branch = item->text(0); if (!sel_branch.isEmpty()) { - bool const selected = selItem->text(1) == qt_("Yes"); + bool const selected = item->text(1) == qt_("Yes"); Branch * branch = branchlist_.find(fromqstr(sel_branch)); if (branch && branch->setSelected(!selected)) { newBranchLE->clear(); @@ -146,8 +154,8 @@ void QBranches::on_colorPB_clicked() { - Q3ListViewItem * selItem = - branchesLV->selectedItem(); + QTreeWidgetItem * selItem = + branchesTW->currentItem(); QString sel_branch; if (selItem != 0) sel_branch = selItem->text(0); Index: src/frontends/qt4/QIndexDialog.C =================================================================== --- src/frontends/qt4/QIndexDialog.C (revision 13794) +++ src/frontends/qt4/QIndexDialog.C (working copy) @@ -15,10 +15,9 @@ #include "QIndex.h" #include "QIndexDialog.h" -#include <qpushbutton.h> -#include <qlineedit.h> -#include <q3whatsthis.h> -//Added by qt3to4: +#include <QPushButton> +#include <QLineEdit> +#include <QWhatsThis> #include <QCloseEvent> namespace lyx { @@ -33,23 +32,24 @@ form, SLOT(slotOK())); connect(closePB, SIGNAL(clicked()), form, SLOT(slotClose())); + connect( keywordED, SIGNAL( textChanged(const QString&) ), + this, SLOT( change_adaptor() ) ); - connect( keywordED, SIGNAL( textChanged(const QString&) ), this, SLOT( change_adaptor() ) ); - - Q3WhatsThis::add(keywordED, qt_( -"The format of the entry in the index.\n" -"\n" -"An entry can be specified as a sub-entry of\n" -"another with \"!\":\n" -"\n" -"cars!mileage\n" -"\n" -"You can cross-refer to another entry like so:\n" -"\n" -"cars!mileage|see{economy}\n" -"\n" -"For further details refer to the local LaTeX\n" -"documentation.\n")); + keywordED->setWhatsThis( qt_( + "The format of the entry in the index.\n" + "\n" + "An entry can be specified as a sub-entry of\n" + "another with \"!\":\n" + "\n" + "cars!mileage\n" + "\n" + "You can cross-refer to another entry like so:\n" + "\n" + "cars!mileage|see{economy}\n" + "\n" + "For further details refer to the local LaTeX\n" + "documentation.\n") + ); } Index: src/frontends/qt4/QChangesDialog.C =================================================================== --- src/frontends/qt4/QChangesDialog.C (revision 13794) +++ src/frontends/qt4/QChangesDialog.C (working copy) @@ -25,10 +25,12 @@ setupUi(this); connect(closePB, SIGNAL(clicked()), form, SLOT(slotClose())); - - connect( nextPB, SIGNAL( clicked() ), this, SLOT( nextPressed() ) ); - connect( rejectPB, SIGNAL( clicked() ), this, SLOT( rejectPressed() ) ); - connect( acceptPB, SIGNAL( clicked() ), this, SLOT( acceptPressed() ) ); + connect(nextPB, SIGNAL( clicked() ), + this, SLOT( nextPressed() ) ); + connect(rejectPB, SIGNAL( clicked() ), + this, SLOT( rejectPressed() ) ); + connect(acceptPB, SIGNAL( clicked() ), + this, SLOT( acceptPressed() ) ); } Index: src/frontends/qt4/QBranches.h =================================================================== --- src/frontends/qt4/QBranches.h (revision 13794) +++ src/frontends/qt4/QBranches.h (working copy) @@ -1,6 +1,6 @@ // -*- C++ -*- /** - * \file QDocumentDialog.h + * \file QBranches.h * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * @@ -22,7 +22,7 @@ #include <string> -class Q3ListViewItem; +class QTreeWidgetItem; class BufferParams; @@ -44,14 +44,14 @@ void changed(); protected: - void toggleBranch(Q3ListViewItem * selItem); + void toggleBranch(QTreeWidgetItem *); void update(); protected slots: void on_addBranchPB_pressed(); void on_removePB_pressed(); void on_activatePB_pressed(); - void on_branchesLV_doubleClicked(Q3ListViewItem *); + void on_branchesTW_itemDoubleClicked(QTreeWidgetItem *, int); void on_colorPB_clicked(); private: Index: src/frontends/qt4/QParagraphDialog.C =================================================================== --- src/frontends/qt4/QParagraphDialog.C (revision 13794) +++ src/frontends/qt4/QParagraphDialog.C (working copy) @@ -14,14 +14,13 @@ #include "QParagraphDialog.h" #include "QParagraph.h" -#include <qlineedit.h> -#include <qpushbutton.h> -#include <qvalidator.h> -#include <q3whatsthis.h> +#include <QLineEdit> +#include <QPushButton> +#include <QValidator> +#include <QWhatsThis> +#include <QCloseEvent> #include "qt_helpers.h" -//Added by qt3to4: -#include <QCloseEvent> namespace lyx { namespace frontend { @@ -37,27 +36,32 @@ form_, SLOT(slotApply())); connect(closePB, SIGNAL(clicked()), form_, SLOT(slotClose())); + connect(align, SIGNAL( activated(int) ), + this, SLOT( change_adaptor() ) ); + connect(linespacing, SIGNAL( activated(int) ), + this, SLOT( change_adaptor() ) ); + connect(linespacing, SIGNAL( activated(int) ), + this, SLOT( enableLinespacingValue(int) ) ); + connect(linespacingValue, SIGNAL( textChanged(const QString&) ), + this, SLOT( change_adaptor() ) ); + connect(indentCB, SIGNAL( toggled(bool) ), + this, SLOT( change_adaptor() ) ); + connect(labelWidth, SIGNAL( textChanged(const QString&) ), + this, SLOT( change_adaptor() ) ); - - connect( align, SIGNAL( activated(int) ), this, SLOT( change_adaptor() ) ); - connect( linespacing, SIGNAL( activated(int) ), this, SLOT( change_adaptor() ) ); - connect( linespacing, SIGNAL( activated(int) ), this, SLOT( enableLinespacingValue(int) ) ); - connect( linespacingValue, SIGNAL( textChanged(const QString&) ), this, SLOT( change_adaptor() ) ); - connect( indentCB, SIGNAL( toggled(bool) ), this, SLOT( change_adaptor() ) ); - connect( labelWidth, SIGNAL( textChanged(const QString&) ), this, SLOT( change_adaptor() ) ); - linespacingValue->setValidator(new QDoubleValidator(linespacingValue)); - Q3WhatsThis::add(labelWidth, qt_( -"As described in the User Guide, the length of" -" this text will determine how wide the label part" -" of each item is in environments like List and" -" Description.\n" -"\n" -" Normally you won't need to set this," -" since the largest label width of all the" -" items is used. But if you need to, you can" -" change it here." + //Q3WhatsThis::add(labelWidth, qt_( + labelWidth->setWhatsThis( qt_( + "As described in the User Guide, the length of" + " this text will determine how wide the label part" + " of each item is in environments like List and" + " Description.\n" + "\n" + " Normally you won't need to set this," + " since the largest label width of all the" + " items is used. But if you need to, you can" + " change it here." )); } Index: src/frontends/qt4/QAboutDialog.C =================================================================== --- src/frontends/qt4/QAboutDialog.C (revision 13794) +++ src/frontends/qt4/QAboutDialog.C (working copy) @@ -20,7 +20,8 @@ { setupUi(this); - connect( closePB, SIGNAL( clicked() ), this, SLOT( reject() ) ); + connect( closePB, SIGNAL( clicked() ), + this, SLOT( reject() ) ); } Index: src/frontends/qt4/QBibtexDialog.C =================================================================== --- src/frontends/qt4/QBibtexDialog.C (revision 13794) +++ src/frontends/qt4/QBibtexDialog.C (working copy) @@ -45,23 +45,23 @@ setupUi(this); QDialog::setModal(true); - connect( okPB, SIGNAL(clicked()), + connect(okPB, SIGNAL(clicked()), form, SLOT(slotOK())); - connect( closePB, SIGNAL(clicked()), + connect(closePB, SIGNAL(clicked()), form, SLOT(slotClose())); - connect( stylePB, SIGNAL( clicked() ), + connect(stylePB, SIGNAL( clicked() ), this, SLOT( browsePressed() ) ); - connect( deletePB, SIGNAL( clicked() ), + connect(deletePB, SIGNAL( clicked() ), this, SLOT( deletePressed() ) ); - connect( styleCB, SIGNAL( textChanged(const QString&) ), + connect(styleCB, SIGNAL( textChanged(const QString&) ), this, SLOT( change_adaptor() ) ); - connect( databaseLW, SIGNAL( selectionChanged() ), + connect(databaseLW, SIGNAL( selectionChanged() ), this, SLOT( databaseChanged() ) ); - connect( bibtocCB, SIGNAL( toggled(bool) ), + connect(bibtocCB, SIGNAL( toggled(bool) ), this, SLOT( change_adaptor() ) ); - connect( btPrintCO, SIGNAL( activated(int) ), + connect(btPrintCO, SIGNAL( activated(int) ), this, SLOT( change_adaptor() ) ); - connect( addBibPB, SIGNAL( clicked() ), + connect(addBibPB, SIGNAL( clicked() ), this, SLOT( addPressed() ) ); add_ = new UiDialog<Ui::QBibtexAddUi>(this, true); @@ -76,11 +76,11 @@ add_->bibED->setValidator(new PathValidator(false, add_->bibED)); addCheckedLineEdit(add_bc_.view(), add_->bibED, 0); - connect( add_->bibED, SIGNAL(textChanged(const QString&)), + connect(add_->bibED, SIGNAL(textChanged(const QString&)), this, SLOT(bibEDChanged())); - connect( add_->addPB, SIGNAL(clicked()), + connect(add_->addPB, SIGNAL(clicked()), this, SLOT(addDatabase())); - connect( add_->addPB, SIGNAL(clicked()), + connect(add_->addPB, SIGNAL(clicked()), add_, SLOT(accept()) ); connect(add_->bibLW, SIGNAL(itemActivated(QListWidgetItem *)), this, SLOT(addDatabase())); @@ -88,9 +88,9 @@ add_, SLOT(accept())); connect(add_->bibLW, SIGNAL(itemChanged(QListWidgetItem *)), this, SLOT(availableChanged())); - connect( add_->browsePB, SIGNAL(clicked()), + connect(add_->browsePB, SIGNAL(clicked()), this, SLOT(browseBibPressed())); - connect( add_->closePB, SIGNAL( clicked() ), + connect(add_->closePB, SIGNAL( clicked() ), add_, SLOT( reject() ) ); } @@ -145,11 +145,11 @@ string const file = trim(form_->controller().browseBib("")); if (!file.empty()) { - string const f = changeExtension(file, ""); + QString const f = toqstr(changeExtension(file, "")); bool present = false; for (unsigned int i = 0; i != add_->bibLW->count(); i++) { - if (fromqstr(add_->bibLW->item(i)->text()) == f) + if (add_->bibLW->item(i)->text() == f) present = true; } Index: src/frontends/qt4/QDocumentDialog.C =================================================================== --- src/frontends/qt4/QDocumentDialog.C (revision 13794) +++ src/frontends/qt4/QDocumentDialog.C (working copy) @@ -82,8 +82,10 @@ form, SLOT(slotRestore())); - connect( savePB, SIGNAL( clicked() ), this, SLOT( saveDefaultClicked() ) ); - connect( defaultPB, SIGNAL( clicked() ), this, SLOT( useDefaultsClicked() ) ); + connect(savePB, SIGNAL( clicked() ), + this, SLOT( saveDefaultClicked() ) ); + connect(defaultPB, SIGNAL( clicked() ), + this, SLOT( useDefaultsClicked() ) ); // Manage the restore, ok, apply, restore and cancel/close buttons form_->bcview().setOK(okPB); @@ -280,13 +282,15 @@ connect(numberingModule->tocSL, SIGNAL(valueChanged(int)), this, SLOT(change_adaptor())); connect(numberingModule->depthSL, SIGNAL(valueChanged(int)), this, SLOT(updateNumbering())); connect(numberingModule->tocSL, SIGNAL(valueChanged(int)), this, SLOT(updateNumbering())); - numberingModule->tocLV->setSorting(-1); + numberingModule->tocTW->setColumnCount(3); + numberingModule->tocTW->headerItem()->setText(0, qt_("Example")); + numberingModule->tocTW->headerItem()->setText(1, qt_("Numbered")); + numberingModule->tocTW->headerItem()->setText(2, qt_("Appears in TOC")); - biblioModule = new UiWidget<Ui::BiblioUi>; - connect( biblioModule->citeNatbibRB, SIGNAL( toggled(bool) ), biblioModule->citationStyleL, SLOT( setEnabled(bool) ) ); - connect( biblioModule->citeNatbibRB, SIGNAL( toggled(bool) ), biblioModule->citeStyleCO, SLOT( setEnabled(bool) ) ); + connect( biblioModule->citeNatbibRB, SIGNAL( toggled(bool) ), biblioModule->citationStyleL, SLOT( setEnabled(bool) ) ); + connect( biblioModule->citeNatbibRB, SIGNAL( toggled(bool) ), biblioModule->citeStyleCO, SLOT( setEnabled(bool) ) ); // biblio connect(biblioModule->citeDefaultRB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor())); connect(biblioModule->citeNatbibRB, SIGNAL(toggled(bool)), this, SLOT(change_adaptor())); @@ -346,7 +350,7 @@ connect(bulletsModule, SIGNAL(changed()), this, SLOT(change_adaptor())); - floatModule = new FloatPlacement(this); + floatModule = new FloatPlacement; // float connect(floatModule, SIGNAL(changed()), this, SLOT(change_adaptor())); @@ -542,29 +546,28 @@ LyXTextClass const & tclass = form_->controller().params().getLyXTextClass(); - //numberingModule->tocLV->setUpdatesEnabled(false); + numberingModule->tocTW->setUpdatesEnabled(false); + numberingModule->tocTW->clear(); - // Update the example QListView int const depth = numberingModule->depthSL->value(); int const toc = numberingModule->tocSL->value(); QString const no = qt_("No"); QString const yes = qt_("Yes"); LyXTextClass::const_iterator end = tclass.end(); LyXTextClass::const_iterator cit = tclass.begin(); - numberingModule->tocLV->clear(); - Q3ListViewItem * item = 0; + QTreeWidgetItem * item = 0; for ( ; cit != end ; ++cit) { int const toclevel = (*cit)->toclevel; if (toclevel != LyXLayout::NOT_IN_TOC) { - item = new Q3ListViewItem(numberingModule->tocLV, - item, qt_((*cit)->name())); + item = new QTreeWidgetItem(numberingModule->tocTW); + item->setText(0, qt_((*cit)->name())); item->setText(1, (toclevel <= depth) ? yes : no); item->setText(2, (toclevel <= toc) ? yes : no); } } - //numberingModule->tocLV->setUpdatesEnabled(true); - //numberingModule->tocLV->update(); + numberingModule->tocTW->setUpdatesEnabled(true); + numberingModule->tocTW->update(); } void QDocumentDialog::apply(BufferParams & params) @@ -875,7 +878,7 @@ updateNumbering(); } else { numberingModule->setEnabled(false); - numberingModule->tocLV->clear(); + numberingModule->tocTW->clear(); } // bullets Index: src/frontends/qt4/QLogDialog.C =================================================================== --- src/frontends/qt4/QLogDialog.C (revision 13794) +++ src/frontends/qt4/QLogDialog.C (working copy) @@ -13,8 +13,7 @@ #include "QLogDialog.h" #include "QLog.h" -#include <qpushbutton.h> -//Added by qt3to4: +#include <QPushButton> #include <QCloseEvent> @@ -28,8 +27,8 @@ connect(closePB, SIGNAL(clicked()), form, SLOT(slotClose())); - - connect( updatePB, SIGNAL( clicked() ), this, SLOT( updateClicked() ) ); + connect( updatePB, SIGNAL( clicked() ), + this, SLOT( updateClicked() ) ); } Index: src/frontends/qt4/QParagraph.C =================================================================== --- src/frontends/qt4/QParagraph.C (revision 13794) +++ src/frontends/qt4/QParagraph.C (working copy) @@ -21,10 +21,9 @@ #include "controllers/ControlParagraph.h" #include "controllers/helper_funcs.h" -#include <q3buttongroup.h> -#include <qcheckbox.h> -#include <qlineedit.h> -#include <qpushbutton.h> +#include <QCheckBox> +#include <QLineEdit> +#include <QPushButton> using std::string; Index: src/frontends/qt4/ui/BranchesUi.ui =================================================================== --- src/frontends/qt4/ui/BranchesUi.ui (revision 13794) +++ src/frontends/qt4/ui/BranchesUi.ui (working copy) @@ -8,8 +8,8 @@ <rect> <x>0</x> <y>0</y> - <width>344</width> - <height>297</height> + <width>401</width> + <height>300</height> </rect> </property> <property name="windowTitle" > @@ -17,95 +17,64 @@ </property> <layout class="QGridLayout" > <property name="margin" > - <number>11</number> + <number>9</number> </property> <property name="spacing" > <number>6</number> </property> - <item rowspan="5" row="1" column="0" > - <layout class="QGridLayout" > - <property name="margin" > - <number>0</number> + <item row="0" column="1" > + <widget class="QLineEdit" name="newBranchLE" /> + </item> + <item row="5" column="2" > + <spacer> + <property name="orientation" > + <enum>Qt::Vertical</enum> </property> - <property name="spacing" > - <number>6</number> + <property name="sizeType" > + <enum>QSizePolicy::Expanding</enum> </property> - <item row="0" column="0" > - <widget class="QLabel" name="availableLB" > - <property name="text" > - <string>A&vailable Branches:</string> - </property> - <property name="buddy" > - <cstring>branchesLV</cstring> - </property> - </widget> - </item> - <item row="1" column="0" > - <widget class="Q3ListView" name="branchesLV" > - <property name="enabled" > - <bool>true</bool> - </property> - <property name="focusPolicy" > - <enum>Qt::NoFocus</enum> - </property> - <property name="toolTip" > - <string>The available branches</string> - </property> - <property name="resizePolicy" > - <enum>Q3ScrollView::AutoOneFit</enum> - </property> - <property name="vScrollBarMode" > - <enum>Q3ScrollView::Auto</enum> - </property> - <property name="hScrollBarMode" > - <enum>Q3ScrollView::Auto</enum> - </property> - <property name="allColumnsShowFocus" > - <bool>true</bool> - </property> - <property name="rootIsDecorated" > - <bool>false</bool> - </property> - <column> - <property name="text" > - <string>Name</string> - </property> - </column> - <column> - <property name="text" > - <string>Activated</string> - </property> - </column> - <column> - <property name="text" > - <string>Color</string> - </property> - </column> - </widget> - </item> - </layout> + <property name="sizeHint" > + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </spacer> </item> - <item row="3" column="1" > - <widget class="QPushButton" name="activatePB" > + <item row="0" column="2" > + <widget class="QPushButton" name="addBranchPB" > <property name="toolTip" > - <string>Toggle the selected branch</string> + <string>Add a new branch to the list</string> </property> <property name="text" > - <string>(&De)activate</string> + <string>&Add</string> </property> </widget> </item> - <item row="4" column="1" > - <widget class="QPushButton" name="colorPB" > - <property name="toolTip" > - <string>Define or change background color</string> + <item row="1" column="0" colspan="2" > + <widget class="QLabel" name="availableLB" > + <property name="text" > + <string>A&vailable Branches:</string> </property> + <property name="buddy" > + <cstring>branchesTW</cstring> + </property> + </widget> + </item> + <item row="0" column="0" > + <widget class="QLabel" name="newBranchLA" > <property name="text" > - <string>Alter Co&lor...</string> + <string>&New:</string> </property> + <property name="buddy" > + <cstring>newBranchLE</cstring> + </property> </widget> </item> - <item row="2" column="1" > + <item rowspan="4" row="2" column="0" colspan="2" > + <widget class="QTreeWidget" name="branchesTW" /> + </item> + <item row="2" column="2" > <widget class="QPushButton" name="removePB" > <property name="toolTip" > <string>Remove the selected branch</string> @@ -115,86 +84,29 @@ </property> </widget> </item> - <item row="5" column="1" > - <spacer> - <property name="orientation" > - <enum>Qt::Vertical</enum> + <item row="3" column="2" > + <widget class="QPushButton" name="activatePB" > + <property name="toolTip" > + <string>Toggle the selected branch</string> </property> - <property name="sizeType" > - <enum>QSizePolicy::Expanding</enum> + <property name="text" > + <string>(&De)activate</string> </property> - <property name="sizeHint" > - <size> - <width>20</width> - <height>20</height> - </size> - </property> - </spacer> + </widget> </item> - <item row="0" column="0" colspan="2" > - <layout class="QHBoxLayout" > - <property name="margin" > - <number>0</number> + <item row="4" column="2" > + <widget class="QPushButton" name="colorPB" > + <property name="toolTip" > + <string>Define or change background color</string> </property> - <property name="spacing" > - <number>6</number> + <property name="text" > + <string>Alter Co&lor...</string> </property> - <item> - <widget class="QLabel" name="newBranchLA" > - <property name="text" > - <string>&New:</string> - </property> - <property name="buddy" > - <cstring>newBranchLE</cstring> - </property> - </widget> - </item> - <item> - <widget class="QLineEdit" name="newBranchLE" /> - </item> - <item> - <widget class="QPushButton" name="addBranchPB" > - <property name="toolTip" > - <string>Add a new branch to the list</string> - </property> - <property name="text" > - <string>&Add</string> - </property> - </widget> - </item> - </layout> + </widget> </item> - <item row="1" column="1" > - <spacer> - <property name="orientation" > - <enum>Qt::Vertical</enum> - </property> - <property name="sizeType" > - <enum>QSizePolicy::Expanding</enum> - </property> - <property name="sizeHint" > - <size> - <width>20</width> - <height>20</height> - </size> - </property> - </spacer> - </item> </layout> </widget> <pixmapfunction>qPixmapFromMimeSource</pixmapfunction> - <customwidgets> - <customwidget> - <class>Q3ListView</class> - <extends></extends> - <header>q3listview.h</header> - <container>0</container> - <pixmap></pixmap> - </customwidget> - </customwidgets> - <tabstops> - <tabstop>branchesLV</tabstop> - </tabstops> <resources/> <connections/> </ui> Index: src/frontends/qt4/ui/QChangesUi.ui =================================================================== --- src/frontends/qt4/ui/QChangesUi.ui (revision 13794) +++ src/frontends/qt4/ui/QChangesUi.ui (working copy) @@ -8,8 +8,8 @@ <rect> <x>0</x> <y>0</y> - <width>297</width> - <height>252</height> + <width>298</width> + <height>264</height> </rect> </property> <property name="windowTitle" > @@ -18,15 +18,25 @@ <property name="sizeGripEnabled" > <bool>true</bool> </property> - <layout class="QVBoxLayout" > + <layout class="QGridLayout" > <property name="margin" > - <number>11</number> + <number>9</number> </property> <property name="spacing" > <number>6</number> </property> - <item> - <layout class="QVBoxLayout" > + <item row="0" column="0" > + <widget class="QLabel" name="changeLA" > + <property name="text" > + <string>Change:</string> + </property> + </widget> + </item> + <item row="1" column="0" > + <widget class="QTextBrowser" name="changeTB" /> + </item> + <item row="3" column="0" > + <layout class="QHBoxLayout" > <property name="margin" > <number>0</number> </property> @@ -34,25 +44,44 @@ <number>6</number> </property> <item> - <widget class="QLabel" name="changeLA" > + <widget class="QPushButton" name="nextPB" > + <property name="toolTip" > + <string>Go to next change</string> + </property> <property name="text" > - <string>Change:</string> + <string>&Next change</string> </property> + <property name="default" > + <bool>true</bool> + </property> </widget> </item> <item> - <widget class="Q3TextView" name="changeTV" > - <property name="focusPolicy" > - <enum>Qt::WheelFocus</enum> + <spacer> + <property name="orientation" > + <enum>Qt::Horizontal</enum> </property> - <property name="toolTip" > - <string>Details of the change</string> + <property name="sizeType" > + <enum>QSizePolicy::Expanding</enum> </property> + <property name="sizeHint" > + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="closePB" > + <property name="text" > + <string>Cancel</string> + </property> </widget> </item> </layout> </item> - <item> + <item row="2" column="0" > <layout class="QHBoxLayout" > <property name="margin" > <number>0</number> @@ -104,82 +133,10 @@ </item> </layout> </item> - <item> - <spacer> - <property name="orientation" > - <enum>Qt::Vertical</enum> - </property> - <property name="sizeType" > - <enum>QSizePolicy::Expanding</enum> - </property> - <property name="sizeHint" > - <size> - <width>20</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <layout class="QHBoxLayout" > - <property name="margin" > - <number>0</number> - </property> - <property name="spacing" > - <number>6</number> - </property> - <item> - <widget class="QPushButton" name="nextPB" > - <property name="toolTip" > - <string>Go to next change</string> - </property> - <property name="text" > - <string>&Next change</string> - </property> - <property name="default" > - <bool>true</bool> - </property> - </widget> - </item> - <item> - <spacer> - <property name="orientation" > - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeType" > - <enum>QSizePolicy::Expanding</enum> - </property> - <property name="sizeHint" > - <size> - <width>20</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QPushButton" name="closePB" > - <property name="text" > - <string>Cancel</string> - </property> - </widget> - </item> - </layout> - </item> </layout> </widget> <pixmapfunction>qPixmapFromMimeSource</pixmapfunction> - <customwidgets> - <customwidget> - <class>Q3TextView</class> - <extends>QWidget</extends> - <header>q3textview.h</header> - <container>1</container> - <pixmap></pixmap> - </customwidget> - </customwidgets> <tabstops> - <tabstop>changeTV</tabstop> <tabstop>acceptPB</tabstop> <tabstop>rejectPB</tabstop> <tabstop>nextPB</tabstop> Index: src/frontends/qt4/ui/QAboutUi.ui =================================================================== --- src/frontends/qt4/ui/QAboutUi.ui (revision 13794) +++ src/frontends/qt4/ui/QAboutUi.ui (working copy) @@ -18,137 +18,126 @@ <property name="sizeGripEnabled" > <bool>true</bool> </property> - <layout class="QVBoxLayout" > - <property name="margin" > - <number>11</number> + <widget class="QWidget" name="" > + <layout class="QHBoxLayout" > + <property name="margin" > + <number>0</number> + </property> + <property name="spacing" > + <number>6</number> + </property> + <item> + <spacer> + <property name="orientation" > + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType" > + <enum>QSizePolicy::Expanding</enum> + </property> + <property name="sizeHint" > + <size> + <width>20</width> + <height>20</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="closePB" > + <property name="sizePolicy" > + <sizepolicy> + <hsizetype>0</hsizetype> + <vsizetype>0</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + <property name="text" > + <string>&Close</string> + </property> + <property name="default" > + <bool>true</bool> + </property> + </widget> + </item> + </layout> + </widget> + <widget class="QTabWidget" name="tab" > + <property name="geometry" > + <rect> + <x>11</x> + <y>11</y> + <width>305</width> + <height>171</height> + </rect> </property> - <property name="spacing" > - <number>6</number> - </property> - <item> - <widget class="QTabWidget" name="tab" > - <widget class="QWidget" name="versiontab" > - <attribute name="title" > - <string>Version</string> - </attribute> - <layout class="QVBoxLayout" > - <property name="margin" > - <number>11</number> + <widget class="QWidget" name="versiontab" > + <attribute name="title" > + <string>Version</string> + </attribute> + <layout class="QVBoxLayout" > + <property name="margin" > + <number>11</number> + </property> + <property name="spacing" > + <number>6</number> + </property> + <item> + <widget class="QLabel" name="versionLA" > + <property name="frameShape" > + <enum>QFrame::Box</enum> </property> - <property name="spacing" > - <number>6</number> + <property name="frameShadow" > + <enum>QFrame::Sunken</enum> </property> - <item> - <widget class="QLabel" name="versionLA" > - <property name="frameShape" > - <enum>QFrame::Box</enum> - </property> - <property name="frameShadow" > - <enum>QFrame::Sunken</enum> - </property> - <property name="text" > - <string>Version goes here</string> - </property> - <property name="alignment" > - <set>Qt::AlignCenter</set> - </property> - <property name="margin" > - <number>6</number> - </property> - </widget> - </item> - </layout> - </widget> - <widget class="QWidget" name="creditstab" > - <attribute name="title" > - <string>Credits</string> - </attribute> - <layout class="QVBoxLayout" > - <property name="margin" > - <number>11</number> + <property name="text" > + <string>Version goes here</string> </property> - <property name="spacing" > - <number>6</number> + <property name="alignment" > + <set>Qt::AlignCenter</set> </property> - <item> - <widget class="Q3TextView" name="creditsTV" /> - </item> - </layout> - </widget> - <widget class="QWidget" name="copyrighttab" > - <attribute name="title" > - <string>Copyright</string> - </attribute> - <layout class="QGridLayout" > <property name="margin" > - <number>11</number> - </property> - <property name="spacing" > <number>6</number> </property> - <item row="0" column="0" > - <widget class="Q3TextView" name="copyright" /> - </item> - </layout> - </widget> - </widget> - </item> - <item> - <layout class="QHBoxLayout" > + </widget> + </item> + </layout> + </widget> + <widget class="QWidget" name="creditstab" > + <attribute name="title" > + <string>Credits</string> + </attribute> + <layout class="QGridLayout" > <property name="margin" > - <number>0</number> + <number>9</number> </property> <property name="spacing" > <number>6</number> </property> - <item> - <spacer> - <property name="orientation" > - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeType" > - <enum>QSizePolicy::Expanding</enum> - </property> - <property name="sizeHint" > - <size> - <width>20</width> - <height>20</height> - </size> - </property> - </spacer> + <item row="0" column="0" > + <widget class="QTextBrowser" name="creditsTB" /> </item> - <item> - <widget class="QPushButton" name="closePB" > - <property name="sizePolicy" > - <sizepolicy> - <hsizetype>0</hsizetype> - <vsizetype>0</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="text" > - <string>&Close</string> - </property> - <property name="default" > - <bool>true</bool> - </property> - </widget> + </layout> + </widget> + <widget class="QWidget" name="copyrighttab" > + <attribute name="title" > + <string>Copyright</string> + </attribute> + <layout class="QGridLayout" > + <property name="margin" > + <number>9</number> + </property> + <property name="spacing" > + <number>6</number> + </property> + <item row="0" column="0" > + <widget class="QTextBrowser" name="copyrightTB" /> </item> </layout> - </item> - </layout> + </widget> + </widget> </widget> <pixmapfunction>qPixmapFromMimeSource</pixmapfunction> - <customwidgets> - <customwidget> - <class>Q3TextView</class> - <extends>QWidget</extends> - <header>q3textview.h</header> - <container>1</container> - <pixmap></pixmap> - </customwidget> - </customwidgets> <resources/> <connections/> </ui> Index: src/frontends/qt4/ui/QLogUi.ui =================================================================== --- src/frontends/qt4/ui/QLogUi.ui (revision 13794) +++ src/frontends/qt4/ui/QLogUi.ui (working copy) @@ -18,17 +18,17 @@ <property name="sizeGripEnabled" > <bool>true</bool> </property> - <layout class="QVBoxLayout" > + <layout class="QGridLayout" > <property name="margin" > - <number>11</number> + <number>9</number> </property> <property name="spacing" > <number>6</number> </property> - <item> - <widget class="Q3TextView" name="logTV" /> + <item row="0" column="0" > + <widget class="QTextBrowser" name="logTB" /> </item> - <item> + <item row="1" column="0" > <layout class="QHBoxLayout" > <property name="margin" > <number>0</number> @@ -77,17 +77,7 @@ </layout> </widget> <pixmapfunction>qPixmapFromMimeSource</pixmapfunction> - <customwidgets> - <customwidget> - <class>Q3TextView</class> - <extends>QWidget</extends> - <header>q3textview.h</header> - <container>1</container> - <pixmap></pixmap> - </customwidget> - </customwidgets> <tabstops> - <tabstop>logTV</tabstop> <tabstop>updatePB</tabstop> <tabstop>closePB</tabstop> </tabstops> Index: src/frontends/qt4/ui/NumberingUi.ui =================================================================== --- src/frontends/qt4/ui/NumberingUi.ui (revision 13794) +++ src/frontends/qt4/ui/NumberingUi.ui (working copy) @@ -15,63 +15,36 @@ <property name="windowTitle" > <string/> </property> - <layout class="QVBoxLayout" > + <layout class="QGridLayout" > <property name="margin" > - <number>11</number> + <number>9</number> </property> <property name="spacing" > <number>6</number> </property> - <item> - <widget class="QLabel" name="TextLabel1_2" > - <property name="text" > - <string>&Numbering</string> - </property> - <property name="buddy" > - <cstring>depthSL</cstring> - </property> - </widget> + <item row="4" column="0" > + <widget class="QTreeWidget" name="tocTW" /> </item> - <item> - <layout class="QHBoxLayout" > - <property name="margin" > - <number>0</number> + <item row="3" column="0" > + <widget class="QSlider" name="tocSL" > + <property name="minimum" > + <number>-1</number> </property> - <property name="spacing" > - <number>6</number> + <property name="maximum" > + <number>5</number> </property> - <item> - <widget class="QSlider" name="depthSL" > - <property name="minimum" > - <number>-2</number> - </property> - <property name="maximum" > - <number>5</number> - </property> - <property name="value" > - <number>3</number> - </property> - <property name="orientation" > - <enum>Qt::Horizontal</enum> - </property> - </widget> - </item> - </layout> - </item> - <item> - <widget class="QLabel" name="TextLabel1" > - <property name="text" > - <string>&List in Table of Contents</string> + <property name="value" > + <number>3</number> </property> - <property name="buddy" > - <cstring>tocSL</cstring> + <property name="orientation" > + <enum>Qt::Horizontal</enum> </property> </widget> </item> - <item> - <widget class="QSlider" name="tocSL" > + <item row="1" column="0" > + <widget class="QSlider" name="depthSL" > <property name="minimum" > - <number>-1</number> + <number>-2</number> </property> <property name="maximum" > <number>5</number> @@ -84,62 +57,32 @@ </property> </widget> </item> - <item> - <widget class="Q3ListView" name="tocLV" > - <property name="enabled" > - <bool>true</bool> + <item row="2" column="0" > + <widget class="QLabel" name="TextLabel1" > + <property name="text" > + <string>&List in Table of Contents</string> </property> - <property name="focusPolicy" > - <enum>Qt::NoFocus</enum> + <property name="buddy" > + <cstring>tocSL</cstring> </property> - <property name="toolTip" > - <string>Example numbering and table of contents</string> + </widget> + </item> + <item row="0" column="0" > + <widget class="QLabel" name="TextLabel1_2" > + <property name="text" > + <string>&Numbering</string> </property> - <property name="resizePolicy" > - <enum>Q3ScrollView::AutoOneFit</enum> + <property name="buddy" > + <cstring>depthSL</cstring> </property> - <property name="vScrollBarMode" > - <enum>Q3ScrollView::AlwaysOff</enum> - </property> - <property name="hScrollBarMode" > - <enum>Q3ScrollView::AlwaysOff</enum> - </property> - <property name="rootIsDecorated" > - <bool>false</bool> - </property> - <column> - <property name="text" > - <string>Example</string> - </property> - </column> - <column> - <property name="text" > - <string>Numbered</string> - </property> - </column> - <column> - <property name="text" > - <string>Appears in TOC</string> - </property> - </column> </widget> </item> </layout> </widget> <pixmapfunction>qPixmapFromMimeSource</pixmapfunction> - <customwidgets> - <customwidget> - <class>Q3ListView</class> - <extends></extends> - <header>q3listview.h</header> - <container>0</container> - <pixmap></pixmap> - </customwidget> - </customwidgets> <tabstops> <tabstop>tocSL</tabstop> <tabstop>depthSL</tabstop> - <tabstop>tocLV</tabstop> </tabstops> <resources/> <connections/> Index: src/frontends/qt4/ui/QShowFileUi.ui =================================================================== --- src/frontends/qt4/ui/QShowFileUi.ui (revision 13794) +++ src/frontends/qt4/ui/QShowFileUi.ui (working copy) @@ -18,21 +18,17 @@ <property name="sizeGripEnabled" > <bool>true</bool> </property> - <layout class="QVBoxLayout" > + <layout class="QGridLayout" > <property name="margin" > - <number>11</number> + <number>9</number> </property> <property name="spacing" > <number>6</number> </property> - <item> - <widget class="Q3TextView" name="text" > - <property name="toolTip" > - <string/> - </property> - </widget> + <item row="0" column="0" > + <widget class="QTextBrowser" name="textTB" /> </item> - <item> + <item row="1" column="0" > <layout class="QHBoxLayout" > <property name="margin" > <number>0</number> @@ -71,15 +67,6 @@ </layout> </widget> <pixmapfunction>qPixmapFromMimeSource</pixmapfunction> - <customwidgets> - <customwidget> - <class>Q3TextView</class> - <extends>QWidget</extends> - <header>q3textview.h</header> - <container>1</container> - <pixmap></pixmap> - </customwidget> - </customwidgets> <resources/> <connections/> </ui> Index: src/frontends/qt4/floatplacement.h =================================================================== --- src/frontends/qt4/floatplacement.h (revision 13794) +++ src/frontends/qt4/floatplacement.h (working copy) @@ -26,7 +26,7 @@ Q_OBJECT public: - FloatPlacement(QWidget * parent, char * name=""); + FloatPlacement(QWidget * parent=0, char * name=""); void useWide(); Index: src/frontends/qt4/QBranchDialog.C =================================================================== --- src/frontends/qt4/QBranchDialog.C (revision 13794) +++ src/frontends/qt4/QBranchDialog.C (working copy) @@ -13,8 +13,7 @@ #include "QBranchDialog.h" #include "QBranch.h" -#include <qpushbutton.h> -//Added by qt3to4: +#include <QPushButton> #include <QCloseEvent> namespace lyx { @@ -28,8 +27,8 @@ form, SLOT(slotOK())); connect(closePB, SIGNAL(clicked()), form, SLOT(slotClose())); - - connect( branchCO, SIGNAL( activated(int) ), this, SLOT( change_adaptor() ) ); + connect(branchCO, SIGNAL( activated(int) ), + this, SLOT( change_adaptor() ) ); } Index: src/frontends/qt4/QShowFile.C =================================================================== --- src/frontends/qt4/QShowFile.C (revision 13794) +++ src/frontends/qt4/QShowFile.C (working copy) @@ -17,8 +17,8 @@ #include "controllers/ControlShowFile.h" -#include <q3textview.h> -#include <qpushbutton.h> +#include <QTextBrowser> +#include <QPushButton> using std::string; @@ -51,7 +51,7 @@ contents = "Error -> Cannot load file!"; } - dialog_->text->setText(toqstr(contents)); + dialog_->textTB->setPlainText(toqstr(contents)); } } // namespace frontend Index: src/frontends/qt4/QLog.C =================================================================== --- src/frontends/qt4/QLog.C (revision 13794) +++ src/frontends/qt4/QLog.C (working copy) @@ -18,8 +18,8 @@ #include <sstream> -#include <q3textview.h> -#include <qpushbutton.h> +#include <QTextBrowser> +#include <QPushButton> namespace lyx { namespace frontend { @@ -44,7 +44,7 @@ std::ostringstream ss; controller().getContents(ss); - dialog_->logTV->setText(toqstr(ss.str())); + dialog_->logTB->setPlainText(toqstr(ss.str())); } } // namespace frontend Index: src/frontends/qt4/QShowFileDialog.C =================================================================== --- src/frontends/qt4/QShowFileDialog.C (revision 13794) +++ src/frontends/qt4/QShowFileDialog.C (working copy) @@ -13,8 +13,7 @@ #include "QShowFileDialog.h" #include "QShowFile.h" -#include <qpushbutton.h> -//Added by qt3to4: +#include <QPushButton> #include <QCloseEvent> namespace lyx { Index: src/frontends/qt4/QAbout.C =================================================================== --- src/frontends/qt4/QAbout.C (revision 13794) +++ src/frontends/qt4/QAbout.C (working copy) @@ -22,10 +22,10 @@ #include <sstream> -#include <qlabel.h> -#include <qpushbutton.h> -#include <qtextcodec.h> -#include <q3textview.h> +#include <QLabel> +#include <QPushButton> +#include <QTextCodec> +#include <QTextBrowser> using lyx::support::prefixIs; @@ -52,11 +52,11 @@ connect(dialog_.get()->closePB, SIGNAL(clicked()), this, SLOT(slotClose())); - dialog_->copyright->setText(toqstr(controller().getCopyright())); - dialog_->copyright->append("\n"); - dialog_->copyright->append(toqstr(controller().getLicense())); - dialog_->copyright->append("\n"); - dialog_->copyright->append(toqstr(controller().getDisclaimer())); + dialog_->copyrightTB->setPlainText(toqstr(controller().getCopyright())); + dialog_->copyrightTB->append("\n"); + dialog_->copyrightTB->append(toqstr(controller().getLicense())); + dialog_->copyrightTB->append("\n"); + dialog_->copyrightTB->append(toqstr(controller().getDisclaimer())); dialog_->versionLA->setText(toqstr(controller().getVersion())); @@ -114,12 +114,12 @@ QString const qtext = codec ? codec->toUnicode(out.str().c_str()) : toqstr(out.str()); - dialog_->creditsTV->setText(qtext); + dialog_->creditsTB->setPlainText(qtext); // try to resize to a good size - dialog_->copyright->hide(); - dialog_->setMinimumSize(dialog_->copyright->sizeHint()); - dialog_->copyright->show(); + dialog_->copyrightTB->hide(); + dialog_->setMinimumSize(dialog_->copyrightTB->sizeHint()); + dialog_->copyrightTB->show(); dialog_->setMinimumSize(dialog_->sizeHint()); // Manage the cancel/close button Index: src/frontends/qt4/QBranch.C =================================================================== --- src/frontends/qt4/QBranch.C (revision 13794) +++ src/frontends/qt4/QBranch.C (working copy) @@ -21,7 +21,7 @@ #include "insets/insetbranch.h" -#include <qpushbutton.h> +#include <QPushButton> using std::string; Index: src/frontends/qt4/QBox.C =================================================================== --- src/frontends/qt4/QBox.C (revision 13794) +++ src/frontends/qt4/QBox.C (working copy) @@ -30,9 +30,8 @@ #include "support/lstrings.h" -#include <qpushbutton.h> -#include <qlineedit.h> -#include <q3buttongroup.h> +#include <QPushButton> +#include <QLineEdit> #include <vector> Index: src/frontends/qt4/Dialogs.C =================================================================== --- src/frontends/qt4/Dialogs.C (revision 13794) +++ src/frontends/qt4/Dialogs.C (working copy) @@ -82,7 +82,6 @@ #include "QTexinfo.h" #include "QToc.h" #include "QTocDialog.h" -#include "q3url.h" #include "QVSpace.h" #include "QWrap.h" Index: src/frontends/qt4/QChanges.C =================================================================== --- src/frontends/qt4/QChanges.C (revision 13794) +++ src/frontends/qt4/QChanges.C (working copy) @@ -19,8 +19,8 @@ #include "controllers/ControlChanges.h" -#include <qpushbutton.h> -#include <q3textview.h> +#include <QPushButton> +#include <QTextBrowser> using lyx::support::bformat; @@ -67,7 +67,7 @@ if (!date.empty()) text += bformat(_("Change made at %1$s\n"), date); - dialog_->changeTV->setText(toqstr(text)); + dialog_->changeTB->setPlainText(toqstr(text)); }