From 1032cc5ae85c3dfde2329f2f33418dc3873c0585 Mon Sep 17 00:00:00 2001 From: Edwin Leuven Date: Thu, 4 May 2006 07:31:46 +0000 Subject: [PATCH] getting rid of even more qt3 convenience classes and unused headers... git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@13796 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/frontends/qt4/Dialogs.C | 1 - src/frontends/qt4/QAbout.C | 26 ++-- src/frontends/qt4/QAboutDialog.C | 3 +- src/frontends/qt4/QBibtexDialog.C | 32 ++-- src/frontends/qt4/QBox.C | 5 +- src/frontends/qt4/QBranch.C | 2 +- src/frontends/qt4/QBranchDialog.C | 7 +- src/frontends/qt4/QBranches.C | 58 ++++---- src/frontends/qt4/QBranches.h | 8 +- src/frontends/qt4/QChanges.C | 6 +- src/frontends/qt4/QChangesDialog.C | 10 +- src/frontends/qt4/QDocumentDialog.C | 35 +++-- src/frontends/qt4/QIndexDialog.C | 42 +++--- src/frontends/qt4/QLog.C | 6 +- src/frontends/qt4/QLogDialog.C | 7 +- src/frontends/qt4/QParagraph.C | 7 +- src/frontends/qt4/QParagraphDialog.C | 52 ++++--- src/frontends/qt4/QShowFile.C | 6 +- src/frontends/qt4/QShowFileDialog.C | 3 +- src/frontends/qt4/floatplacement.h | 2 +- src/frontends/qt4/ui/BranchesUi.ui | 200 +++++++------------------ src/frontends/qt4/ui/NumberingUi.ui | 119 ++++----------- src/frontends/qt4/ui/QAboutUi.ui | 215 +++++++++++++-------------- src/frontends/qt4/ui/QChangesUi.ui | 129 ++++++---------- src/frontends/qt4/ui/QLogUi.ui | 20 +-- src/frontends/qt4/ui/QShowFileUi.ui | 23 +-- 26 files changed, 407 insertions(+), 617 deletions(-) diff --git a/src/frontends/qt4/Dialogs.C b/src/frontends/qt4/Dialogs.C index 1fa56f6850..53efbad427 100644 --- a/src/frontends/qt4/Dialogs.C +++ b/src/frontends/qt4/Dialogs.C @@ -82,7 +82,6 @@ #include "QTexinfo.h" #include "QToc.h" #include "QTocDialog.h" -#include "q3url.h" #include "QVSpace.h" #include "QWrap.h" diff --git a/src/frontends/qt4/QAbout.C b/src/frontends/qt4/QAbout.C index 6b4509a286..d944f4de2e 100644 --- a/src/frontends/qt4/QAbout.C +++ b/src/frontends/qt4/QAbout.C @@ -22,10 +22,10 @@ #include -#include -#include -#include -#include +#include +#include +#include +#include using lyx::support::prefixIs; @@ -52,11 +52,11 @@ void QAbout::build_dialog() 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 @@ void QAbout::build_dialog() 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 diff --git a/src/frontends/qt4/QAboutDialog.C b/src/frontends/qt4/QAboutDialog.C index c8e3388ee5..919963a3d8 100644 --- a/src/frontends/qt4/QAboutDialog.C +++ b/src/frontends/qt4/QAboutDialog.C @@ -20,7 +20,8 @@ QAboutDialog::QAboutDialog(QWidget * parent, const char * name, { setupUi(this); - connect( closePB, SIGNAL( clicked() ), this, SLOT( reject() ) ); + connect( closePB, SIGNAL( clicked() ), + this, SLOT( reject() ) ); } diff --git a/src/frontends/qt4/QBibtexDialog.C b/src/frontends/qt4/QBibtexDialog.C index b819e6a37f..0fe64e3b71 100644 --- a/src/frontends/qt4/QBibtexDialog.C +++ b/src/frontends/qt4/QBibtexDialog.C @@ -45,23 +45,23 @@ QBibtexDialog::QBibtexDialog(QBibtex * form) 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(this, true); @@ -76,11 +76,11 @@ QBibtexDialog::QBibtexDialog(QBibtex * form) 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 @@ QBibtexDialog::QBibtexDialog(QBibtex * form) 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 @@ void QBibtexDialog::browseBibPressed() 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; } diff --git a/src/frontends/qt4/QBox.C b/src/frontends/qt4/QBox.C index 2c1ea6f8b2..8dc7187e07 100644 --- a/src/frontends/qt4/QBox.C +++ b/src/frontends/qt4/QBox.C @@ -30,9 +30,8 @@ #include "support/lstrings.h" -#include -#include -#include +#include +#include #include diff --git a/src/frontends/qt4/QBranch.C b/src/frontends/qt4/QBranch.C index 617ce1a3a5..086dd999b2 100644 --- a/src/frontends/qt4/QBranch.C +++ b/src/frontends/qt4/QBranch.C @@ -21,7 +21,7 @@ #include "insets/insetbranch.h" -#include +#include using std::string; diff --git a/src/frontends/qt4/QBranchDialog.C b/src/frontends/qt4/QBranchDialog.C index 5283a28d66..02c5b7fa92 100644 --- a/src/frontends/qt4/QBranchDialog.C +++ b/src/frontends/qt4/QBranchDialog.C @@ -13,8 +13,7 @@ #include "QBranchDialog.h" #include "QBranch.h" -#include -//Added by qt3to4: +#include #include namespace lyx { @@ -28,8 +27,8 @@ QBranchDialog::QBranchDialog(QBranch * form) 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() ) ); } diff --git a/src/frontends/qt4/QBranches.C b/src/frontends/qt4/QBranches.C index a5cb50e60e..fcbe746788 100644 --- a/src/frontends/qt4/QBranches.C +++ b/src/frontends/qt4/QBranches.C @@ -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 +#include +#include #include +#include #include #include @@ -37,7 +39,10 @@ QBranches::QBranches(QWidget * parent, Qt::WFlags f) : 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 @@ void QBranches::update() { // 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_addBranchPB_pressed() 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_removePB_pressed() 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::toggleBranch(Q3ListViewItem * selItem) void QBranches::on_colorPB_clicked() { - Q3ListViewItem * selItem = - branchesLV->selectedItem(); + QTreeWidgetItem * selItem = + branchesTW->currentItem(); QString sel_branch; if (selItem != 0) sel_branch = selItem->text(0); diff --git a/src/frontends/qt4/QBranches.h b/src/frontends/qt4/QBranches.h index e5a9ecd159..b83d197b4c 100644 --- a/src/frontends/qt4/QBranches.h +++ b/src/frontends/qt4/QBranches.h @@ -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 -class Q3ListViewItem; +class QTreeWidgetItem; class BufferParams; @@ -44,14 +44,14 @@ signals: 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: diff --git a/src/frontends/qt4/QChanges.C b/src/frontends/qt4/QChanges.C index c07af77a69..287f700b30 100644 --- a/src/frontends/qt4/QChanges.C +++ b/src/frontends/qt4/QChanges.C @@ -19,8 +19,8 @@ #include "controllers/ControlChanges.h" -#include -#include +#include +#include using lyx::support::bformat; @@ -67,7 +67,7 @@ void QChanges::next() if (!date.empty()) text += bformat(_("Change made at %1$s\n"), date); - dialog_->changeTV->setText(toqstr(text)); + dialog_->changeTB->setPlainText(toqstr(text)); } diff --git a/src/frontends/qt4/QChangesDialog.C b/src/frontends/qt4/QChangesDialog.C index 973efe7560..239a955007 100644 --- a/src/frontends/qt4/QChangesDialog.C +++ b/src/frontends/qt4/QChangesDialog.C @@ -25,10 +25,12 @@ QChangesDialog::QChangesDialog(QChanges * form) 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() ) ); } diff --git a/src/frontends/qt4/QDocumentDialog.C b/src/frontends/qt4/QDocumentDialog.C index 69d59a159c..55d34bd011 100644 --- a/src/frontends/qt4/QDocumentDialog.C +++ b/src/frontends/qt4/QDocumentDialog.C @@ -82,8 +82,10 @@ QDocumentDialog::QDocumentDialog(QDocument * form) 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 @@ QDocumentDialog::QDocumentDialog(QDocument * form) 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; - 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 @@ QDocumentDialog::QDocumentDialog(QDocument * form) 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 @@ void QDocumentDialog::updateNumbering() 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 @@ void QDocumentDialog::update(BufferParams const & params) updateNumbering(); } else { numberingModule->setEnabled(false); - numberingModule->tocLV->clear(); + numberingModule->tocTW->clear(); } // bullets diff --git a/src/frontends/qt4/QIndexDialog.C b/src/frontends/qt4/QIndexDialog.C index 987e825da4..78487601cf 100644 --- a/src/frontends/qt4/QIndexDialog.C +++ b/src/frontends/qt4/QIndexDialog.C @@ -15,10 +15,9 @@ #include "QIndex.h" #include "QIndexDialog.h" -#include -#include -#include -//Added by qt3to4: +#include +#include +#include #include namespace lyx { @@ -33,23 +32,24 @@ QIndexDialog::QIndexDialog(QIndex * form) form, SLOT(slotOK())); connect(closePB, SIGNAL(clicked()), form, SLOT(slotClose())); - - 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")); + connect( keywordED, SIGNAL( textChanged(const QString&) ), + this, SLOT( change_adaptor() ) ); + + 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") + ); } diff --git a/src/frontends/qt4/QLog.C b/src/frontends/qt4/QLog.C index 7feafa8773..48e76a59a9 100644 --- a/src/frontends/qt4/QLog.C +++ b/src/frontends/qt4/QLog.C @@ -18,8 +18,8 @@ #include -#include -#include +#include +#include namespace lyx { namespace frontend { @@ -44,7 +44,7 @@ void QLog::update_contents() std::ostringstream ss; controller().getContents(ss); - dialog_->logTV->setText(toqstr(ss.str())); + dialog_->logTB->setPlainText(toqstr(ss.str())); } } // namespace frontend diff --git a/src/frontends/qt4/QLogDialog.C b/src/frontends/qt4/QLogDialog.C index 9080471a64..0afbc818ab 100644 --- a/src/frontends/qt4/QLogDialog.C +++ b/src/frontends/qt4/QLogDialog.C @@ -13,8 +13,7 @@ #include "QLogDialog.h" #include "QLog.h" -#include -//Added by qt3to4: +#include #include @@ -28,8 +27,8 @@ QLogDialog::QLogDialog(QLog * form) connect(closePB, SIGNAL(clicked()), form, SLOT(slotClose())); - - connect( updatePB, SIGNAL( clicked() ), this, SLOT( updateClicked() ) ); + connect( updatePB, SIGNAL( clicked() ), + this, SLOT( updateClicked() ) ); } diff --git a/src/frontends/qt4/QParagraph.C b/src/frontends/qt4/QParagraph.C index 9fa162af3d..c29d2b563f 100644 --- a/src/frontends/qt4/QParagraph.C +++ b/src/frontends/qt4/QParagraph.C @@ -21,10 +21,9 @@ #include "controllers/ControlParagraph.h" #include "controllers/helper_funcs.h" -#include -#include -#include -#include +#include +#include +#include using std::string; diff --git a/src/frontends/qt4/QParagraphDialog.C b/src/frontends/qt4/QParagraphDialog.C index 6bc040e990..f014c69c65 100644 --- a/src/frontends/qt4/QParagraphDialog.C +++ b/src/frontends/qt4/QParagraphDialog.C @@ -14,14 +14,13 @@ #include "QParagraphDialog.h" #include "QParagraph.h" -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "qt_helpers.h" -//Added by qt3to4: -#include namespace lyx { namespace frontend { @@ -37,27 +36,32 @@ QParagraphDialog::QParagraphDialog(QParagraph * form) 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." )); } diff --git a/src/frontends/qt4/QShowFile.C b/src/frontends/qt4/QShowFile.C index 252f079d40..56b809506a 100644 --- a/src/frontends/qt4/QShowFile.C +++ b/src/frontends/qt4/QShowFile.C @@ -17,8 +17,8 @@ #include "controllers/ControlShowFile.h" -#include -#include +#include +#include using std::string; @@ -51,7 +51,7 @@ void QShowFile::update_contents() contents = "Error -> Cannot load file!"; } - dialog_->text->setText(toqstr(contents)); + dialog_->textTB->setPlainText(toqstr(contents)); } } // namespace frontend diff --git a/src/frontends/qt4/QShowFileDialog.C b/src/frontends/qt4/QShowFileDialog.C index efe60423d8..31a8d0705e 100644 --- a/src/frontends/qt4/QShowFileDialog.C +++ b/src/frontends/qt4/QShowFileDialog.C @@ -13,8 +13,7 @@ #include "QShowFileDialog.h" #include "QShowFile.h" -#include -//Added by qt3to4: +#include #include namespace lyx { diff --git a/src/frontends/qt4/floatplacement.h b/src/frontends/qt4/floatplacement.h index 5102e95ba7..5a00857fbc 100644 --- a/src/frontends/qt4/floatplacement.h +++ b/src/frontends/qt4/floatplacement.h @@ -26,7 +26,7 @@ class FloatPlacement : public QWidget { Q_OBJECT public: - FloatPlacement(QWidget * parent, char * name=""); + FloatPlacement(QWidget * parent=0, char * name=""); void useWide(); diff --git a/src/frontends/qt4/ui/BranchesUi.ui b/src/frontends/qt4/ui/BranchesUi.ui index d834b87d7b..ce89f494a6 100644 --- a/src/frontends/qt4/ui/BranchesUi.ui +++ b/src/frontends/qt4/ui/BranchesUi.ui @@ -8,8 +8,8 @@ 0 0 - 344 - 297 + 401 + 300 @@ -17,95 +17,64 @@ - 11 + 9 6 - - - - 0 + + + + + + + Qt::Vertical - - 6 + + QSizePolicy::Expanding - - - - A&vailable Branches: - - - branchesLV - - - - - - - true - - - Qt::NoFocus - - - The available branches - - - Q3ScrollView::AutoOneFit - - - Q3ScrollView::Auto - - - Q3ScrollView::Auto - - - true - - - false - - - - Name - - - - - Activated - - - - - Color - - - - - + + + 20 + 20 + + + - - + + - Toggle the selected branch + Add a new branch to the list - (&De)activate + &Add - - - - Define or change background color + + + + A&vailable Branches: + + + branchesTW + + + + - Alter Co&lor... + &New: + + + newBranchLE - + + + + Remove the selected branch @@ -115,86 +84,29 @@ - - - - Qt::Vertical - - - QSizePolicy::Expanding - - - - 20 - 20 - - - - - - - - 0 + + + + Toggle the selected branch - - 6 + + (&De)activate - - - - &New: - - - newBranchLE - - - - - - - - - - Add a new branch to the list - - - &Add - - - - + - - - - Qt::Vertical - - - QSizePolicy::Expanding + + + + Define or change background color - - - 20 - 20 - + + Alter Co&lor... - + qPixmapFromMimeSource - - - Q3ListView - -
q3listview.h
- 0 - -
-
- - branchesLV - diff --git a/src/frontends/qt4/ui/NumberingUi.ui b/src/frontends/qt4/ui/NumberingUi.ui index b3916e8864..a15399a296 100644 --- a/src/frontends/qt4/ui/NumberingUi.ui +++ b/src/frontends/qt4/ui/NumberingUi.ui @@ -15,63 +15,36 @@ - + - 11 + 9 6 - - - - &Numbering - - - depthSL - - + + - - - - 0 + + + + -1 - - 6 + + 5 - - - - -2 - - - 5 - - - 3 - - - Qt::Horizontal - - - - - - - - - &List in Table of Contents + + 3 - - tocSL + + Qt::Horizontal - - + + - -1 + -2 5 @@ -84,62 +57,32 @@ - - - - true - - - Qt::NoFocus - - - Example numbering and table of contents - - - Q3ScrollView::AutoOneFit + + + + &List in Table of Contents - - Q3ScrollView::AlwaysOff + + tocSL - - Q3ScrollView::AlwaysOff + + + + + + &Numbering - - false + + depthSL - - - Example - - - - - Numbered - - - - - Appears in TOC - - qPixmapFromMimeSource - - - Q3ListView - -
q3listview.h
- 0 - -
-
tocSL depthSL - tocLV diff --git a/src/frontends/qt4/ui/QAboutUi.ui b/src/frontends/qt4/ui/QAboutUi.ui index 50678e1551..8e0bb375f7 100644 --- a/src/frontends/qt4/ui/QAboutUi.ui +++ b/src/frontends/qt4/ui/QAboutUi.ui @@ -18,137 +18,126 @@ true - - - 11 - - - 6 + + + + 0 + + + 6 + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + + 0 + 0 + 0 + 0 + + + + &Close + + + true + + + + + + + + + 11 + 11 + 305 + 171 + - - - - - Version - - - - 11 + + + Version + + + + 11 + + + 6 + + + + + QFrame::Box - - 6 + + QFrame::Sunken - - - - QFrame::Box - - - QFrame::Sunken - - - Version goes here - - - Qt::AlignCenter - - - 6 - - - - - - - - Credits - - - - 11 + + Version goes here - - 6 + + Qt::AlignCenter - - - - - - - - Copyright - - - 11 - - 6 - - - - - - - - - + + + + + + + Credits + + - 0 + 9 6 - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 20 - 20 - - - + + - - - - - 0 - 0 - 0 - 0 - - - - &Close - - - true - - + + + + + Copyright + + + + 9 + + + 6 + + + - -
+ + qPixmapFromMimeSource - - - Q3TextView - QWidget -
q3textview.h
- 1 - -
-
diff --git a/src/frontends/qt4/ui/QChangesUi.ui b/src/frontends/qt4/ui/QChangesUi.ui index 86f23d094e..776e2dd656 100644 --- a/src/frontends/qt4/ui/QChangesUi.ui +++ b/src/frontends/qt4/ui/QChangesUi.ui @@ -8,8 +8,8 @@ 0 0 - 297 - 252 + 298 + 264 @@ -18,15 +18,25 @@ true - + - 11 + 9 6 - - + + + + Change: + + + + + + + + 0 @@ -34,25 +44,44 @@ 6 - + + + Go to next change + - Change: + &Next change + + + true - - - Qt::WheelFocus + + + Qt::Horizontal - - Details of the change + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + Cancel - + 0 @@ -104,82 +133,10 @@ - - - - Qt::Vertical - - - QSizePolicy::Expanding - - - - 20 - 20 - - - - - - - - 0 - - - 6 - - - - - Go to next change - - - &Next change - - - true - - - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 20 - 20 - - - - - - - - Cancel - - - - - qPixmapFromMimeSource - - - Q3TextView - QWidget -
q3textview.h
- 1 - -
-
- changeTV acceptPB rejectPB nextPB diff --git a/src/frontends/qt4/ui/QLogUi.ui b/src/frontends/qt4/ui/QLogUi.ui index 54c69c79ea..443b7d9739 100644 --- a/src/frontends/qt4/ui/QLogUi.ui +++ b/src/frontends/qt4/ui/QLogUi.ui @@ -18,17 +18,17 @@ true - + - 11 + 9 6 - - + + - + 0 @@ -77,17 +77,7 @@ qPixmapFromMimeSource - - - Q3TextView - QWidget -
q3textview.h
- 1 - -
-
- logTV updatePB closePB diff --git a/src/frontends/qt4/ui/QShowFileUi.ui b/src/frontends/qt4/ui/QShowFileUi.ui index 750409d941..e477ca13a0 100644 --- a/src/frontends/qt4/ui/QShowFileUi.ui +++ b/src/frontends/qt4/ui/QShowFileUi.ui @@ -18,21 +18,17 @@ true - + - 11 + 9 6 - - - - - - + + - + 0 @@ -71,15 +67,6 @@ qPixmapFromMimeSource - - - Q3TextView - QWidget -
q3textview.h
- 1 - -
-
-- 2.39.5