[Kst] kdeextragear-2/kst/kst
Andrew Walker
arwalker at sumusltd.com
Mon May 31 20:13:08 CEST 2004
CVS commit by arwalker:
Added method for a scalar selector to be directly editable. The intention here is to allow the user to enter a value directly rather than being forced to create a scalar first.
M +2 -1 scalarselector.ui 1.4
M +14 -0 scalarselector.ui.h 1.4
--- kdeextragear-2/kst/kst/scalarselector.ui #1.3:1.4
@@ -10,5 +10,5 @@
<y>0</y>
<width>328</width>
- <height>31</height>
+ <height>32</height>
</rect>
</property>
@@ -94,4 +94,5 @@
<slot>setSelection( const QString & tag )</slot>
<slot>setSelection( KstScalarPtr s )</slot>
+ <slot>allowDirectEntry( bool allowed )</slot>
</slots>
<functions>
--- kdeextragear-2/kst/kst/scalarselector.ui.h #1.3:1.4
@@ -86,2 +86,16 @@ QString ScalarSelector::selectedScalar()
return _scalar->currentText();
}
+
+
+void ScalarSelector::allowDirectEntry( bool allowed )
+{
+ if (allowed) {
+ if( !_scalar->editable()) {
+ _scalar->setEditable( TRUE );
+ }
+ } else {
+ if( _scalar->editable()) {
+ _scalar->setEditable( FALSE );
+ }
+ }
+}
More information about the Kst
mailing list