diff --git a/src/frontends/qt4/FileDialog.C b/src/frontends/qt4/FileDialog.C index 0b95afaab7..99ea166af7 100644 --- a/src/frontends/qt4/FileDialog.C +++ b/src/frontends/qt4/FileDialog.C @@ -80,17 +80,16 @@ FileDialog::Result const FileDialog::save(string const & path, #ifdef USE_NATIVE_FILEDIALOG string const startsWith = makeAbsPath(suggested, path); - result.second = fromqstr( - Q3FileDialog::getSaveFileName(toqstr(startsWith), - toqstr(filters.as_string()), - qApp->focusWidget() ? qApp->focusWidget() : qApp->mainWidget(), - title_.c_str())); + result.second = fromqstr(QFileDialog::getSaveFileName( + qApp->focusWidget() ? qApp->focusWidget() : qApp->mainWidget(), + title_.c_str(), toqstr(startsWith), toqstr(filters.as_string()) )); #else - LyXFileDialog dlg(path, filters, title_, private_->b1, private_->b2); - dlg.setMode(Q3FileDialog::AnyFile); + LyXFileDialog dlg(title_, path, filters, private_->b1, private_->b2); + dlg.setFileMode(QFileDialog::AnyFile); + dlg.setAcceptMode(QFileDialog::AcceptSave); if (!suggested.empty()) - dlg.setSelection(toqstr(suggested)); + dlg.selectFile(toqstr(suggested)); lyxerr[Debug::GUI] << "Synchronous FileDialog: " << endl; int res = dlg.exec(); @@ -115,16 +114,14 @@ FileDialog::Result const FileDialog::open(string const & path, #ifdef USE_NATIVE_FILEDIALOG string const startsWith = makeAbsPath(suggested, path); - result.second = fromqstr( - Q3FileDialog::getOpenFileName(toqstr(startsWith), - toqstr(filters.as_string()), - qApp->focusWidget() ? qApp->focusWidget() : qApp->mainWidget(), - title_.c_str())); + result.second = fromqstr(QFileDialog::getOpenFileName( + qApp->focusWidget() ? qApp->focusWidget() : qApp->mainWidget(), + title_.c_str(), toqstr(startsWith), toqstr(filters.as_string()) )); #else - LyXFileDialog dlg(path, filters, title_, private_->b1, private_->b2); + LyXFileDialog dlg(title_, path, filters, private_->b1, private_->b2); if (!suggested.empty()) - dlg.setSelection(toqstr(suggested)); + dlg.selectFile(toqstr(suggested)); lyxerr[Debug::GUI] << "Synchronous FileDialog: " << endl; int res = dlg.exec(); @@ -147,19 +144,18 @@ FileDialog::Result const FileDialog::opendir(string const & path, #ifdef USE_NATIVE_FILEDIALOG string const startsWith = makeAbsPath(suggested, path); - result.second = fromqstr( - Q3FileDialog::getExistingDirectory(toqstr(startsWith), - qApp->focusWidget() ? qApp->focusWidget() : qApp->mainWidget(), - title_.c_str())); + result.second = fromqstr(QFileDialog::getExistingDirectory( + qApp->focusWidget() ? qApp->focusWidget() : qApp->mainWidget(), + title_.c_str(),toqstr(startsWith) )); #else FileFilterList const filter(_("Directories")); - LyXFileDialog dlg(path, filter, title_, private_->b1, private_->b2); + LyXFileDialog dlg(title_, path, filter, private_->b1, private_->b2); - dlg.setMode(Q3FileDialog::DirectoryOnly); + dlg.setFileMode(QFileDialog::DirectoryOnly); if (!suggested.empty()) - dlg.setSelection(toqstr(suggested)); + dlg.selectFile(toqstr(suggested)); lyxerr[Debug::GUI] << "Synchronous FileDialog: " << endl; int res = dlg.exec(); diff --git a/src/frontends/qt4/FileDialog_private.C b/src/frontends/qt4/FileDialog_private.C index 8a31c7a1cc..ff851c309d 100644 --- a/src/frontends/qt4/FileDialog_private.C +++ b/src/frontends/qt4/FileDialog_private.C @@ -18,6 +18,7 @@ #include #include +#include using lyx::support::split; @@ -42,23 +43,25 @@ string const getLabel(string const & str) { } // namespace anon -LyXFileDialog::LyXFileDialog(string const & p, +LyXFileDialog::LyXFileDialog(string const & t, + string const & p, lyx::support::FileFilterList const & filters, - string const & t, FileDialog::Button const & b1, FileDialog::Button const & b2) - : Q3FileDialog(toqstr(p), toqstr(filters.as_string()), - qApp->focusWidget() ? qApp->focusWidget() : qApp->mainWidget(), toqstr(t), true), - b1_(0), b2_(0) + : QFileDialog(qApp->focusWidget() ? qApp->focusWidget() : qApp->mainWidget(), + toqstr(t), toqstr(p), toqstr(filters.as_string())), + b1_(0), b2_(0) { setCaption(toqstr(t)); + QList layout = findChildren(); + if (!b1.first.empty()) { b1_dir_ = b1.second; b1_ = new QToolButton(this); connect(b1_, SIGNAL(clicked()), this, SLOT(buttonClicked())); b1_->setText(toqstr(getLabel(b1.first))); - addToolButton(b1_, true); + layout.at(0)->addWidget(b1_); } if (!b2.first.empty()) { @@ -66,7 +69,7 @@ LyXFileDialog::LyXFileDialog(string const & p, b2_ = new QToolButton(this); connect(b2_, SIGNAL(clicked()), this, SLOT(buttonClicked())); b2_->setText(toqstr(getLabel(b2.first))); - addToolButton(b2_); + layout.at(0)->addWidget(b2_); } } diff --git a/src/frontends/qt4/FileDialog_private.h b/src/frontends/qt4/FileDialog_private.h index cb1f40047e..a8f3c80e4e 100644 --- a/src/frontends/qt4/FileDialog_private.h +++ b/src/frontends/qt4/FileDialog_private.h @@ -14,7 +14,7 @@ #include "frontends/FileDialog.h" -#include +#include namespace lyx { namespace support { @@ -27,13 +27,13 @@ class FileFilterList; class QToolButton; -class LyXFileDialog : public Q3FileDialog +class LyXFileDialog : public QFileDialog { Q_OBJECT public: - LyXFileDialog(std::string const & path, + LyXFileDialog(std::string const & title, + std::string const & path, lyx::support::FileFilterList const & filters, - std::string const & title, FileDialog::Button const & b1, FileDialog::Button const & b2); public slots: diff --git a/src/frontends/qt4/Makefile.am b/src/frontends/qt4/Makefile.am index 6599ad0599..e9cde4a515 100644 --- a/src/frontends/qt4/Makefile.am +++ b/src/frontends/qt4/Makefile.am @@ -79,7 +79,6 @@ libqt4_la_SOURCES = \ lyx_gui.C \ lcolorcache.h lcolorcache.C \ panelstack.h panelstack.C \ - qcoloritem.h qcoloritem.C \ qfontexample.h qfontexample.C \ qfont_loader.h qfont_loader.C \ qfont_metrics.C \ diff --git a/src/frontends/qt4/QAbout.C b/src/frontends/qt4/QAbout.C index d944f4de2e..ecfe9e3b18 100644 --- a/src/frontends/qt4/QAbout.C +++ b/src/frontends/qt4/QAbout.C @@ -114,7 +114,7 @@ void QAbout::build_dialog() QString const qtext = codec ? codec->toUnicode(out.str().c_str()) : toqstr(out.str()); - dialog_->creditsTB->setPlainText(qtext); + dialog_->creditsTB->setHtml(qtext); // try to resize to a good size dialog_->copyrightTB->hide(); diff --git a/src/frontends/qt4/QBranches.C b/src/frontends/qt4/QBranches.C index fcbe746788..221ae45ca3 100644 --- a/src/frontends/qt4/QBranches.C +++ b/src/frontends/qt4/QBranches.C @@ -39,10 +39,9 @@ QBranches::QBranches(QWidget * parent, Qt::WFlags f) : QWidget(parent, f) { setupUi(this); - branchesTW->setColumnCount(3); - branchesTW->headerItem()->setText(0, qt_("Name")); + branchesTW->setColumnCount(2); + branchesTW->headerItem()->setText(0, qt_("Branch")); branchesTW->headerItem()->setText(1, qt_("Activated")); - branchesTW->headerItem()->setText(2, qt_("Color")); } QBranches::~QBranches() @@ -57,10 +56,8 @@ void QBranches::update(BufferParams const & params) void QBranches::update() { - // store the selected branch - QTreeWidgetItem * item = - branchesTW->currentItem(); + QTreeWidgetItem * item = branchesTW->currentItem(); QString sel_branch; if (item != 0) sel_branch = item->text(0); @@ -81,9 +78,9 @@ void QBranches::update() QColor const itemcolor = rgb2qcolor(it->getColor()); if (itemcolor.isValid()) { - QPixmap coloritem(30, 10); + QPixmap coloritem(32, 32); coloritem.fill(itemcolor); - newItem->setIcon(2, QIcon(coloritem)); + newItem->setIcon(0, QIcon(coloritem)); } // restore selected branch if (bname == sel_branch) diff --git a/src/frontends/qt4/QCitationDialog.C b/src/frontends/qt4/QCitationDialog.C index 7bb6cbba74..68960ceff0 100644 --- a/src/frontends/qt4/QCitationDialog.C +++ b/src/frontends/qt4/QCitationDialog.C @@ -252,12 +252,12 @@ void QCitationDialog::setButtons() } /* -void QCitationDialog::on_selectedLV_currentChanged(Q3ListBoxItem*) +void QCitationDialog::on_selectedLV_currentChanged(QListWidgetItem*) { fillStyles(); infoML->document()->clear(); - int const sel = selectedLB->currentItem(); + int const sel = selectedLW->currentItem(); if (sel < 0) { setButtons(); return; @@ -321,7 +321,7 @@ void QCitationDialog::changed() } -void updateBrowser(Q3ListBox * browser, +void updateBrowser(QListWidget * browser, vector const & keys) { browser->clear(); @@ -331,7 +331,7 @@ void updateBrowser(Q3ListBox * browser, string const key = trim(*it); // FIXME: why the .empty() test ? if (!key.empty()) - browser->insertItem(toqstr(key)); + browser->addItem(toqstr(key)); } } @@ -340,22 +340,22 @@ QCitationFind::QCitationFind(QCitation * form, QWidget * parent, Qt::WFlags f) : form_(form), QDialog(parent, f) { setupUi(this); - connect(addPB, SIGNAL(clicked()), this, SLOT(accept())); - connect(closePB, SIGNAL(clicked()), this, SLOT(reject())); + connect(addPB, SIGNAL(clicked()), this, SLOT(accept())); + connect(closePB, SIGNAL(clicked()), this, SLOT(reject())); connect(previousPB, SIGNAL(clicked()), this, SLOT(previous())); connect(nextPB, SIGNAL(clicked()), this, SLOT(next())); } void QCitationFind::update() { -// updateBrowser(availableLB, form_->availableKeys()); +// updateBrowser(availableLW, form_->availableKeys()); } -void QCitationFind::on_availableLB_currentChanged(Q3ListBoxItem *) +void QCitationFind::on_availableLW_currentItemChanged(QListWidgetItem *) { infoML->document()->clear(); - int const sel = availableLB->currentItem(); + int const sel = availableLW->currentRow(); if (sel < 0) { addPB->setEnabled(false); return; @@ -366,9 +366,9 @@ void QCitationFind::on_availableLB_currentChanged(Q3ListBoxItem *) } -void QCitationFind::on_availableLB_selected(Q3ListBoxItem *) +void QCitationFind::on_availableLW_itemActivated(QListWidgetItem *) { - int const sel = availableLB->currentItem(); +// int const sel = availableLW->currentRow(); foundkeys.clear(); // foundkeys.push_back(form_->availableKeys()[sel]); emit newCitations(); @@ -377,9 +377,9 @@ void QCitationFind::on_availableLB_selected(Q3ListBoxItem *) void QCitationFind::on_addPB_clicked() { -// form_->addKeys(availableLB->selectionModel()->selectedIndexes()); +// form_->addKeys(availableLW->selectionModel()->selectedIndexes()); - int const sel = availableLB->currentItem(); + int const sel = availableLW->currentRow(); if (sel < 0) return; @@ -388,8 +388,8 @@ void QCitationFind::on_addPB_clicked() // Add the selected browser_bib keys to browser_cite // multiple selections are possible - for (unsigned int i = 0; i != availableLB->count(); i++) { - if (availableLB->isSelected(i)) { + for (unsigned int i = 0; i != availableLW->count(); i++) { + if (availableLW->isItemSelected(availableLW->item(i))) { foundkeys.push_back(fromqstr(bibkeys[i])); } } @@ -421,7 +421,7 @@ void QCitationFind::find(biblio::Direction dir) ? biblio::REGEX : biblio::SIMPLE; vector::const_iterator start = bibkeys.begin(); - int const sel = availableLB->currentItem(); + int const sel = availableLW->currentItem(); if (sel >= 0 && sel <= int(bibkeys.size()-1)) start += sel; @@ -457,10 +457,10 @@ void QCitationFind::find(biblio::Direction dir) // Update the display // note that we have multi selection mode! - availableLB->setSelected(sel, false); - availableLB->setSelected(found, true); - availableLB->setCurrentItem(found); - availableLB->ensureCurrentVisible(); + availableLW->setSelected(sel, false); + availableLW->setSelected(found, true); + availableLW->setCurrentItem(found); + availableLW->ensureCurrentVisible(); */ } diff --git a/src/frontends/qt4/QCitationDialog.h b/src/frontends/qt4/QCitationDialog.h index 85eb750da7..2dd2ee50cf 100644 --- a/src/frontends/qt4/QCitationDialog.h +++ b/src/frontends/qt4/QCitationDialog.h @@ -21,8 +21,8 @@ #include #include -class Q3ListBox; -class Q3ListBoxItem; +class QListWidget; +class QListWidgetItem; class InsetCommandParams; @@ -61,7 +61,7 @@ public: protected slots: -// void on_selectedLB_currentChanged(Q3ListBoxItem*); +// void on_selectedLB_currentChanged(QListWidgetItem*); void on_okPB_clicked(); void on_cancelPB_clicked(); @@ -118,8 +118,8 @@ signals: protected slots: - void on_availableLB_currentChanged(Q3ListBoxItem *); - void on_availableLB_selected(Q3ListBoxItem *); + void on_availableLW_currentItemChanged(QListWidgetItem *); + void on_availableLW_itemActivated(QListWidgetItem *); void on_addPB_clicked(); virtual void previous(); virtual void next(); diff --git a/src/frontends/qt4/QLyXKeySym.C b/src/frontends/qt4/QLyXKeySym.C index 4e3e6f278b..9fe0f98ccf 100644 --- a/src/frontends/qt4/QLyXKeySym.C +++ b/src/frontends/qt4/QLyXKeySym.C @@ -14,15 +14,14 @@ #include "QLyXKeySym.h" #include "qlkey.h" #include "qt_helpers.h" -//Added by qt3to4: -#include -#include + #include "debug.h" -#include -#include -#include +#include +#include +#include +#include #include #include "support/lstrings.h" @@ -68,9 +67,7 @@ char const encode(string const & encoding, QString const & str) return 0; } - Q3CString tmpstr = codec->fromUnicode(str); - char const * tmpcstr = tmpstr; - return tmpcstr[0]; + return codec->fromUnicode(str).data()[0]; } } @@ -220,7 +217,7 @@ QString const QLyXKeySym::qprint(key_modifier::state mod) const if (mod & key_modifier::alt) tmpkey += Qt::ALT; - return Q3Accel::keyToString(tmpkey); + return QKeySequence(tmpkey).toString(); } diff --git a/src/frontends/qt4/QLyXKeySym.h b/src/frontends/qt4/QLyXKeySym.h index 3a29af150f..c9dcb9dfd9 100644 --- a/src/frontends/qt4/QLyXKeySym.h +++ b/src/frontends/qt4/QLyXKeySym.h @@ -15,8 +15,7 @@ #include "frontends/LyXKeySym.h" -#include -//Added by qt3to4: +#include #include class QKeyEvent; diff --git a/src/frontends/qt4/QParagraphDialog.C b/src/frontends/qt4/QParagraphDialog.C index f014c69c65..330e08c69e 100644 --- a/src/frontends/qt4/QParagraphDialog.C +++ b/src/frontends/qt4/QParagraphDialog.C @@ -51,7 +51,6 @@ QParagraphDialog::QParagraphDialog(QParagraph * form) linespacingValue->setValidator(new QDoubleValidator(linespacingValue)); - //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" diff --git a/src/frontends/qt4/QPrefsDialog.C b/src/frontends/qt4/QPrefsDialog.C index 9f02b037e6..5d147b80f3 100644 --- a/src/frontends/qt4/QPrefsDialog.C +++ b/src/frontends/qt4/QPrefsDialog.C @@ -36,7 +36,6 @@ #include "QPrefs.h" #include "panelstack.h" -#include "qcoloritem.h" #include "qfontexample.h" #include "ui/QPrefAsciiUi.h" @@ -90,6 +89,7 @@ using std::ostringstream; using std::pair; using std::vector; + namespace lyx { namespace frontend { @@ -97,6 +97,7 @@ QPrefsDialog::QPrefsDialog(QPrefs * form) : form_(form) { setupUi(this); + QDialog::setModal(true); connect(savePB, SIGNAL(clicked()), form, SLOT(slotOK())); @@ -201,11 +202,8 @@ QPrefsDialog::QPrefsDialog(QPrefs * form) screenfontsModule->screenHugerED->setValidator(new QDoubleValidator( screenfontsModule->screenHugerED)); - - - - colorsModule = new UiWidget; // FIXME: put in controller + colorsModule = new UiWidget; for (int i = 0; i < LColor::ignore; ++i) { LColor::color lc = static_cast(i); if (lc == LColor::none @@ -220,14 +218,20 @@ QPrefsDialog::QPrefsDialog(QPrefs * form) || lc == LColor::inherit || lc == LColor::ignore) continue; - colors_.push_back(lc); - string const guiname(lcolor.getGUIName(lc)); - QColorItem * ci(new QColorItem(lcolorcache.get(lc), - toqstr(guiname))); - colorsModule->lyxObjectsLB->insertItem(ci); + lcolors_.push_back(lc); + QColor color = QColor(lcolorcache.get(lc)); + prefcolors_.push_back(color.name()); + QPixmap coloritem(32, 32); + coloritem.fill(color); + QListWidgetItem * newItem = new QListWidgetItem(QIcon(coloritem), + toqstr(lcolor.getGUIName(lc)), colorsModule->lyxObjectsLW); } - connect(colorsModule->colorChangePB, SIGNAL(clicked()), this, SLOT(change_color())); - connect(colorsModule->lyxObjectsLB, SIGNAL(selected(int)), this, SLOT(change_color())); + newcolors_ = prefcolors_; + + connect(colorsModule->colorChangePB, SIGNAL(clicked()), + this, SLOT(change_color())); + connect(colorsModule->lyxObjectsLW, SIGNAL(itemActivated(QListWidgetItem*)), + this, SLOT(change_color())); @@ -286,17 +290,28 @@ QPrefsDialog::QPrefsDialog(QPrefs * form) convertersModule = new UiWidget; - connect(convertersModule->converterNewPB, SIGNAL(clicked()), this, SLOT(new_converter())); - connect(convertersModule->converterRemovePB, SIGNAL(clicked()), this, SLOT(remove_converter())); - connect(convertersModule->converterModifyPB, SIGNAL(clicked()), this, SLOT(modify_converter())); - connect(convertersModule->convertersLB, SIGNAL(highlighted(int)), this, SLOT(switch_converter(int))); - connect(convertersModule->converterFromCO, SIGNAL(activated(const QString&)), this, SLOT(converter_changed())); - connect(convertersModule->converterToCO, SIGNAL(activated(const QString&)), this, SLOT(converter_changed())); - connect(convertersModule->converterED, SIGNAL(textChanged(const QString&)), this, SLOT(converter_changed())); - connect(convertersModule->converterFlagED, SIGNAL(textChanged(const QString&)), this, SLOT(converter_changed())); - connect(convertersModule->converterNewPB, SIGNAL(clicked()), this, SLOT(change_adaptor())); - connect(convertersModule->converterRemovePB, SIGNAL(clicked()), this, SLOT(change_adaptor())); - connect(convertersModule->converterModifyPB, SIGNAL(clicked()), this, SLOT(change_adaptor())); + connect(convertersModule->converterNewPB, SIGNAL(clicked()), + this, SLOT(new_converter())); + connect(convertersModule->converterRemovePB, SIGNAL(clicked()), + this, SLOT(remove_converter())); + connect(convertersModule->converterModifyPB, SIGNAL(clicked()), + this, SLOT(modify_converter())); + connect(convertersModule->convertersLW, SIGNAL(currentRowChanged(int)), + this, SLOT(switch_converter(int))); + connect(convertersModule->converterFromCO, SIGNAL(activated(const QString&)), + this, SLOT(converter_changed())); + connect(convertersModule->converterToCO, SIGNAL(activated(const QString&)), + this, SLOT(converter_changed())); + connect(convertersModule->converterED, SIGNAL(textChanged(const QString&)), + this, SLOT(converter_changed())); + connect(convertersModule->converterFlagED, SIGNAL(textChanged(const QString&)), + this, SLOT(converter_changed())); + connect(convertersModule->converterNewPB, SIGNAL(clicked()), + this, SLOT(change_adaptor())); + connect(convertersModule->converterRemovePB, SIGNAL(clicked()), + this, SLOT(change_adaptor())); + connect(convertersModule->converterModifyPB, SIGNAL(clicked()), + this, SLOT(change_adaptor())); @@ -304,7 +319,8 @@ QPrefsDialog::QPrefsDialog(QPrefs * form) connect(copiersModule->copierNewPB, SIGNAL(clicked()), this, SLOT(new_copier())); connect(copiersModule->copierRemovePB, SIGNAL(clicked()), this, SLOT(remove_copier())); connect(copiersModule->copierModifyPB, SIGNAL(clicked()), this, SLOT(modify_copier())); - connect(copiersModule->AllCopiersLB, SIGNAL(highlighted(int)), this, SLOT(switch_copierLB(int))); + connect(copiersModule->AllCopiersLW, SIGNAL(currentRowChanged(int)), + this, SLOT(switch_copierLB(int))); connect(copiersModule->copierFormatCO, SIGNAL(activated(int)), this, SLOT(switch_copierCO(int))); connect(copiersModule->copierNewPB, SIGNAL(clicked()), this, SLOT(change_adaptor())); connect(copiersModule->copierRemovePB, SIGNAL(clicked()), this, SLOT(change_adaptor())); @@ -319,7 +335,8 @@ QPrefsDialog::QPrefsDialog(QPrefs * form) connect(fileformatsModule->formatNewPB, SIGNAL(clicked()), this, SLOT(new_format())); connect(fileformatsModule->formatRemovePB, SIGNAL(clicked()), this, SLOT(remove_format())); connect(fileformatsModule->formatModifyPB, SIGNAL(clicked()), this, SLOT(modify_format())); - connect(fileformatsModule->formatsLB, SIGNAL(highlighted(int)), this, SLOT(switch_format(int))); + connect(fileformatsModule->formatsLW, SIGNAL(currentRowChanged(int)), + this, SLOT(switch_format(int))); connect(fileformatsModule->formatED, SIGNAL(textChanged(const QString&)), this, SLOT(fileformat_changed())); connect(fileformatsModule->guiNameED, SIGNAL(textChanged(const QString&)), this, SLOT(fileformat_changed())); connect(fileformatsModule->shortcutED, SIGNAL(textChanged(const QString&)), this, SLOT(fileformat_changed())); @@ -387,9 +404,9 @@ QPrefsDialog::QPrefsDialog(QPrefs * form) uiModule = new UiWidget; - connect( uiModule->autoSaveCB, SIGNAL( toggled(bool) ), uiModule->autoSaveLA, SLOT( setEnabled(bool) ) ); - connect( uiModule->autoSaveCB, SIGNAL( toggled(bool) ), uiModule->autoSaveSB, SLOT( setEnabled(bool) ) ); - connect( uiModule->autoSaveCB, SIGNAL( toggled(bool) ), uiModule->TextLabel1, SLOT( setEnabled(bool) ) ); + connect(uiModule->autoSaveCB, SIGNAL( toggled(bool) ), uiModule->autoSaveLA, SLOT( setEnabled(bool) ) ); + connect(uiModule->autoSaveCB, SIGNAL( toggled(bool) ), uiModule->autoSaveSB, SLOT( setEnabled(bool) ) ); + connect(uiModule->autoSaveCB, SIGNAL( toggled(bool) ), uiModule->TextLabel1, SLOT( setEnabled(bool) ) ); connect(uiModule->uiFilePB, SIGNAL(clicked()), this, SLOT(select_ui())); connect(uiModule->bindFilePB, SIGNAL(clicked()), this, SLOT(select_bind())); connect(uiModule->uiFileED, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor())); @@ -410,8 +427,6 @@ QPrefsDialog::QPrefsDialog(QPrefs * form) connect(identityModule->emailED, SIGNAL(textChanged(const QString&)), this, SLOT(change_adaptor())); - - string const laf = _("Look and feel"); prefsPS->addCategory(laf); prefsPS->addPanel(uiModule, _("User interface"), laf); @@ -443,7 +458,6 @@ QPrefsDialog::QPrefsDialog(QPrefs * form) prefsPS->setCurrentPanel(_("User interface")); - form_->bcview().setOK(savePB); form_->bcview().setApply(applyPB); form_->bcview().setCancel(closePB); @@ -489,24 +503,27 @@ void QPrefsDialog::updateConverters() convertmod->converterToCO->insertItem(toqstr(cit->prettyname())); } - convertmod->convertersLB->clear(); + convertmod->convertersLW->clear(); Converters::const_iterator ccit = form_->converters().begin(); Converters::const_iterator cend = form_->converters().end(); for (; ccit != cend; ++ccit) { std::string const name = ccit->From->prettyname() + " -> " + ccit->To->prettyname(); - convertmod->convertersLB->insertItem(toqstr(name)); + convertmod->convertersLW->addItem(toqstr(name)); } + convertmod->convertersLW->sortItems(Qt::AscendingOrder); // restore selection if (!current.isEmpty()) { - Q3ListBoxItem * item = convertmod->convertersLB->findItem(current); - convertmod->convertersLB->setCurrentItem(item); + QList const item = + convertmod->convertersLW->findItems(current, Qt::MatchExactly); + if (item.size()>0) + convertmod->convertersLW->setCurrentItem(item.at(0)); } // select first element if restoring failed - if (convertmod->convertersLB->currentItem() == -1) - convertmod->convertersLB->setCurrentItem(0); + if (convertmod->convertersLW->currentRow() == -1) + convertmod->convertersLW->setCurrentRow(0); updateConverterButtons(); } @@ -514,9 +531,12 @@ void QPrefsDialog::updateConverters() void QPrefsDialog::switch_converter(int nr) { + if (nr<0) + return; + Converter const & c(form_->converters().get(nr)); - convertersModule->converterFromCO->setCurrentItem(form_->formats().getNumber(c.from)); - convertersModule->converterToCO->setCurrentItem(form_->formats().getNumber(c.to)); + convertersModule->converterFromCO->setCurrentIndex(form_->formats().getNumber(c.from)); + convertersModule->converterToCO->setCurrentIndex(form_->formats().getNumber(c.to)); convertersModule->converterED->setText(toqstr(c.command)); convertersModule->converterFlagED->setText(toqstr(c.flags)); @@ -542,7 +562,7 @@ void QPrefsDialog::updateConverterButtons() || from.name() == to.name()); Converter const & c(form_->converters().get( - convertersModule->convertersLB->currentItem())); + convertersModule->convertersLW->currentRow())); string const old_command = c.command; string const old_flag = c.flags; string const new_command(fromqstr(convertersModule->converterED->text())); @@ -571,15 +591,14 @@ void QPrefsDialog::new_converter() form_->converters().updateLast(form_->formats()); } updateConverters(); - convertersModule->convertersLB->setCurrentItem(convertersModule->convertersLB->count() - 1); + convertersModule->convertersLW->setCurrentRow(convertersModule->convertersLW->count() - 1); } void QPrefsDialog::modify_converter() { - int const top_item = convertersModule->convertersLB->topItem(); QString const current_text = - convertersModule->convertersLB->currentText(); + convertersModule->convertersLW->currentItem()->text(); Format const & from(form_->formats().get(convertersModule->converterFromCO->currentItem())); Format const & to(form_->formats().get(convertersModule->converterToCO->currentItem())); @@ -593,10 +612,10 @@ void QPrefsDialog::modify_converter() } updateConverters(); - Q3ListBoxItem * const item = - convertersModule->convertersLB->findItem(current_text); - convertersModule->convertersLB->setCurrentItem(item); - convertersModule->convertersLB->setTopItem(top_item); + QList const item = + convertersModule->convertersLW->findItems(current_text, Qt::MatchExactly); + if (item.size()>0) + convertersModule->convertersLW->setCurrentItem(item.at(0)); } @@ -623,7 +642,7 @@ void QPrefsDialog::updateCopiers() } // The browser widget - copiersModule->AllCopiersLB->clear(); + copiersModule->AllCopiersLW->clear(); for (Movers::iterator it = form_->movers().begin(), end = form_->movers().end(); @@ -631,20 +650,21 @@ void QPrefsDialog::updateCopiers() std::string const & command = it->second.command(); if (command.empty()) continue; - std::string const & fmt = it->first; - std::string const & pretty = form_->formats().prettyName(fmt); - - copiersModule->AllCopiersLB->insertItem(toqstr(pretty)); + QString const pretty = toqstr(form_->formats().prettyName(it->first)); + copiersModule->AllCopiersLW->addItem(pretty); } + copiersModule->AllCopiersLW->sortItems(Qt::AscendingOrder); // restore selection if (!current.isEmpty()) { - Q3ListBoxItem * item = copiersModule->AllCopiersLB->findItem(current); - copiersModule->AllCopiersLB->setCurrentItem(item); + QList item = + copiersModule->AllCopiersLW->findItems(current, Qt::MatchExactly); + if (item.size()>0) + copiersModule->AllCopiersLW->setCurrentItem(item.at(0)); } // select first element if restoring failed - if (copiersModule->AllCopiersLB->currentItem() == -1) - copiersModule->AllCopiersLB->setCurrentItem(0); + if (copiersModule->AllCopiersLW->currentRow() == -1) + copiersModule->AllCopiersLW->setCurrentRow(0); } @@ -674,26 +694,27 @@ Format const * getFormat(std::string const & prettyname) } // namespace anon -void QPrefsDialog::switch_copierLB(int) +void QPrefsDialog::switch_copierLB(int row) { + if (row<0) + return; + std::string const browser_text = - fromqstr(copiersModule->AllCopiersLB->currentText()); + fromqstr(copiersModule->AllCopiersLW->currentItem()->text()); Format const * fmt = getFormat(browser_text); if (fmt == 0) return; - string const & fmt_name = fmt->name(); - string const & gui_name = fmt->prettyname(); - string const & command = form_->movers().command(fmt_name); + QString const gui_name = toqstr(fmt->prettyname()); + QString const command = toqstr(form_->movers().command(fmt->name())); copiersModule->copierED->clear(); int const combo_size = copiersModule->copierFormatCO->count(); for (int i = 0; i < combo_size; ++i) { - QString const qtext = copiersModule->copierFormatCO->text(i); - std::string const text = fromqstr(qtext); + QString const text = copiersModule->copierFormatCO->text(i); if (text == gui_name) { - copiersModule->copierFormatCO->setCurrentItem(i); - copiersModule->copierED->setText(toqstr(command)); + copiersModule->copierFormatCO->setCurrentIndex(i); + copiersModule->copierED->setText(command); break; } } @@ -701,32 +722,31 @@ void QPrefsDialog::switch_copierLB(int) } -void QPrefsDialog::switch_copierCO(int) +void QPrefsDialog::switch_copierCO(int row) { + if (row<0) + return; + std::string const combo_text = fromqstr(copiersModule->copierFormatCO->currentText()); Format const * fmt = getFormat(combo_text); if (fmt == 0) return; - string const & fmt_name = fmt->name(); - string const & gui_name = fmt->prettyname(); - string const & command = form_->movers().command(fmt_name); + QString const command = toqstr(form_->movers().command(fmt->name())); + copiersModule->copierED->setText(command); - copiersModule->copierED->setText(toqstr(command)); - - int const index = copiersModule->AllCopiersLB->currentItem(); + QListWidgetItem * const index = copiersModule->AllCopiersLW->currentItem(); if (index >= 0) - copiersModule->AllCopiersLB->setSelected(index, false); + copiersModule->AllCopiersLW->setItemSelected(index, false); - int const browser_size = copiersModule->AllCopiersLB->count(); + QString const gui_name = toqstr(fmt->prettyname()); + int const browser_size = copiersModule->AllCopiersLW->count(); for (int i = 0; i < browser_size; ++i) { - QString const qtext = copiersModule->AllCopiersLB->text(i); - std::string const text = fromqstr(qtext); + QString const text = copiersModule->AllCopiersLW->item(i)->text(); if (text == gui_name) { - copiersModule->AllCopiersLB->setSelected(i, true); - int top = std::max(i - 5, 0); - copiersModule->AllCopiersLB->setTopItem(top); + QListWidgetItem * item = copiersModule->AllCopiersLW->item(i); + copiersModule->AllCopiersLW->setItemSelected(item, true); break; } } @@ -744,8 +764,8 @@ void QPrefsDialog::updateCopierButtons() QString selected = copiersModule->copierFormatCO->currentText(); bool known = false; - for (unsigned int i = 0; i != copiersModule->AllCopiersLB->count(); i++) { - if (copiersModule->AllCopiersLB->text(i) == selected) + for (unsigned int i = 0; i != copiersModule->AllCopiersLW->count(); i++) { + if (copiersModule->AllCopiersLW->item(i)->text() == selected) known = true; } @@ -778,8 +798,8 @@ void QPrefsDialog::new_copier() form_->movers().set(fmt->name(), command); updateCopiers(); - int const last = copiersModule->AllCopiersLB->count() - 1; - copiersModule->AllCopiersLB->setCurrentItem(last); + int const last = copiersModule->AllCopiersLW->count() - 1; + copiersModule->AllCopiersLW->setCurrentRow(last); updateCopierButtons(); } @@ -824,27 +844,32 @@ void QPrefsDialog::updateFormats() // save current selection QString current = formatmod->guiNameED->text(); - formatmod->formatsLB->clear(); + formatmod->formatsLW->clear(); Formats::const_iterator cit = form_->formats().begin(); Formats::const_iterator end = form_->formats().end(); for (; cit != end; ++cit) { - formatmod->formatsLB->insertItem(toqstr(cit->prettyname())); + formatmod->formatsLW->addItem(toqstr(cit->prettyname())); } + formatmod->formatsLW->sortItems(Qt::AscendingOrder); // restore selection if (!current.isEmpty()) { - Q3ListBoxItem * item = formatmod->formatsLB->findItem(current); - formatmod->formatsLB->setCurrentItem(item); + QList item = formatmod->formatsLW->findItems(current, Qt::MatchExactly); + if (item.size()>0) + formatmod->formatsLW->setCurrentItem(item.at(0)); } // select first element if restoring failed - if (formatmod->formatsLB->currentItem() == -1) - formatmod->formatsLB->setCurrentItem(0); + if (formatmod->formatsLW->currentRow() == -1) + formatmod->formatsLW->setCurrentRow(0); } void QPrefsDialog::switch_format(int nr) { + if (nr<0) + return; + Format const & f(form_->formats().get(nr)); fileformatsModule->formatED->setText(toqstr(f.name())); fileformatsModule->guiNameED->setText(toqstr(f.prettyname())); @@ -872,8 +897,8 @@ void QPrefsDialog::updateFormatsButtons() int const sel = form_->formats().getNumber(fromqstr(format)); bool gui_name_known = false; int where = sel; - for (unsigned int i = 0; i != fileformatsModule->formatsLB->count(); i++) { - if (fileformatsModule->formatsLB->text(i) == gui_name) { + for (unsigned int i = 0; i != fileformatsModule->formatsLW->count(); i++) { + if (fileformatsModule->formatsLW->item(i)->text() == gui_name) { gui_name_known = true; where = i; } @@ -887,7 +912,7 @@ void QPrefsDialog::updateFormatsButtons() && !fileformatsModule->guiNameED->text().isEmpty()); Format const & f(form_->formats().get( - fileformatsModule->formatsLB->currentItem())); + fileformatsModule->formatsLW->currentRow())); string const old_pretty(f.prettyname()); string const old_shortcut(f.shortcut()); string const old_extension(f.extension()); @@ -923,7 +948,7 @@ void QPrefsDialog::new_format() form_->formats().add(name, extension, prettyname, shortcut, viewer, editor); form_->formats().sort(); updateFormats(); - fileformatsModule->formatsLB->setCurrentItem(form_->formats().getNumber(name)); + fileformatsModule->formatsLW->setCurrentRow(form_->formats().getNumber(name)); form_->converters().update(form_->formats()); updateConverters(); @@ -933,10 +958,9 @@ void QPrefsDialog::new_format() void QPrefsDialog::modify_format() { - int const top_item = fileformatsModule->formatsLB->topItem(); - int const current_item = fileformatsModule->formatsLB->currentItem(); + int const current_item = fileformatsModule->formatsLW->currentRow(); QString const current_text = - fileformatsModule->formatsLB->currentText(); + fileformatsModule->formatsLW->currentItem()->text(); Format const & oldformat(form_->formats().get(current_item)); string const oldpretty(oldformat.prettyname()); @@ -952,24 +976,24 @@ void QPrefsDialog::modify_format() form_->formats().add(name, extension, prettyname, shortcut, viewer, editor); form_->formats().sort(); - fileformatsModule->formatsLB->setUpdatesEnabled(false); + fileformatsModule->formatsLW->setUpdatesEnabled(false); updateFormats(); - fileformatsModule->formatsLB->setUpdatesEnabled(true); - fileformatsModule->formatsLB->update(); + fileformatsModule->formatsLW->setUpdatesEnabled(true); + fileformatsModule->formatsLW->update(); updateConverters(); updateFormatsButtons(); - Q3ListBoxItem * const item = - fileformatsModule->formatsLB->findItem(current_text); - fileformatsModule->formatsLB->setCurrentItem(item); - fileformatsModule->formatsLB->setTopItem(top_item); + QList const item = + fileformatsModule->formatsLW->findItems(current_text, Qt::MatchExactly); + if (item.size()>0) + fileformatsModule->formatsLW->setCurrentItem(item.at(0)); } void QPrefsDialog::remove_format() { - int const nr(fileformatsModule->formatsLB->currentItem()); + int const nr(fileformatsModule->formatsLW->currentRow()); if (nr < 0) return; string const current_text = form_->formats().get(nr).name(); @@ -990,15 +1014,16 @@ void QPrefsDialog::remove_format() void QPrefsDialog::change_color() { - Q3ListBox * lb(colorsModule->lyxObjectsLB); - if (lb->currentItem() < 0) - return; - Q3ListBoxItem * ib(lb->item(lb->currentItem())); - QColorItem * ci(static_cast(ib)); - QColor c(QColorDialog::getColor(ci->color(), qApp->focusWidget() ? qApp->focusWidget() : qApp->mainWidget())); - if (c.isValid()) { - ci->color(c); - lb->triggerUpdate(true); + int const row = colorsModule->lyxObjectsLW->currentRow(); + QString color = newcolors_[row]; + QColor c(QColorDialog::getColor(QColor(color), + qApp->focusWidget() ? qApp->focusWidget() : qApp->mainWidget())); + + if (c.name()!=color) { + newcolors_[row] = c.name(); + QPixmap coloritem(32, 32); + coloritem.fill(c); + colorsModule->lyxObjectsLW->currentItem()->setIcon(QIcon(coloritem)); change_adaptor(); } } @@ -1285,28 +1310,9 @@ void QPrefsDialog::apply(LyXRC & rc) const } - - - unsigned int i; - for (i = 0; i < colorsModule->lyxObjectsLB->count(); ++i) { - Q3ListBoxItem * ib(colorsModule->lyxObjectsLB->item(i)); - QColorItem * ci(static_cast(ib)); - - LColor::color const col(colors_[i]); - QColor const & qcol(lcolorcache.get(col)); - - // FIXME: dubious, but it's what xforms does - if (qcol != ci->color()) { - ostringstream ostr; - - ostr << '#' << std::setbase(16) << setfill('0') - << setw(2) << ci->color().red() - << setw(2) << ci->color().green() - << setw(2) << ci->color().blue(); - - string newhex(ostr.str()); - form_->controller().setColor(col, newhex); - } + for (int i = 0; i < lcolors_.size(); ++i) { + if (prefcolors_[i]!=newcolors_[i]) + form_->controller().setColor(lcolors_[i], fromqstr(newcolors_[i])); } } @@ -1421,7 +1427,7 @@ void QPrefsDialog::update(LyXRC const & rc) languageModule->endCommandED->setText(toqstr(rc.language_command_end)); int const pos = int(findPos(lang_, rc.default_language)); - languageModule->defaultLanguageCO->setCurrentItem(pos); + languageModule->defaultLanguageCO->setCurrentIndex(pos); uiModule->uiFileED->setText(external_path(rc.ui_file)); uiModule->bindFileED->setText(external_path(rc.bind_file)); @@ -1476,20 +1482,20 @@ void QPrefsDialog::update(LyXRC const & rc) latexModule->latexIndexED->setText(toqstr(rc.index_command)); latexModule->latexAutoresetCB->setChecked(rc.auto_reset_options); latexModule->latexDviPaperED->setText(toqstr(rc.view_dvi_paper_option)); - latexModule->latexPaperSizeCO->setCurrentItem( + latexModule->latexPaperSizeCO->setCurrentIndex( form_->controller().fromPaperSize(rc.default_papersize)); switch (rc.preview) { case LyXRC::PREVIEW_OFF: - displayModule->instantPreviewCO->setCurrentItem(0); + displayModule->instantPreviewCO->setCurrentIndex(0); break; case LyXRC::PREVIEW_NO_MATH : - displayModule->instantPreviewCO->setCurrentItem(1); + displayModule->instantPreviewCO->setCurrentIndex(1); break; case LyXRC::PREVIEW_ON : - displayModule->instantPreviewCO->setCurrentItem(2); + displayModule->instantPreviewCO->setCurrentIndex(2); break; } @@ -1501,7 +1507,7 @@ void QPrefsDialog::update(LyXRC const & rc) case lyx::graphics::MonochromeDisplay: item = 0; break; default: break; } - displayModule->displayGraphicsCO->setCurrentItem(item); + displayModule->displayGraphicsCO->setCurrentIndex(item); @@ -1515,19 +1521,19 @@ void QPrefsDialog::update(LyXRC const & rc) - spellcheckerModule->spellCommandCO->setCurrentItem(0); + spellcheckerModule->spellCommandCO->setCurrentIndex(0); if (rc.isp_command == "ispell") { - spellcheckerModule->spellCommandCO->setCurrentItem(0); + spellcheckerModule->spellCommandCO->setCurrentIndex(0); } else if (rc.isp_command == "aspell") { - spellcheckerModule->spellCommandCO->setCurrentItem(1); + spellcheckerModule->spellCommandCO->setCurrentIndex(1); } else if (rc.isp_command == "hspell") { - spellcheckerModule->spellCommandCO->setCurrentItem(2); + spellcheckerModule->spellCommandCO->setCurrentIndex(2); } if (rc.use_spell_lib) { #if defined(USE_ASPELL) || defined(USE_PSPELL) - spellcheckerModule->spellCommandCO->setCurrentItem(3); + spellcheckerModule->spellCommandCO->setCurrentIndex(3); #endif } diff --git a/src/frontends/qt4/QPrefsDialog.h b/src/frontends/qt4/QPrefsDialog.h index 0d3fcc3c80..6969ebcf57 100644 --- a/src/frontends/qt4/QPrefsDialog.h +++ b/src/frontends/qt4/QPrefsDialog.h @@ -124,7 +124,9 @@ private: /// languages std::vector lang_; - std::vector colors_; + std::vector lcolors_; + std::vector prefcolors_; + std::vector newcolors_; UiWidget * asciiModule; UiWidget * dateModule; diff --git a/src/frontends/qt4/QWorkArea.C b/src/frontends/qt4/QWorkArea.C index b639d8f28f..ec92b42510 100644 --- a/src/frontends/qt4/QWorkArea.C +++ b/src/frontends/qt4/QWorkArea.C @@ -29,7 +29,8 @@ #include #include #include -#include +#include +#include #include #include #include @@ -274,8 +275,8 @@ void QWorkArea::putClipboard(string const & str) const void QWorkArea::dragEnterEvent(QDragEnterEvent * event) { - event->accept(Q3UriDrag::canDecode(event)); - + if (event->mimeData()->hasUrls()) + event->accept(); /// \todo Ask lyx-devel is this is enough: /// if (event->mimeData()->hasFormat("text/plain")) /// event->acceptProposedAction(); @@ -285,16 +286,15 @@ void QWorkArea::dragEnterEvent(QDragEnterEvent * event) void QWorkArea::dropEvent(QDropEvent* event) { - QStringList files; + QList files = event->mimeData()->urls(); + if (files.isEmpty()) + return; - if (Q3UriDrag::decodeLocalFiles(event, files)) { - lyxerr[Debug::GUI] << "QWorkArea::dropEvent: got URIs!" - << endl; - for (QStringList::Iterator i = files.begin(); - i!=files.end(); ++i) { - string const file = os::internal_path(fromqstr(*i)); + lyxerr[Debug::GUI] << "QWorkArea::dropEvent: got URIs!" << endl; + for (int i = 0; i!=files.size(); ++i) { + string const file = os::internal_path(fromqstr(files.at(i).toString())); + if (!file.empty()) view_.view()->workAreaDispatch(FuncRequest(LFUN_FILE_OPEN, file)); - } } } diff --git a/src/frontends/qt4/qcoloritem.C b/src/frontends/qt4/qcoloritem.C deleted file mode 100644 index 279828d50b..0000000000 --- a/src/frontends/qt4/qcoloritem.C +++ /dev/null @@ -1,33 +0,0 @@ -/** - * \file qcoloritem.C - * This file is part of LyX, the document processor. - * Licence details can be found in the file COPYING. - * - * \author John Levon - * - * Full author contact details are available in file CREDITS. - */ - -#include - -#include "qcoloritem.h" - -#include - -QColorItem::QColorItem(QColor c, QString const & t) - : color_(c), text_(t) -{ - QFont font; - QFontMetrics metrics(font); - - ascent_ = metrics.ascent(); - width_ = 40 + metrics.width(t); - height_ = metrics.ascent() + metrics.descent() + 6; -} - - -void QColorItem::paint(QPainter * p) -{ - p->fillRect(2, 2, 35, height_, color_); - p->drawText(40, 3 + ascent_, text_); -} diff --git a/src/frontends/qt4/qcoloritem.h b/src/frontends/qt4/qcoloritem.h deleted file mode 100644 index a82077e3b1..0000000000 --- a/src/frontends/qt4/qcoloritem.h +++ /dev/null @@ -1,54 +0,0 @@ -// -*- C++ -*- -/** - * \file qcoloritem.h - * This file is part of LyX, the document processor. - * Licence details can be found in the file COPYING. - * - * \author John Levon - * - * Full author contact details are available in file CREDITS. - */ - -#ifndef QT_QCOLORITEM_H -#define QT_QCOLORITEM_H - -#include -#include - -class QColorItem : public Q3ListBoxItem { - -public: - QColorItem(QColor c, QString const & text); - - QColor color() { - return color_; - } - - void color(QColor c) { - color_ = c; - } - - virtual int height(const Q3ListBox *) const { - return height_; - } - - virtual int width(const Q3ListBox *) const { - return width_; - } - -protected: - virtual void paint(QPainter * p); - -private: - int ascent_; - - int height_; - - int width_; - - QColor color_; - - QString text_; -}; - -#endif diff --git a/src/frontends/qt4/ui/QAboutUi.ui b/src/frontends/qt4/ui/QAboutUi.ui index 8e0bb375f7..ef2cdb52ca 100644 --- a/src/frontends/qt4/ui/QAboutUi.ui +++ b/src/frontends/qt4/ui/QAboutUi.ui @@ -18,124 +18,126 @@ true - - - - 0 - - - 6 - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 20 - 20 - - - - - - - - - 0 - 0 - 0 - 0 - - - - &Close - - - true - - - - - - - - - 11 - 11 - 305 - 171 - + + + 9 - - - Version - - + + 6 + + + + + + Version + + + + 11 + + + 6 + + + + + QFrame::Box + + + QFrame::Sunken + + + Version goes here + + + Qt::AlignCenter + + + 6 + + + + + + + + Credits + + + + 9 + + + 6 + + + + + + + + + Copyright + + + + 9 + + + 6 + + + + + + + + + + - 11 + 0 6 - - - QFrame::Box + + + Qt::Horizontal - - QFrame::Sunken + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + + + + 0 + 0 + 0 + 0 + - Version goes here + &Close - - Qt::AlignCenter - - - 6 + + true - - - - Credits - - - - 9 - - - 6 - - - - - - - - - Copyright - - - - 9 - - - 6 - - - - - - - + + qPixmapFromMimeSource diff --git a/src/frontends/qt4/ui/QCitationFindUi.ui b/src/frontends/qt4/ui/QCitationFindUi.ui index f160a2f9af..59af7a915d 100644 --- a/src/frontends/qt4/ui/QCitationFindUi.ui +++ b/src/frontends/qt4/ui/QCitationFindUi.ui @@ -28,38 +28,165 @@ - 11 + 9 6 - - - - 0 - - - 6 - - - - - Available bibliography keys - - - Q3ScrollView::AlwaysOn - - - Q3ScrollView::AlwaysOff - - - Q3ListBox::Extended - - - - + + - + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 191 + 20 + + + + + + + + + 0 + 1 + 0 + 0 + + + + &Find: + + + searchED + + + + + + + + 1 + 0 + 0 + 0 + + + + Interpret search entry as a regular expression + + + &Regular Expression + + + + + + + + 3 + 0 + 0 + 0 + + + + &Next + + + 276824142 + + + false + + + + + + + + 1 + 0 + 0 + 0 + + + + Make the search case-sensitive + + + Case &sensitive + + + + + + + + 7 + 0 + 0 + 0 + + + + Browse the available bibliography entries + + + + + + + + 3 + 0 + 0 + 0 + + + + &Previous + + + false + + + + + + + + + + &Add + + + false + + + true + + + + + + + Cancel + + + false + + + + Qt::Horizontal @@ -75,190 +202,10 @@ - - - - Cancel - - - false - - - - - - - &Add - - - false - - - true - - - - - - - 0 - - - 6 - - - - - - 3 - 0 - 0 - 0 - - - - &Previous - - - false - - - - - - - - 7 - 0 - 0 - 0 - - - - Browse the available bibliography entries - - - - - - - - 1 - 0 - 0 - 0 - - - - Make the search case-sensitive - - - Case &sensitive - - - - - - - - 3 - 0 - 0 - 0 - - - - &Next - - - 276824142 - - - false - - - - - - - 0 - - - 6 - - - - - - 0 - 1 - 0 - 0 - - - - &Find: - - - searchED - - - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 20 - 20 - - - - - - - - - - - 1 - 0 - 0 - 0 - - - - Interpret search entry as a regular expression - - - &Regular Expression - - - - - - - - qPixmapFromMimeSource - - - Q3ListBox - -
q3listbox.h
- 0 - -
-
- availableLB searchED searchCaseCB searchTypeCB diff --git a/src/frontends/qt4/ui/QPrefColorsUi.ui b/src/frontends/qt4/ui/QPrefColorsUi.ui index 63fcd61a67..9209d1555b 100644 --- a/src/frontends/qt4/ui/QPrefColorsUi.ui +++ b/src/frontends/qt4/ui/QPrefColorsUi.ui @@ -8,90 +8,21 @@ 0 0 - 289 - 259 + 226 + 289 - + - 11 + 9 6 - - - - 0 - - - 6 - - - - - &Colors - - - lyxObjectsLB - - - - - - - Q3ScrollView::AutoOneFit - - - Q3ScrollView::AlwaysOn - - - Q3ScrollView::AlwaysOff - - - Q3ListBox::FitToHeight - - - - - - - 0 - - - 6 - - - - - &Alter... - - - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 20 - 20 - - - - - - - - - + Qt::Horizontal @@ -101,24 +32,61 @@ - 20 - 20 + 116 + 271 + + + + &Colors + + + lyxObjectsLW + + + + + + + + + + 0 + + + 6 + + + + + &Alter... + + + + + + + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 20 + 20 + + + + + + qPixmapFromMimeSource - - - Q3ListBox - -
q3listbox.h
- 0 - -
-
diff --git a/src/frontends/qt4/ui/QPrefConvertersUi.ui b/src/frontends/qt4/ui/QPrefConvertersUi.ui index a4c5b3d19f..274e118bc1 100644 --- a/src/frontends/qt4/ui/QPrefConvertersUi.ui +++ b/src/frontends/qt4/ui/QPrefConvertersUi.ui @@ -8,8 +8,8 @@ 0 0 - 472 - 265 + 468 + 335 @@ -17,103 +17,172 @@ - 11 + 9 6 - - + + + + Qt::Horizontal + + + + 40 + 291 + + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 323 + 71 + + + + + + 0 6 - - - - 0 - - - 6 - - - - - - 3 - 0 - 0 - 0 - - - - - - - - C&onverter: - - - converterED - - - - - - - - 3 - 0 - 0 - 0 - - - - - - - - - - - &To:[[as in 'From format x to format y']] - - - converterToCO - - - - - - - &From: - - - converterFromCO - - - - - - - - - - E&xtra flag: - - - converterFlagED - - - - - - + - Qt::Vertical + Qt::Horizontal + + + QSizePolicy::Expanding + + + + 111 + 31 + + + + + + + + A&dd + + + + + + + &Modify + + + + + + + + + + 3 + 0 + 0 + 0 + + + + + + + + C&onverter: + + + converterED + + + + + + + + 3 + 0 + 0 + 0 + + + + + + + + <html><head><meta name="qrichtext" content="1" /></head><body style=" white-space: pre-wrap; font-family:Sans Serif; font-size:9pt; font-weight:400; font-style:normal; text-decoration:none;"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">[[as in 'From format x to format y']]</p></body></html> + + + &To: + + + converterToCO + + + + + + + &From: + + + converterFromCO + + + + + + + + + + E&xtra flag: + + + converterFlagED + + + + + + + &Converters + + + convertersLW + + + + + + + 0 + + + 6 + + + + + Qt::Horizontal QSizePolicy::Expanding @@ -126,133 +195,25 @@ - - - - 0 + + + + &Remove - - 6 - - - - - A&dd - - - - - - - &Modify - - - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 20 - 20 - - - - - + - - - - 0 - - - 6 - - - - - &Converters - - - convertersLB - - - - - - - 0 - - - 6 - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 20 - 20 - - - - - - - - &Remove - - - - - - - - - - 5 - 7 - 0 - 0 - - - - Q3ScrollView::AlwaysOn - - - Q3ScrollView::AlwaysOff - - - - + + + + + qPixmapFromMimeSource - - - Q3ListBox - -
q3listbox.h
- 0 - -
-
- convertersLB converterFromCO converterToCO converterED diff --git a/src/frontends/qt4/ui/QPrefCopiersUi.ui b/src/frontends/qt4/ui/QPrefCopiersUi.ui index f530024b92..6e4b13aa3a 100644 --- a/src/frontends/qt4/ui/QPrefCopiersUi.ui +++ b/src/frontends/qt4/ui/QPrefCopiersUi.ui @@ -8,8 +8,8 @@ 0 0 - 428 - 261 + 423 + 260 @@ -17,182 +17,89 @@ - 11 + 9 6 - - + + + + Qt::Horizontal + + + + 40 + 20 + + + + + + 0 6 - - - - - 5 - 7 - 0 - 0 - + + + + Qt::Horizontal - - Q3ScrollView::Auto + + QSizePolicy::Expanding - - Q3ScrollView::AlwaysOff + + + 90 + 31 + + + + + + + + &Add - - - - 0 - - - 6 - - - - - Qt::Horizontal - - - QSizePolicy::Preferred - - - - 20 - 20 - - - - - - - - &Remove - - - - - - - + + - C&opiers - - - AllCopiersLB + &Modify - - + + + + C&opiers + + + AllCopiersLW + + + + + 0 6 - - - - 0 - - - 6 - - - - - &Add - - - - - - - &Modify - - - - - - - Qt::Horizontal - - - QSizePolicy::Expanding - - - - 20 - 20 - - - - - - - - - - 0 - - - 6 - - - - - - 3 - 0 - 0 - 0 - - - - - - - - &Copier: - - - copierED - - - - - - - &Format: - - - copierFormatCO - - - - - - - - - + - Qt::Vertical + Qt::Horizontal - QSizePolicy::Expanding + QSizePolicy::Preferred @@ -202,22 +109,73 @@ + + + + &Remove + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 278 + 20 + + + + + + + + &Copier: + + + copierED + + + + + + + &Format: + + + copierFormatCO + + + + + + + + 3 + 0 + 0 + 0 + + + + + + + + + + qPixmapFromMimeSource - - - Q3ListBox - -
q3listbox.h
- 0 - -
-
- AllCopiersLB copierFormatCO copierED copierNewPB diff --git a/src/frontends/qt4/ui/QPrefFileformatsUi.ui b/src/frontends/qt4/ui/QPrefFileformatsUi.ui index cc8c6e68de..df44ed9814 100644 --- a/src/frontends/qt4/ui/QPrefFileformatsUi.ui +++ b/src/frontends/qt4/ui/QPrefFileformatsUi.ui @@ -8,8 +8,8 @@ 0 0 - 419 - 261 + 351 + 340 @@ -17,12 +17,71 @@ - 11 + 9 6 - + + + + Qt::Horizontal + + + + 91 + 20 + + + + + + + + Qt::Horizontal + + + QSizePolicy::MinimumExpanding + + + + 20 + 31 + + + + + + + + &Add + + + + + + + &Modify + + + + + + + Qt::Vertical + + + QSizePolicy::Expanding + + + + 129 + 31 + + + + + 0 @@ -110,7 +169,7 @@
- + 0 @@ -118,27 +177,13 @@ 6 - - - - &Add - - - - - - - &Modify - - - Qt::Horizontal - QSizePolicy::MinimumExpanding + QSizePolicy::Preferred @@ -148,125 +193,32 @@ - - - - - - Qt::Vertical - - - QSizePolicy::Expanding - - - - 20 - 20 - - - - - - - - 0 - - - 6 - - + - &File formats - - - formatsLB + &Remove - - - - - 5 - 7 - 0 - 0 - - - - Q3ScrollView::AlwaysOn - - - Q3ScrollView::AlwaysOff - - - - - - - 0 - - - 6 - - - - - Qt::Horizontal - - - QSizePolicy::Preferred - - - - 20 - 20 - - - - - - - - &Remove - - - - - - - - - Qt::Horizontal + + + + + + + &File formats - - QSizePolicy::Minimum + + formatsLW - - - 20 - 20 - - - +
qPixmapFromMimeSource - - - Q3ListBox - -
q3listbox.h
- 0 - -
-
- formatsLB formatNewPB formatRemovePB formatED