]> git.lyx.org Git - features.git/commitdiff
* src/frontends/qt4/QListings.cpp:
authorJürgen Spitzmüller <spitz@lyx.org>
Fri, 18 May 2007 18:35:28 +0000 (18:35 +0000)
committerJürgen Spitzmüller <spitz@lyx.org>
Fri, 18 May 2007 18:35:28 +0000 (18:35 +0000)
- add Apply button
* src/frontends/qt4/ui/ListingsUi.ui:
- add Apply button
- add accelerators

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@18409 a592a061-630c-0410-9148-cb99ea01b6c8

src/frontends/qt4/QListings.cpp
src/frontends/qt4/ui/ListingsUi.ui

index 2feab752449a036094e21c507c6c8863b37b9e45..53303055c948e299a2f99fd400e8cd63cde1acb7 100644 (file)
@@ -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 @@ QListingsDialog::QListingsDialog(QListings * form)
        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 @@ void QListingsDialog::validate_listings_params()
                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 @@ void QListings::build_dialog()
        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();
index 403b85dcd7059492df1bdf28a3d85dc24fee518a..af312207db4c4ddc17ac5ac9ccf91e38716b1abe 100644 (file)
   <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>&amp;OK</string>
+       </property>
+       <property name="default" >
+        <bool>true</bool>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="applyPB" >
+       <property name="text" >
+        <string>&amp;Apply</string>
+       </property>
+       <property name="default" >
+        <bool>true</bool>
+       </property>
+      </widget>
+     </item>
+     <item>
+      <widget class="QPushButton" name="closePB" >
+       <property name="text" >
+        <string>&amp;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>&amp;Main Settings</string>
       </attribute>
       <layout class="QVBoxLayout" >
        <property name="margin" >
               <item row="1" column="0" colspan="2" >
                <widget class="QCheckBox" name="floatCB" >
                 <property name="text" >
-                 <string>Float</string>
+                 <string>&amp;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>&amp;Inline listing</string>
                 </property>
                </widget>
               </item>
               <item row="0" column="0" >
                <widget class="QLabel" name="label" >
                 <property name="text" >
-                 <string>Side: </string>
+                 <string>&amp;Side: </string>
+                </property>
+                <property name="buddy" >
+                 <cstring>numberSideCO</cstring>
                 </property>
                </widget>
               </item>
                  <string>File name of image</string>
                 </property>
                 <property name="text" >
-                 <string>Step:</string>
+                 <string>S&amp;tep:</string>
                 </property>
                 <property name="wordWrap" >
                  <bool>false</bool>
               <item row="2" column="0" >
                <widget class="QLabel" name="numberfontsizeL" >
                 <property name="text" >
-                 <string>Font size:</string>
+                 <string>Font si&amp;ze:</string>
                 </property>
                 <property name="wordWrap" >
                  <bool>false</bool>
               <item row="0" column="0" >
                <widget class="QLabel" name="numberfontsizeL_3" >
                 <property name="text" >
-                 <string>First line:</string>
+                 <string>Fi&amp;rst line:</string>
                 </property>
                 <property name="wordWrap" >
                  <bool>false</bool>
               <item row="1" column="0" >
                <widget class="QLabel" name="numberfontsizeL_2" >
                 <property name="text" >
-                 <string>Last line:</string>
+                 <string>&amp;Last line:</string>
                 </property>
                 <property name="wordWrap" >
                  <bool>false</bool>
                <string>Insert a special symbol for a space</string>
               </property>
               <property name="text" >
-               <string>&amp;Space as Symbol</string>
+               <string>S&amp;pace as Symbol</string>
               </property>
               <property name="shortcut" >
                <number>276824147</number>
             <item row="1" column="0" >
              <widget class="QLabel" name="fontstyle_label_3" >
               <property name="text" >
-               <string>Font style:</string>
+               <string>Font st&amp;yle:</string>
               </property>
               <property name="wordWrap" >
                <bool>false</bool>
             <item row="0" column="0" >
              <widget class="QLabel" name="fontsize_label_3" >
               <property name="text" >
-               <string>Font size:</string>
+               <string>F&amp;ont size:</string>
               </property>
               <property name="wordWrap" >
                <bool>false</bool>
      </widget>
      <widget class="QWidget" name="tab_2" >
       <attribute name="title" >
-       <string>Advanced</string>
+       <string>Ad&amp;vanced</string>
       </attribute>
       <layout class="QGridLayout" >
        <property name="margin" >
           </sizepolicy>
          </property>
          <property name="title" >
-          <string>More Parameters</string>
+          <string>More &amp;Parameters</string>
          </property>
          <layout class="QVBoxLayout" >
           <property name="margin" >
      </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>
   <tabstop>breaklinesCB</tabstop>
   <tabstop>spaceCB</tabstop>
   <tabstop>extendedcharsCB</tabstop>
-  <tabstop>listingsTB</tabstop>
   <tabstop>listingsED</tabstop>
+  <tabstop>listingsTB</tabstop>
  </tabstops>
  <includes>
   <include location="local" >qt_helpers.h</include>