these dialogs + associated files Index: src/frontends/qt4/ui/QErrorListUi.ui Index: src/frontends/qt4/ui/QSendtoUi.ui Index: src/frontends/qt4/ui/QSpellcheckerUi.ui Index: src/frontends/qt4/ui/QTexinfoUi.ui Index: src/frontends/qt4/ui/QRefUi.ui
Index: src/frontends/qt4/QSpellcheckerDialog.h =================================================================== --- src/frontends/qt4/QSpellcheckerDialog.h (revision 13790) +++ src/frontends/qt4/QSpellcheckerDialog.h (working copy) @@ -17,6 +17,8 @@ #include <QDialog> #include <QCloseEvent> +class QListWidgetItem; + namespace lyx { namespace frontend { @@ -27,7 +29,7 @@ public: QSpellcheckerDialog(QSpellchecker * form); public slots: - virtual void suggestionChanged(const QString &); + virtual void suggestionChanged(QListWidgetItem *); protected slots: virtual void acceptClicked(); Index: src/frontends/qt4/QSendto.C =================================================================== --- src/frontends/qt4/QSendto.C (revision 13790) +++ src/frontends/qt4/QSendto.C (working copy) @@ -19,8 +19,8 @@ #include "controllers/ControlSendto.h" -#include <q3listbox.h> -#include <qpushbutton.h> +#include <QListWidget> +#include <QPushButton> using std::vector; using std::string; @@ -65,11 +65,11 @@ } // Reload the browser - dialog_->formatLB->clear(); + dialog_->formatLW->clear(); for (vector<string>::const_iterator it = keys.begin(); it < keys.end(); ++it) { - dialog_->formatLB->insertItem(toqstr(*it)); + dialog_->formatLW->addItem(toqstr(*it)); } dialog_->commandCO->insertItem(toqstr(controller().getCommand())); @@ -78,9 +78,9 @@ void QSendto::apply() { - int const line(dialog_->formatLB->currentItem()); + int const line(dialog_->formatLW->currentRow()); - if (line < 0 || line > int(dialog_->formatLB->count())) + if (line < 0 || line > int(dialog_->formatLW->count())) return; string const cmd(fromqstr(dialog_->commandCO->currentText())); @@ -92,12 +92,12 @@ bool QSendto::isValid() { - int const line(dialog_->formatLB->currentItem()); + int const line(dialog_->formatLW->currentRow()); - if (line < 0 || line > int(dialog_->formatLB->count())) + if (line < 0 || line > int(dialog_->formatLW->count())) return false; - else return dialog_->formatLB->count() != 0 && + else return dialog_->formatLW->count() != 0 && !dialog_->commandCO->currentText().isEmpty(); } Index: src/frontends/qt4/QSendtoDialog.C =================================================================== --- src/frontends/qt4/QSendtoDialog.C (revision 13790) +++ src/frontends/qt4/QSendtoDialog.C (working copy) @@ -13,8 +13,7 @@ #include "QSendtoDialog.h" #include "QSendto.h" -#include <qpushbutton.h> -//Added by qt3to4: +#include <QPushButton> #include <QCloseEvent> @@ -33,10 +32,14 @@ connect(closePB, SIGNAL(clicked()), form, SLOT(slotClose())); - connect( formatLB, SIGNAL( highlighted(const QString&) ), this, SLOT( slotFormatHighlighted(const QString&) ) ); - connect( formatLB, SIGNAL( selected(const QString&) ), this, SLOT( slotFormatSelected(const QString&) ) ); - connect( formatLB, SIGNAL( highlighted(const QString&) ), this, SLOT( changed_adaptor() ) ); - connect( commandCO, SIGNAL( textChanged(const QString&) ), this, SLOT( changed_adaptor() ) ); + connect( formatLW, SIGNAL( itemClicked(QListWidgetItem *) ), + this, SLOT( slotFormatHighlighted(QListWidgetItem *) ) ); + connect( formatLW, SIGNAL( itemActivated(QListWidgetItem *) ), + this, SLOT( slotFormatSelected(QListWidgetItem *) ) ); + connect( formatLW, SIGNAL( itemClicked(QListWidgetItem *) ), + this, SLOT( changed_adaptor() ) ); + connect( commandCO, SIGNAL( textChanged(const QString&) ), + this, SLOT( changed_adaptor() ) ); } Index: src/frontends/qt4/ui/QErrorListUi.ui =================================================================== --- src/frontends/qt4/ui/QErrorListUi.ui (revision 13790) +++ src/frontends/qt4/ui/QErrorListUi.ui (working copy) @@ -8,8 +8,8 @@ <rect> <x>0</x> <y>0</y> - <width>349</width> - <height>367</height> + <width>367</width> + <height>459</height> </rect> </property> <property name="windowTitle" > @@ -20,21 +20,26 @@ </property> <layout class="QGridLayout" > <property name="margin" > - <number>11</number> + <number>9</number> </property> <property name="spacing" > <number>6</number> </property> - <item row="0" column="0" colspan="2" > - <widget class="Q3ListBox" name="errorsLB" /> - </item> - <item row="2" column="1" > - <widget class="QPushButton" name="closePB" > - <property name="text" > - <string>&Close</string> + <item row="1" column="0" colspan="2" > + <widget class="QTextBrowser" name="descriptionTB" > + <property name="sizePolicy" > + <sizepolicy> + <hsizetype>7</hsizetype> + <vsizetype>5</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> </property> </widget> </item> + <item row="0" column="0" colspan="2" > + <widget class="QListWidget" name="errorsLW" /> + </item> <item row="2" column="0" > <spacer> <property name="orientation" > @@ -51,28 +56,16 @@ </property> </spacer> </item> - <item row="1" column="0" colspan="2" > - <widget class="Q3TextBrowser" name="descriptionTB" /> + <item row="2" column="1" > + <widget class="QPushButton" name="closePB" > + <property name="text" > + <string>&Close</string> + </property> + </widget> </item> </layout> </widget> <pixmapfunction>qPixmapFromMimeSource</pixmapfunction> - <customwidgets> - <customwidget> - <class>Q3ListBox</class> - <extends></extends> - <header>q3listbox.h</header> - <container>0</container> - <pixmap></pixmap> - </customwidget> - <customwidget> - <class>Q3TextBrowser</class> - <extends>QWidget</extends> - <header>q3textbrowser.h</header> - <container>1</container> - <pixmap></pixmap> - </customwidget> - </customwidgets> <resources/> <connections/> </ui> Index: src/frontends/qt4/ui/QSendtoUi.ui =================================================================== --- src/frontends/qt4/ui/QSendtoUi.ui (revision 13790) +++ src/frontends/qt4/ui/QSendtoUi.ui (working copy) @@ -20,29 +20,45 @@ </property> <layout class="QGridLayout" > <property name="margin" > - <number>11</number> + <number>9</number> </property> <property name="spacing" > <number>6</number> </property> - <item row="2" column="0" > - <widget class="QLabel" name="commandLA" > - <property name="text" > - <string>&Command:</string> + <item row="1" column="0" > + <widget class="QListWidget" name="formatLW" /> + </item> + <item row="3" column="0" > + <widget class="QComboBox" name="commandCO" > + <property name="sizePolicy" > + <sizepolicy> + <hsizetype>3</hsizetype> + <vsizetype>0</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> </property> - <property name="buddy" > - <cstring>commandCO</cstring> + <property name="focusPolicy" > + <enum>Qt::StrongFocus</enum> </property> - </widget> - </item> - <item row="0" column="0" > - <widget class="QLabel" name="formatLA" > - <property name="text" > - <string>&Export formats:</string> + <property name="toolTip" > + <string>Process the converted file with this command ($$FName = file name)</string> </property> - <property name="buddy" > - <cstring>formatLB</cstring> + <property name="editable" > + <bool>true</bool> </property> + <property name="maxCount" > + <number>666</number> + </property> + <property name="insertPolicy" > + <enum>QComboBox::InsertAtTop</enum> + </property> + <property name="autoCompletion" > + <bool>true</bool> + </property> + <property name="duplicatesEnabled" > + <bool>false</bool> + </property> </widget> </item> <item row="4" column="0" > @@ -82,66 +98,30 @@ </item> </layout> </item> - <item row="3" column="0" > - <widget class="QComboBox" name="commandCO" > - <property name="sizePolicy" > - <sizepolicy> - <hsizetype>3</hsizetype> - <vsizetype>0</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> + <item row="0" column="0" > + <widget class="QLabel" name="formatLA" > + <property name="text" > + <string>&Export formats:</string> </property> - <property name="focusPolicy" > - <enum>Qt::StrongFocus</enum> + <property name="buddy" > + <cstring>formatLW</cstring> </property> - <property name="toolTip" > - <string>Process the converted file with this command ($$FName = file name)</string> - </property> - <property name="editable" > - <bool>true</bool> - </property> - <property name="maxCount" > - <number>666</number> - </property> - <property name="insertPolicy" > - <enum>QComboBox::InsertAtTop</enum> - </property> - <property name="autoCompletion" > - <bool>true</bool> - </property> - <property name="duplicatesEnabled" > - <bool>false</bool> - </property> </widget> </item> - <item row="1" column="0" > - <widget class="Q3ListBox" name="formatLB" > - <property name="maximumSize" > - <size> - <width>32767</width> - <height>32767</height> - </size> + <item row="2" column="0" > + <widget class="QLabel" name="commandLA" > + <property name="text" > + <string>&Command:</string> </property> - <property name="toolTip" > - <string>Available export converters</string> + <property name="buddy" > + <cstring>commandCO</cstring> </property> </widget> </item> </layout> </widget> <pixmapfunction>qPixmapFromMimeSource</pixmapfunction> - <customwidgets> - <customwidget> - <class>Q3ListBox</class> - <extends></extends> - <header>q3listbox.h</header> - <container>0</container> - <pixmap></pixmap> - </customwidget> - </customwidgets> <tabstops> - <tabstop>formatLB</tabstop> <tabstop>okPB</tabstop> <tabstop>applyPB</tabstop> <tabstop>closePB</tabstop> Index: src/frontends/qt4/ui/QSpellcheckerUi.ui =================================================================== --- src/frontends/qt4/ui/QSpellcheckerUi.ui (revision 13790) +++ src/frontends/qt4/ui/QSpellcheckerUi.ui (working copy) @@ -9,7 +9,7 @@ <x>0</x> <y>0</y> <width>323</width> - <height>389</height> + <height>359</height> </rect> </property> <property name="windowTitle" > @@ -20,22 +20,29 @@ </property> <layout class="QGridLayout" > <property name="margin" > - <number>11</number> + <number>9</number> </property> <property name="spacing" > <number>6</number> </property> - <item row="4" column="0" colspan="2" > + <item row="10" column="1" > + <widget class="QPushButton" name="closePB" > + <property name="text" > + <string>&Close</string> + </property> + </widget> + </item> + <item row="4" column="0" > <widget class="QLabel" name="TextLabel2" > <property name="text" > <string>Suggestions:</string> </property> <property name="buddy" > - <cstring>suggestionsLB</cstring> + <cstring></cstring> </property> </widget> </item> - <item row="3" column="2" > + <item row="3" column="1" > <widget class="QPushButton" name="replacePB" > <property name="toolTip" > <string>Replace word with current choice</string> @@ -45,7 +52,7 @@ </property> </widget> </item> - <item row="7" column="2" > + <item row="7" column="1" > <widget class="QPushButton" name="addPB" > <property name="toolTip" > <string>Add the word to your personal dictionary</string> @@ -55,7 +62,7 @@ </property> </widget> </item> - <item row="5" column="2" > + <item row="5" column="1" > <widget class="QPushButton" name="ignorePB" > <property name="toolTip" > <string>Ignore this word</string> @@ -65,7 +72,7 @@ </property> </widget> </item> - <item row="6" column="2" > + <item row="6" column="1" > <widget class="QPushButton" name="replacePB_3" > <property name="toolTip" > <string>Ignore this word throughout this session</string> @@ -75,46 +82,9 @@ </property> </widget> </item> - <item row="10" column="1" > + <item row="8" column="1" > <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 row="10" column="2" > - <widget class="QPushButton" name="closePB" > - <property name="text" > - <string>&Close</string> - </property> - </widget> - </item> - <item row="9" column="0" colspan="2" > - <widget class="Q3ProgressBar" name="spellcheckPR" > - <property name="toolTip" > - <string>Proportion of document checked</string> - </property> - </widget> - </item> - <item rowspan="4" row="5" column="0" colspan="2" > - <widget class="Q3ListBox" name="suggestionsLB" > - <property name="toolTip" > - <string>Suggestions</string> - </property> - </widget> - </item> - <item row="8" column="2" > - <spacer> - <property name="orientation" > <enum>Qt::Vertical</enum> </property> <property name="sizeType" > @@ -128,7 +98,7 @@ </property> </spacer> </item> - <item row="2" column="0" colspan="2" > + <item row="2" column="0" > <widget class="QLabel" name="TextLabel1" > <property name="text" > <string>Replacement:</string> @@ -138,7 +108,7 @@ </property> </widget> </item> - <item row="1" column="0" colspan="2" > + <item row="1" column="0" > <widget class="QLineEdit" name="wordED" > <property name="toolTip" > <string>Current word</string> @@ -155,7 +125,7 @@ </property> </widget> </item> - <item row="3" column="0" colspan="2" > + <item row="3" column="0" > <widget class="QComboBox" name="replaceCO" > <property name="sizePolicy" > <sizepolicy> @@ -185,29 +155,25 @@ </property> </widget> </item> + <item rowspan="4" row="5" column="0" > + <widget class="QListWidget" name="suggestionsLW" /> + </item> + <item row="9" column="0" > + <widget class="QProgressBar" name="spellcheckPR" > + <property name="value" > + <number>24</number> + </property> + <property name="orientation" > + <enum>Qt::Horizontal</enum> + </property> + </widget> + </item> </layout> </widget> <pixmapfunction>qPixmapFromMimeSource</pixmapfunction> - <customwidgets> - <customwidget> - <class>Q3ListBox</class> - <extends></extends> - <header>q3listbox.h</header> - <container>0</container> - <pixmap></pixmap> - </customwidget> - <customwidget> - <class>Q3ProgressBar</class> - <extends>QWidget</extends> - <header>q3progressbar.h</header> - <container>1</container> - <pixmap></pixmap> - </customwidget> - </customwidgets> <tabstops> <tabstop>wordED</tabstop> <tabstop>replaceCO</tabstop> - <tabstop>suggestionsLB</tabstop> <tabstop>replacePB</tabstop> <tabstop>ignorePB</tabstop> <tabstop>replacePB_3</tabstop> Index: src/frontends/qt4/ui/QTexinfoUi.ui =================================================================== --- src/frontends/qt4/ui/QTexinfoUi.ui (revision 13790) +++ src/frontends/qt4/ui/QTexinfoUi.ui (working copy) @@ -18,14 +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> + <item row="1" column="0" > + <widget class="QListWidget" name="fileList" /> + </item> + <item row="3" column="0" > <layout class="QHBoxLayout" > <property name="margin" > <number>0</number> @@ -34,28 +37,6 @@ <number>6</number> </property> <item> - <widget class="QComboBox" name="whatStyle" > - <property name="toolTip" > - <string>Selected classes or styles</string> - </property> - <item> - <property name="text" > - <string>LaTeX classes</string> - </property> - </item> - <item> - <property name="text" > - <string>LaTeX styles</string> - </property> - </item> - <item> - <property name="text" > - <string>BibTeX styles</string> - </property> - </item> - </widget> - </item> - <item> <spacer> <property name="orientation" > <enum>Qt::Horizontal</enum> @@ -72,25 +53,18 @@ </spacer> </item> <item> - <widget class="QCheckBox" name="path" > + <widget class="QPushButton" name="closePB" > <property name="toolTip" > - <string>Toggles view of the file list</string> + <string>Close this dialog</string> </property> <property name="text" > - <string>Show &path</string> + <string>&Close</string> </property> </widget> </item> </layout> </item> - <item> - <widget class="Q3ListBox" name="fileList" > - <property name="toolTip" > - <string>Installed files</string> - </property> - </widget> - </item> - <item> + <item row="2" column="0" > <layout class="QHBoxLayout" > <property name="margin" > <number>0</number> @@ -139,7 +113,7 @@ </item> </layout> </item> - <item> + <item row="0" column="0" > <layout class="QHBoxLayout" > <property name="margin" > <number>0</number> @@ -148,6 +122,28 @@ <number>6</number> </property> <item> + <widget class="QComboBox" name="whatStyle" > + <property name="toolTip" > + <string>Selected classes or styles</string> + </property> + <item> + <property name="text" > + <string>LaTeX classes</string> + </property> + </item> + <item> + <property name="text" > + <string>LaTeX styles</string> + </property> + </item> + <item> + <property name="text" > + <string>BibTeX styles</string> + </property> + </item> + </widget> + </item> + <item> <spacer> <property name="orientation" > <enum>Qt::Horizontal</enum> @@ -164,12 +160,12 @@ </spacer> </item> <item> - <widget class="QPushButton" name="closePB" > + <widget class="QCheckBox" name="path" > <property name="toolTip" > - <string>Close this dialog</string> + <string>Toggles view of the file list</string> </property> <property name="text" > - <string>&Close</string> + <string>Show &path</string> </property> </widget> </item> @@ -178,19 +174,9 @@ </layout> </widget> <pixmapfunction>qPixmapFromMimeSource</pixmapfunction> - <customwidgets> - <customwidget> - <class>Q3ListBox</class> - <extends></extends> - <header>q3listbox.h</header> - <container>0</container> - <pixmap></pixmap> - </customwidget> - </customwidgets> <tabstops> <tabstop>whatStyle</tabstop> <tabstop>path</tabstop> - <tabstop>fileList</tabstop> <tabstop>rescanPB</tabstop> <tabstop>viewPB</tabstop> <tabstop>closePB</tabstop> Index: src/frontends/qt4/ui/QRefUi.ui =================================================================== --- src/frontends/qt4/ui/QRefUi.ui (revision 13790) +++ src/frontends/qt4/ui/QRefUi.ui (working copy) @@ -20,12 +20,37 @@ </property> <layout class="QGridLayout" > <property name="margin" > - <number>11</number> + <number>9</number> </property> <property name="spacing" > <number>6</number> </property> - <item row="2" column="1" colspan="2" > + <item row="1" column="0" colspan="3" > + <widget class="QListWidget" name="refsLW" /> + </item> + <item row="0" column="2" > + <widget class="QComboBox" name="bufferCO" > + <property name="sizePolicy" > + <sizepolicy> + <hsizetype>7</hsizetype> + <vsizetype>0</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> + </property> + </widget> + </item> + <item row="0" column="0" colspan="2" > + <widget class="QLabel" name="refsL" > + <property name="text" > + <string>La&bels in:</string> + </property> + <property name="buddy" > + <cstring>bufferCO</cstring> + </property> + </widget> + </item> + <item row="6" column="0" colspan="3" > <layout class="QHBoxLayout" > <property name="margin" > <number>0</number> @@ -34,56 +59,99 @@ <number>6</number> </property> <item> - <widget class="QPushButton" name="updatePB" > - <property name="sizePolicy" > - <sizepolicy> - <hsizetype>3</hsizetype> - <vsizetype>0</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> + <spacer> + <property name="orientation" > + <enum>Qt::Horizontal</enum> </property> - <property name="toolTip" > - <string>Update the label list</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="okPB" > <property name="text" > - <string>&Update</string> + <string>&OK</string> </property> + <property name="default" > + <bool>true</bool> + </property> </widget> </item> <item> - <widget class="QPushButton" name="gotoPB" > - <property name="sizePolicy" > - <sizepolicy> - <hsizetype>3</hsizetype> - <vsizetype>0</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> + <widget class="QPushButton" name="applyPB" > + <property name="text" > + <string>&Apply</string> </property> - <property name="toolTip" > - <string>Jump to the label</string> + <property name="default" > + <bool>true</bool> </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="closePB" > <property name="text" > - <string>&Go to Label</string> + <string>&Close</string> </property> </widget> </item> </layout> </item> - <item row="2" column="0" > - <widget class="QCheckBox" name="sortCB" > - <property name="toolTip" > - <string>Sort labels in alphabetical order</string> + <item row="5" column="1" colspan="2" > + <widget class="QLineEdit" name="nameED" > + <property name="enabled" > + <bool>false</bool> </property> + </widget> + </item> + <item row="5" column="0" > + <widget class="QLabel" name="nameL" > + <property name="enabled" > + <bool>false</bool> + </property> <property name="text" > - <string>&Sort</string> + <string>&Name:</string> </property> + <property name="alignment" > + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> + </property> + <property name="buddy" > + <cstring>nameED</cstring> + </property> </widget> </item> - <item row="3" column="1" colspan="2" > - <widget class="QLineEdit" name="referenceED" /> + <item row="4" column="0" > + <widget class="QLabel" name="typeLA" > + <property name="text" > + <string>&Format:</string> + </property> + <property name="alignment" > + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> + </property> + <property name="buddy" > + <cstring>typeLA</cstring> + </property> + </widget> </item> + <item row="3" column="0" > + <widget class="QLabel" name="referenceL" > + <property name="text" > + <string>&Label:</string> + </property> + <property name="alignment" > + <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> + </property> + <property name="buddy" > + <cstring>referenceED</cstring> + </property> + </widget> + </item> <item row="4" column="1" colspan="2" > <widget class="QComboBox" name="typeCO" > <property name="sizePolicy" > @@ -129,56 +197,20 @@ </item> </widget> </item> - <item row="3" column="0" > - <widget class="QLabel" name="referenceL" > - <property name="text" > - <string>&Label:</string> - </property> - <property name="alignment" > - <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> - </property> - <property name="buddy" > - <cstring>referenceED</cstring> - </property> - </widget> + <item row="3" column="1" colspan="2" > + <widget class="QLineEdit" name="referenceED" /> </item> - <item row="4" column="0" > - <widget class="QLabel" name="typeLA" > - <property name="text" > - <string>&Format:</string> + <item row="2" column="0" > + <widget class="QCheckBox" name="sortCB" > + <property name="toolTip" > + <string>Sort labels in alphabetical order</string> </property> - <property name="alignment" > - <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> - </property> - <property name="buddy" > - <cstring>typeLA</cstring> - </property> - </widget> - </item> - <item row="5" column="0" > - <widget class="QLabel" name="nameL" > - <property name="enabled" > - <bool>false</bool> - </property> <property name="text" > - <string>&Name:</string> + <string>&Sort</string> </property> - <property name="alignment" > - <set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set> - </property> - <property name="buddy" > - <cstring>nameED</cstring> - </property> </widget> </item> - <item row="5" column="1" colspan="2" > - <widget class="QLineEdit" name="nameED" > - <property name="enabled" > - <bool>false</bool> - </property> - </widget> - </item> - <item row="6" column="0" colspan="3" > + <item row="2" column="1" colspan="2" > <layout class="QHBoxLayout" > <property name="margin" > <number>0</number> @@ -187,105 +219,48 @@ <number>6</number> </property> <item> - <spacer> - <property name="orientation" > - <enum>Qt::Horizontal</enum> + <widget class="QPushButton" name="updatePB" > + <property name="sizePolicy" > + <sizepolicy> + <hsizetype>3</hsizetype> + <vsizetype>0</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> </property> - <property name="sizeType" > - <enum>QSizePolicy::Expanding</enum> + <property name="toolTip" > + <string>Update the label list</string> </property> - <property name="sizeHint" > - <size> - <width>20</width> - <height>20</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QPushButton" name="okPB" > <property name="text" > - <string>&OK</string> + <string>&Update</string> </property> - <property name="default" > - <bool>true</bool> - </property> </widget> </item> <item> - <widget class="QPushButton" name="applyPB" > - <property name="text" > - <string>&Apply</string> + <widget class="QPushButton" name="gotoPB" > + <property name="sizePolicy" > + <sizepolicy> + <hsizetype>3</hsizetype> + <vsizetype>0</vsizetype> + <horstretch>0</horstretch> + <verstretch>0</verstretch> + </sizepolicy> </property> - <property name="default" > - <bool>true</bool> + <property name="toolTip" > + <string>Jump to the label</string> </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="closePB" > <property name="text" > - <string>&Close</string> + <string>&Go to Label</string> </property> </widget> </item> </layout> </item> - <item row="1" column="0" colspan="3" > - <widget class="Q3ListBox" name="refsLB" > - <property name="enabled" > - <bool>true</bool> - </property> - <property name="sizePolicy" > - <sizepolicy> - <hsizetype>7</hsizetype> - <vsizetype>3</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - <property name="toolTip" > - <string>Available labels</string> - </property> - </widget> - </item> - <item row="0" column="0" colspan="2" > - <widget class="QLabel" name="refsL" > - <property name="text" > - <string>La&bels in:</string> - </property> - <property name="buddy" > - <cstring>bufferCO</cstring> - </property> - </widget> - </item> - <item row="0" column="2" > - <widget class="QComboBox" name="bufferCO" > - <property name="sizePolicy" > - <sizepolicy> - <hsizetype>7</hsizetype> - <vsizetype>0</vsizetype> - <horstretch>0</horstretch> - <verstretch>0</verstretch> - </sizepolicy> - </property> - </widget> - </item> </layout> </widget> <pixmapfunction>qPixmapFromMimeSource</pixmapfunction> - <customwidgets> - <customwidget> - <class>Q3ListBox</class> - <extends></extends> - <header>q3listbox.h</header> - <container>0</container> - <pixmap></pixmap> - </customwidget> - </customwidgets> <tabstops> <tabstop>bufferCO</tabstop> - <tabstop>refsLB</tabstop> <tabstop>sortCB</tabstop> <tabstop>updatePB</tabstop> <tabstop>gotoPB</tabstop> Index: src/frontends/qt4/QTexinfo.C =================================================================== --- src/frontends/qt4/QTexinfo.C (revision 13790) +++ src/frontends/qt4/QTexinfo.C (working copy) @@ -17,9 +17,9 @@ #include "support/filetools.h" -#include <qcheckbox.h> -#include <q3listbox.h> -#include <qpushbutton.h> +#include <QCheckBox> +#include <QListWidget> +#include <QPushButton> using std::string; @@ -56,7 +56,7 @@ ContentsType::const_iterator it = data.begin(); ContentsType::const_iterator end = data.end(); for (; it != end; ++it) - dialog_->fileList->insertItem(toqstr(*it)); + dialog_->fileList->addItem(toqstr(*it)); activeStyle = whichStyle; } Index: src/frontends/qt4/QSendtoDialog.h =================================================================== --- src/frontends/qt4/QSendtoDialog.h (revision 13790) +++ src/frontends/qt4/QSendtoDialog.h (working copy) @@ -17,6 +17,8 @@ #include <QDialog> #include <QCloseEvent> +class QListWidgetItem; + namespace lyx { namespace frontend { @@ -28,8 +30,8 @@ QSendtoDialog(QSendto * form); protected slots: virtual void changed_adaptor(); - virtual void slotFormatHighlighted(const QString&) {} - virtual void slotFormatSelected(const QString&) {} + virtual void slotFormatHighlighted(QListWidgetItem *) {} + virtual void slotFormatSelected(QListWidgetItem *) {} protected: virtual void closeEvent(QCloseEvent * e); private: Index: src/frontends/qt4/QTexinfoDialog.C =================================================================== --- src/frontends/qt4/QTexinfoDialog.C (revision 13790) +++ src/frontends/qt4/QTexinfoDialog.C (working copy) @@ -13,10 +13,9 @@ #include "QTexinfoDialog.h" #include "QTexinfo.h" -#include <qcheckbox.h> -#include <q3listbox.h> -#include <qpushbutton.h> -//Added by qt3to4: +#include <QCheckBox> +#include <QListWidget> +#include <QPushButton> #include <QCloseEvent> using std::vector; @@ -40,7 +39,7 @@ connect( path, SIGNAL( stateChanged(int) ), this, SLOT( update() ) ); connect( rescanPB, SIGNAL( clicked() ), this, SLOT( enableViewPB() ) ); connect( rescanPB, SIGNAL( clicked() ), this, SLOT( rescanClicked() ) ); - connect( fileList, SIGNAL( highlighted(QListBoxItem*) ), this, SLOT( enableViewPB() ) ); + connect( fileList, SIGNAL( itemClicked(QListWidgetItem*) ), this, SLOT( enableViewPB() ) ); } @@ -68,7 +67,7 @@ void QTexinfoDialog::viewClicked() { - vector<string>::size_type const fitem = fileList->currentItem(); + vector<string>::size_type const fitem = fileList->currentRow(); vector<string> const & data = form_->texdata_[form_->activeStyle]; string file = data[fitem]; if (!path->isChecked()) @@ -100,7 +99,7 @@ void QTexinfoDialog::enableViewPB() { - viewPB->setEnabled(fileList->currentItem() > -1); + viewPB->setEnabled(fileList->currentRow() > -1); } } // namespace frontend Index: src/frontends/qt4/QErrorListDialog.C =================================================================== --- src/frontends/qt4/QErrorListDialog.C (revision 13790) +++ src/frontends/qt4/QErrorListDialog.C (working copy) @@ -13,9 +13,8 @@ #include "QErrorListDialog.h" #include "QErrorList.h" -#include <q3listbox.h> -#include <qpushbutton.h> -//Added by qt3to4: +#include <QListWidget> +#include <QPushButton> #include <QCloseEvent> namespace lyx { @@ -27,10 +26,10 @@ setupUi(this); connect(closePB, SIGNAL(clicked()), form, SLOT(slotClose())); - connect(errorsLB, SIGNAL(returnPressed(Q3ListBoxItem *)), + connect(errorsLW, SIGNAL( itemActivated(QListWidgetItem *)), form, SLOT(slotClose())); - - connect( errorsLB, SIGNAL( highlighted(int) ), this, SLOT( select_adaptor(int) ) ); + connect( errorsLW, SIGNAL( itemClicked(QListWidgetItem *) ), + this, SLOT( select_adaptor(QListWidgetItem *) ) ); } @@ -38,7 +37,7 @@ {} -void QErrorListDialog::select_adaptor(int item) +void QErrorListDialog::select_adaptor(QListWidgetItem * item) { form_->select(item); } Index: src/frontends/qt4/QRef.C =================================================================== --- src/frontends/qt4/QRef.C (revision 13790) +++ src/frontends/qt4/QRef.C (working copy) @@ -21,11 +21,12 @@ #include "insets/insetref.h" -#include <qlineedit.h> -#include <qcheckbox.h> -#include <q3listbox.h> -#include <qpushbutton.h> -#include <qtooltip.h> +#include <QLineEdit> +#include <QCheckBox> +#include <QListWidget> +#include <QListWidgetItem> +#include <QPushButton> +#include <QToolTip> using std::vector; @@ -51,7 +52,7 @@ bcview().setOK(dialog_->okPB); bcview().setApply(dialog_->applyPB); bcview().setCancel(dialog_->closePB); - bcview().addReadOnly(dialog_->refsLB); + bcview().addReadOnly(dialog_->refsLW); bcview().addReadOnly(dialog_->sortCB); bcview().addReadOnly(dialog_->nameED); bcview().addReadOnly(dialog_->referenceED); @@ -168,13 +169,13 @@ { // Prevent these widgets from emitting any signals whilst // we modify their state. - dialog_->refsLB->blockSignals(true); + dialog_->refsLW->blockSignals(true); dialog_->referenceED->blockSignals(true); - int lastref = dialog_->refsLB->currentItem(); + int lastref = dialog_->refsLW->currentRow(); - dialog_->refsLB->setAutoUpdate(false); - dialog_->refsLB->clear(); + dialog_->refsLW->setUpdatesEnabled(false); + dialog_->refsLW->clear(); // need this because Qt will send a highlight() here for // the first item inserted @@ -182,30 +183,33 @@ for (std::vector<string>::const_iterator iter = refs_.begin(); iter != refs_.end(); ++iter) { - dialog_->refsLB->insertItem(toqstr(*iter)); + dialog_->refsLW->addItem(toqstr(*iter)); } if (sort_) - dialog_->refsLB->sort(); + dialog_->refsLW->sortItems(); dialog_->referenceED->setText(tmp); // restore the last selection for new insets if (tmp.isEmpty() && lastref != -1 - && lastref < int(dialog_->refsLB->count())) { - dialog_->refsLB->setCurrentItem(lastref); - dialog_->refsLB->clearSelection(); + && lastref < int(dialog_->refsLW->count())) { + dialog_->refsLW->setCurrentRow(lastref); + dialog_->refsLW->clearSelection(); } else - for (unsigned int i = 0; i < dialog_->refsLB->count(); ++i) { - if (tmp == dialog_->refsLB->text(i)) - dialog_->refsLB->setSelected(i, true); + for (unsigned int i = 0; i < dialog_->refsLW->count(); ++i) { + if (tmp == dialog_->refsLW->item(i)->text()) { + QListWidgetItem * const item = dialog_->refsLW->item(i); + dialog_->refsLW->setItemSelected(item, true); + + } } - dialog_->refsLB->setAutoUpdate(true); - dialog_->refsLB->update(); + dialog_->refsLW->setUpdatesEnabled(true); + dialog_->refsLW->update(); // Re-activate the emission of signals by these widgets. - dialog_->refsLB->blockSignals(false); + dialog_->refsLW->blockSignals(false); dialog_->referenceED->blockSignals(false); } @@ -218,7 +222,7 @@ string const name = controller().getBufferName(dialog_->bufferCO->currentItem()); refs_ = controller().getLabelList(name); dialog_->sortCB->setEnabled(!refs_.empty()); - dialog_->refsLB->setEnabled(!refs_.empty()); + dialog_->refsLW->setEnabled(!refs_.empty()); dialog_->gotoPB->setEnabled(!refs_.empty()); redoRefs(); } Index: src/frontends/qt4/QRefDialog.C =================================================================== --- src/frontends/qt4/QRefDialog.C (revision 13790) +++ src/frontends/qt4/QRefDialog.C (working copy) @@ -14,10 +14,9 @@ #include "QRefDialog.h" #include "QRef.h" -#include <qlineedit.h> -#include <q3listbox.h> -#include <qpushbutton.h> -//Added by qt3to4: +#include <QLineEdit> +#include <QListWidget> +#include <QPushButton> #include <QCloseEvent> namespace lyx { @@ -35,22 +34,31 @@ connect(closePB, SIGNAL(clicked()), form_, SLOT(slotClose())); - connect( typeCO, SIGNAL( activated(int) ), this, SLOT( changed_adaptor() ) ); - connect( referenceED, SIGNAL( textChanged(const QString&) ), this, SLOT( changed_adaptor() ) ); - connect( nameED, SIGNAL( textChanged(const QString&) ), this, SLOT( changed_adaptor() ) ); - connect( refsLB, SIGNAL( highlighted(const QString&) ), this, SLOT( refHighlighted(const QString&) ) ); - connect( refsLB, SIGNAL( selected(const QString&) ), this, SLOT( refSelected(const QString&) ) ); - connect( sortCB, SIGNAL( toggled(bool) ), this, SLOT( sortToggled(bool) ) ); - connect( gotoPB, SIGNAL( clicked() ), this, SLOT( gotoClicked() ) ); - connect( updatePB, SIGNAL( clicked() ), this, SLOT( updateClicked() ) ); - connect( bufferCO, SIGNAL( activated(int) ), this, SLOT( updateClicked() ) ); + connect( typeCO, SIGNAL( activated(int) ), + this, SLOT( changed_adaptor() ) ); + connect( referenceED, SIGNAL( textChanged(const QString&) ), + this, SLOT( changed_adaptor() ) ); + connect( nameED, SIGNAL( textChanged(const QString&) ), + this, SLOT( changed_adaptor() ) ); + connect( refsLW, SIGNAL( itemClicked(QListWidgetItem *) ), + this, SLOT( refHighlighted(QListWidgetItem *) ) ); + connect( refsLW, SIGNAL( itemActivated(QListWidgetItem *) ), + this, SLOT( refSelected(QListWidgetItem *) ) ); + connect( sortCB, SIGNAL( toggled(bool) ), + this, SLOT( sortToggled(bool) ) ); + connect( gotoPB, SIGNAL( clicked() ), + this, SLOT( gotoClicked() ) ); + connect( updatePB, SIGNAL( clicked() ), + this, SLOT( updateClicked() ) ); + connect( bufferCO, SIGNAL( activated(int) ), + this, SLOT( updateClicked() ) ); } void QRefDialog::show() { QDialog::show(); - refsLB->setFocus(); + refsLW->setFocus(); } @@ -66,17 +74,18 @@ } -void QRefDialog::refHighlighted(const QString & sel) +void QRefDialog::refHighlighted(QListWidgetItem * sel) { if (form_->readOnly()) return; - int const cur_item = refsLB->currentItem(); +/* int const cur_item = refsLW->currentRow(); bool const cur_item_selected = cur_item >= 0 ? - refsLB->isSelected(cur_item) : false; + refsLB->isSelected(cur_item) : false;*/ + bool const cur_item_selected = refsLW->isItemSelected(sel); if (cur_item_selected) - referenceED->setText(sel); + referenceED->setText(sel->text()); if (form_->at_ref_) form_->gotoRef(); @@ -88,17 +97,18 @@ } -void QRefDialog::refSelected(const QString & sel) +void QRefDialog::refSelected(QListWidgetItem * sel) { if (form_->readOnly()) return; - int const cur_item = refsLB->currentItem(); +/* int const cur_item = refsLW->currentRow(); bool const cur_item_selected = cur_item >= 0 ? - refsLB->isSelected(cur_item) : false; + refsLB->isSelected(cur_item) : false;*/ + bool const cur_item_selected = refsLW->isItemSelected(sel); if (cur_item_selected) - referenceED->setText(sel); + referenceED->setText(sel->text()); // <enter> or double click, inserts ref and closes dialog form_->slotOK(); } Index: src/frontends/qt4/QErrorListDialog.h =================================================================== --- src/frontends/qt4/QErrorListDialog.h (revision 13790) +++ src/frontends/qt4/QErrorListDialog.h (working copy) @@ -17,6 +17,8 @@ #include <QDialog> #include <QCloseEvent> +class QListWidgetItem; + namespace lyx { namespace frontend { @@ -28,7 +30,7 @@ QErrorListDialog(QErrorList * form); ~QErrorListDialog(); public slots: - void select_adaptor(int); + void select_adaptor(QListWidgetItem *); protected: void closeEvent(QCloseEvent * e); private: Index: src/frontends/qt4/QErrorList.C =================================================================== --- src/frontends/qt4/QErrorList.C (revision 13790) +++ src/frontends/qt4/QErrorList.C (working copy) @@ -17,9 +17,9 @@ #include "controllers/ControlErrorList.h" -#include <q3listbox.h> -#include <q3textbrowser.h> -#include <qpushbutton.h> +#include <QListWidget> +#include <QTextBrowser> +#include <QPushButton> namespace lyx { namespace frontend { @@ -38,26 +38,28 @@ } -void QErrorList::select(int item) +void QErrorList::select(QListWidgetItem * wi) { + int const item = dialog_->errorsLW->row(wi); controller().goTo(item); - dialog_->descriptionTB->setText(toqstr(controller().errorList()[item].description)); + dialog_->descriptionTB->setPlainText(toqstr(controller().errorList()[item].description)); } void QErrorList::update_contents() { setTitle(controller().name()); - dialog_->errorsLB->clear(); - dialog_->descriptionTB->setText(QString()); + dialog_->errorsLW->clear(); + dialog_->descriptionTB->setPlainText(QString()); ErrorList::const_iterator it = controller().errorList().begin(); ErrorList::const_iterator end = controller().errorList().end(); for(; it != end; ++it) { - new Q3ListBoxText(dialog_->errorsLB, toqstr(it->error)); + dialog_->errorsLW->addItem(toqstr(it->error)); } - dialog_->errorsLB->setSelected(0, true); + dialog_->errorsLW->setCurrentRow(0); + select(dialog_->errorsLW->item(0)); } } // namespace frontend Index: src/frontends/qt4/QRefDialog.h =================================================================== --- src/frontends/qt4/QRefDialog.h (revision 13790) +++ src/frontends/qt4/QRefDialog.h (working copy) @@ -18,6 +18,8 @@ #include <QDialog> #include <QCloseEvent> +class QListWidgetItem; + namespace lyx { namespace frontend { @@ -33,8 +35,8 @@ public slots: void changed_adaptor(); void gotoClicked(); - void refHighlighted(const QString &); - void refSelected(const QString &); + void refHighlighted(QListWidgetItem *); + void refSelected(QListWidgetItem *); void sortToggled(bool); void updateClicked(); Index: src/frontends/qt4/QSpellchecker.C =================================================================== --- src/frontends/qt4/QSpellchecker.C (revision 13790) +++ src/frontends/qt4/QSpellchecker.C (working copy) @@ -17,10 +17,11 @@ #include "controllers/ControlSpellchecker.h" -#include <q3progressbar.h> -#include <qlineedit.h> -#include <qpushbutton.h> -#include <q3listbox.h> +#include <QProgressBar> +#include <QLineEdit> +#include <QPushButton> +#include <QListWidget> +#include <QListWidgetItem> using std::string; @@ -81,23 +82,25 @@ switch (state) { case ControlSpellchecker::SPELL_PROGRESSED: - dialog_->spellcheckPR->setProgress(controller().getProgress()); + dialog_->spellcheckPR->setValue(controller().getProgress()); break; case ControlSpellchecker::SPELL_FOUND_WORD: { dialog_->wordED->setText(toqstr(controller().getWord())); - dialog_->suggestionsLB->clear(); + dialog_->suggestionsLW->clear(); string w; while (!(w = controller().getSuggestion()).empty()) { - dialog_->suggestionsLB->insertItem(toqstr(w)); + dialog_->suggestionsLW->addItem(toqstr(w)); } - if (dialog_->suggestionsLB->count() == 0) { - dialog_->suggestionChanged(dialog_->wordED->text()); + if (dialog_->suggestionsLW->count() == 0) { + dialog_->suggestionChanged(new QListWidgetItem(dialog_->wordED->text())); } else { - dialog_->suggestionChanged(dialog_->suggestionsLB->text(0)); + dialog_->suggestionChanged(dialog_->suggestionsLW->item(0)); } + + dialog_->suggestionsLW->setCurrentRow(0); } break; Index: src/frontends/qt4/QSpellcheckerDialog.C =================================================================== --- src/frontends/qt4/QSpellcheckerDialog.C (revision 13790) +++ src/frontends/qt4/QSpellcheckerDialog.C (working copy) @@ -13,9 +13,8 @@ #include "QSpellcheckerDialog.h" #include "QSpellchecker.h" -#include <Q3ListBox> +#include <QListWidget> #include <QPushButton> -//Added by qt3to4: #include <QCloseEvent> namespace lyx { @@ -29,13 +28,20 @@ connect(closePB, SIGNAL(clicked()), form, SLOT(slotClose())); - connect( replaceCO, SIGNAL( highlighted(const QString&) ), this, SLOT( replaceChanged(const QString &) ) ); - connect( replacePB, SIGNAL( clicked() ), this, SLOT( replaceClicked() ) ); - connect( ignorePB, SIGNAL( clicked() ), this, SLOT( ignoreClicked() ) ); - connect( replacePB_3, SIGNAL( clicked() ), this, SLOT( acceptClicked() ) ); - connect( addPB, SIGNAL( clicked() ), this, SLOT( addClicked() ) ); - connect( suggestionsLB, SIGNAL( doubleClicked(QListBoxItem*) ), this, SLOT( replaceClicked() ) ); - connect( suggestionsLB, SIGNAL( highlighted(const QString&) ), this, SLOT( suggestionChanged(const QString &) ) ); + connect( replaceCO, SIGNAL( highlighted(const QString&) ), + this, SLOT( replaceChanged(const QString &) ) ); + connect( replacePB, SIGNAL( clicked() ), + this, SLOT( replaceClicked() ) ); + connect( ignorePB, SIGNAL( clicked() ), + this, SLOT( ignoreClicked() ) ); + connect( replacePB_3, SIGNAL( clicked() ), + this, SLOT( acceptClicked() ) ); + connect( addPB, SIGNAL( clicked() ), + this, SLOT( addClicked() ) ); + connect( suggestionsLW, SIGNAL( itemDoubleClicked(QListWidgetItem*) ), + this, SLOT( replaceClicked() ) ); + connect( suggestionsLW, SIGNAL( itemClicked(QListWidgetItem*) ), + this, SLOT( suggestionChanged(QListWidgetItem*) ) ); } @@ -59,29 +65,29 @@ form_->ignore(); } -void QSpellcheckerDialog::suggestionChanged(const QString & str) +void QSpellcheckerDialog::suggestionChanged(QListWidgetItem * item) { if (replaceCO->count() != 0) - replaceCO->changeItem(str, 0); + replaceCO->changeItem(item->text(), 0); else - replaceCO->insertItem(str); + replaceCO->insertItem(item->text()); replaceCO->setCurrentItem(0); } void QSpellcheckerDialog::replaceChanged(const QString & str) { - if (suggestionsLB->currentText() == str) + if (suggestionsLW->currentItem()->text() == str) return; unsigned int i = 0; - for (; i < suggestionsLB->count(); ++i) { - if (suggestionsLB->text(i) == str) + for (; i < suggestionsLW->count(); ++i) { + if (suggestionsLW->item(i)->text() == str) break; } - if (i != suggestionsLB->count()) - suggestionsLB->setCurrentItem(i); + if (i != suggestionsLW->count()) + suggestionsLW->setCurrentRow(i); } Index: src/frontends/qt4/QErrorList.h =================================================================== --- src/frontends/qt4/QErrorList.h (revision 13790) +++ src/frontends/qt4/QErrorList.h (working copy) @@ -14,6 +14,8 @@ #include "QDialogView.h" +class QListWidgetItem; + namespace lyx { namespace frontend { @@ -29,7 +31,7 @@ QErrorList(Dialog &); private: /// select an entry - void select(int item); + void select(QListWidgetItem *); /// required apply virtual void apply() {} /// build dialog