[Kst] extragear/graphics/kst/src

Barth Netterfield netterfield at astro.utoronto.ca
Wed Jan 17 03:10:39 CET 2007


SVN commit 624329 by netterfield:

KstCombo box gets the ability to be actually editable, or not.
Use KstCombo in more places.



 M  +1 -1      libkstapp/kstvectordialog_i.cpp  
 M  +1 -7      libkstapp/vectordialogwidget.ui  
 M  +4 -2      widgets/kstcombobox.cpp  
 M  +1 -0      widgets/kstcombobox.h  
 M  +1 -1      widgets/stringselector.ui  
 M  +0 -1      widgets/vectorselector.ui  


--- trunk/extragear/graphics/kst/src/libkstapp/kstvectordialog_i.cpp #624328:624329
@@ -25,7 +25,6 @@
 #include <qspinbox.h>
 #include <qvbox.h>
 
-#include <kcombobox.h>
 #include <kdialogbase.h>
 #include <klineedit.h>
 #include <klocale.h>
@@ -44,6 +43,7 @@
 #include "kstvectordefaults.h"
 #include "kstvectordialog_i.h"
 #include "kstdefaultnames.h"
+#include "kstcombobox.h"
 #include "vectordialogwidget.h"
 
 
--- trunk/extragear/graphics/kst/src/libkstapp/vectordialogwidget.ui #624328:624329
@@ -145,16 +145,10 @@
                     <property name="hAlign" stdset="0">
                     </property>
                 </widget>
-                <widget class="KComboBox" row="1" column="1">
+                <widget class="KstComboBox" row="1" column="1">
                     <property name="name">
                         <cstring>Field</cstring>
                     </property>
-                    <property name="editable">
-                        <bool>true</bool>
-                    </property>
-                    <property name="duplicatesEnabled">
-                        <bool>false</bool>
-                    </property>
                 </widget>
                 <widget class="QLayoutWidget" row="2" column="0" rowspan="1" colspan="2">
                     <property name="name">
--- trunk/extragear/graphics/kst/src/widgets/kstcombobox.cpp #624328:624329
@@ -34,10 +34,13 @@
 KstComboBox::~KstComboBox() {
 }
 
+void KstComboBox::setEditable(bool rw) {
+  _trueRW = rw;
+}
 
 void KstComboBox::commonConstructor() {
 
-  setEditable( true );
+  QComboBox::setEditable( true );
 
   if (!_trueRW) { //if not truly read write then go into psuedo mode for read only
     setInsertionPolicy( NoInsertion );
@@ -49,7 +52,6 @@
   }
 }
 
-
 void KstComboBox::focusInEvent(QFocusEvent *event) {
   //WARNING!! If the list of items changes programmatically while the combo has focus
   //this will bug out!!  Unfortunately I see no way to check whether the list of items
--- trunk/extragear/graphics/kst/src/widgets/kstcombobox.h #624328:624329
@@ -34,6 +34,7 @@
   public:
     KstComboBox(QWidget *parent=0, const char *name=0);
     KstComboBox(bool rw, QWidget *parent=0, const char *name=0);
+    void setEditable(bool rw);
     virtual ~KstComboBox();
 
   protected:
--- trunk/extragear/graphics/kst/src/widgets/stringselector.ui #624328:624329
@@ -44,7 +44,7 @@
                 <string>Edit selected string.</string>
             </property>
         </widget>
-        <widget class="KComboBox" row="0" column="0">
+        <widget class="KstComboBox" row="0" column="0">
             <property name="name">
                 <cstring>_string</cstring>
             </property>
--- trunk/extragear/graphics/kst/src/widgets/vectorselector.ui #624328:624329
@@ -103,7 +103,6 @@
     <include location="local" impldecl="in implementation">kstsvector.h</include>
     <include location="local" impldecl="in implementation">dialoglauncher.h</include>
     <include location="local" impldecl="in implementation">kstdataobject.h</include>
-    <include location="local" impldecl="in declaration">kcombobox.h</include>
     <include location="global" impldecl="in implementation">qlistbox.h</include>
     <include location="global" impldecl="in implementation">kiconloader.h</include>
     <include location="global" impldecl="in implementation">qtimer.h</include>


More information about the Kst mailing list