José Matos wrote: > OK. Done. Next one: add an Apply button to the listings dialog, and accelerators.
Jürgen
Index: src/frontends/qt4/ui/ListingsUi.ui =================================================================== --- src/frontends/qt4/ui/ListingsUi.ui (Revision 18408) +++ src/frontends/qt4/ui/ListingsUi.ui (Arbeitskopie) @@ -18,21 +18,74 @@ <property name="sizeGripEnabled" > <bool>true</bool> </property> - <layout class="QVBoxLayout" > + <layout class="QGridLayout" > <property name="margin" > <number>9</number> </property> <property name="spacing" > <number>6</number> </property> - <item> + <item row="1" column="0" > + <layout class="QHBoxLayout" > + <property name="margin" > + <number>0</number> + </property> + <property name="spacing" > + <number>6</number> + </property> + <item> + <spacer> + <property name="orientation" > + <enum>Qt::Horizontal</enum> + </property> + <property name="sizeType" > + <enum>QSizePolicy::Expanding</enum> + </property> + <property name="sizeHint" > + <size> + <width>291</width> + <height>27</height> + </size> + </property> + </spacer> + </item> + <item> + <widget class="QPushButton" name="okPB" > + <property name="text" > + <string>&OK</string> + </property> + <property name="default" > + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="applyPB" > + <property name="text" > + <string>&Apply</string> + </property> + <property name="default" > + <bool>true</bool> + </property> + </widget> + </item> + <item> + <widget class="QPushButton" name="closePB" > + <property name="text" > + <string>&Cancel</string> + </property> + </widget> + </item> + </layout> + </item> + <item row="0" column="0" > <widget class="QTabWidget" name="listingsTW" > <property name="currentIndex" > <number>0</number> </property> <widget class="QWidget" name="tab" > <attribute name="title" > - <string>Main Settings</string> + <string>&Main Settings</string> </attribute> <layout class="QVBoxLayout" > <property name="margin" > @@ -85,14 +138,14 @@ <item row="1" column="0" colspan="2" > <widget class="QCheckBox" name="floatCB" > <property name="text" > - <string>Float</string> + <string>&Float</string> </property> </widget> </item> <item row="0" column="0" colspan="2" > <widget class="QCheckBox" name="inlineCB" > <property name="text" > - <string>Inline listing</string> + <string>&Inline listing</string> </property> </widget> </item> @@ -142,8 +195,11 @@ <item row="0" column="0" > <widget class="QLabel" name="label" > <property name="text" > - <string>Side: </string> + <string>&Side: </string> </property> + <property name="buddy" > + <cstring>numberSideCO</cstring> + </property> </widget> </item> <item row="1" column="1" > @@ -165,7 +221,7 @@ <string>File name of image</string> </property> <property name="text" > - <string>Step:</string> + <string>S&tep:</string> </property> <property name="wordWrap" > <bool>false</bool> @@ -178,7 +234,7 @@ <item row="2" column="0" > <widget class="QLabel" name="numberfontsizeL" > <property name="text" > - <string>Font size:</string> + <string>Font si&ze:</string> </property> <property name="wordWrap" > <bool>false</bool> @@ -233,7 +289,7 @@ <item row="0" column="0" > <widget class="QLabel" name="numberfontsizeL_3" > <property name="text" > - <string>First line:</string> + <string>Fi&rst line:</string> </property> <property name="wordWrap" > <bool>false</bool> @@ -272,7 +328,7 @@ <item row="1" column="0" > <widget class="QLabel" name="numberfontsizeL_2" > <property name="text" > - <string>Last line:</string> + <string>&Last line:</string> </property> <property name="wordWrap" > <bool>false</bool> @@ -318,7 +374,7 @@ <string>Insert a special symbol for a space</string> </property> <property name="text" > - <string>&Space as Symbol</string> + <string>S&pace as Symbol</string> </property> <property name="shortcut" > <number>276824147</number> @@ -344,7 +400,7 @@ <item row="1" column="0" > <widget class="QLabel" name="fontstyle_label_3" > <property name="text" > - <string>Font style:</string> + <string>Font st&yle:</string> </property> <property name="wordWrap" > <bool>false</bool> @@ -381,7 +437,7 @@ <item row="0" column="0" > <widget class="QLabel" name="fontsize_label_3" > <property name="text" > - <string>Font size:</string> + <string>F&ont size:</string> </property> <property name="wordWrap" > <bool>false</bool> @@ -424,7 +480,7 @@ </widget> <widget class="QWidget" name="tab_2" > <attribute name="title" > - <string>Advanced</string> + <string>Ad&vanced</string> </attribute> <layout class="QGridLayout" > <property name="margin" > @@ -444,7 +500,7 @@ </sizepolicy> </property> <property name="title" > - <string>More Parameters</string> + <string>More &Parameters</string> </property> <layout class="QVBoxLayout" > <property name="margin" > @@ -494,53 +550,11 @@ </widget> </widget> </item> - <item> - <layout class="QHBoxLayout" > - <property name="margin" > - <number>0</number> - </property> - <property name="spacing" > - <number>6</number> - </property> - <item> - <spacer> - <property name="orientation" > - <enum>Qt::Horizontal</enum> - </property> - <property name="sizeType" > - <enum>QSizePolicy::Expanding</enum> - </property> - <property name="sizeHint" > - <size> - <width>101</width> - <height>27</height> - </size> - </property> - </spacer> - </item> - <item> - <widget class="QPushButton" name="okPB" > - <property name="text" > - <string>OK</string> - </property> - <property name="default" > - <bool>true</bool> - </property> - </widget> - </item> - <item> - <widget class="QPushButton" name="closePB" > - <property name="text" > - <string>Cancel</string> - </property> - </widget> - </item> - </layout> - </item> </layout> </widget> <tabstops> <tabstop>okPB</tabstop> + <tabstop>applyPB</tabstop> <tabstop>closePB</tabstop> <tabstop>listingsTW</tabstop> <tabstop>inlineCB</tabstop> @@ -557,8 +571,8 @@ <tabstop>breaklinesCB</tabstop> <tabstop>spaceCB</tabstop> <tabstop>extendedcharsCB</tabstop> + <tabstop>listingsED</tabstop> <tabstop>listingsTB</tabstop> - <tabstop>listingsED</tabstop> </tabstops> <includes> <include location="local" >qt_helpers.h</include> Index: src/frontends/qt4/QListings.cpp =================================================================== --- src/frontends/qt4/QListings.cpp (Revision 18408) +++ src/frontends/qt4/QListings.cpp (Arbeitskopie) @@ -4,7 +4,7 @@ * Licence details can be found in the file COPYING. * * \author Bo Peng - * \author Jürgen Spitzmüller + * \author Jürgen Spitzmüller * * Full author contact details are available in file CREDITS. */ @@ -63,6 +63,7 @@ setupUi(this); connect(okPB, SIGNAL(clicked()), form, SLOT(slotOK())); + connect(applyPB, SIGNAL(clicked()), form_, SLOT(slotApply())); connect(closePB, SIGNAL(clicked()), form, SLOT(slotClose())); connect(languageCO, SIGNAL(currentIndexChanged(int)), this, SLOT(change_adaptor())); @@ -161,7 +162,8 @@ InsetListingsParams par(construct_params()); if (!isOK) { isOK = true; - listingsTB->setPlainText("Input listings parameters on the right. Enter ? for a list of parameters."); + listingsTB->setPlainText( + "Input listings parameters on the right. Enter ? for a list of parameters."); okPB->setEnabled(true); } } catch (invalidParam & e) { @@ -209,14 +211,15 @@ dialog_.reset(new QListingsDialog(this)); bcview().setOK(dialog_->okPB); + bcview().setApply(dialog_->applyPB); bcview().setCancel(dialog_->closePB); - dialog_->listingsTB->setPlainText("Input listings parameters on the right. Enter ? for a list of parameters."); + dialog_->listingsTB->setPlainText( + "Input listings parameters on the right. Enter ? for a list of parameters."); update_contents(); } -/// not used right now. void QListings::apply() { InsetListingsParams & params = controller().params();