[Kst] extragear/graphics/kst/kst

Rick Chern rchern at interchange.ubc.ca
Fri Aug 19 20:04:39 CEST 2005


SVN commit 451013 by rchern:

Need to set minValue and maxValue of KDoubleSpinBox before setting value

 M  +4 -1      ksteditviewobjectdialog_i.cpp  
 M  +2 -0      kstviewarrow.cpp  


--- trunk/extragear/graphics/kst/kst/ksteditviewobjectdialog_i.cpp #451012:451013
@@ -158,8 +158,11 @@
         } else if (widgetType == "KDoubleNumInput") {
           // insert a double num spinbox
           KDoubleSpinBox* input = new KDoubleSpinBox(_propertiesFrame, (propertyName+","+"value").latin1());
+          // need this so that setValue later works
+          input->setMinValue(_viewObject->property(property->name()).toDouble());
+          input->setMaxValue(_viewObject->property(property->name()).toDouble());
           propertyWidget = input; 
-          propertyWidget->setProperty("value", _viewObject->property(property->name()));  
+          propertyWidget->setProperty("value", _viewObject->property(property->name())); 
         } else if (widgetType == "KFontCombo") {
           // insert a font combo box
           propertyWidget = new KFontCombo(_propertiesFrame, (propertyName+","+"currentText").latin1());
--- trunk/extragear/graphics/kst/kst/kstviewarrow.cpp #451012:451013
@@ -191,10 +191,12 @@
     map.insert(QString("_kst_widgetType"), QString("KDoubleNumInput"));
     map.insert(QString("_kst_label"), i18n("Start arrow scaling")); 
     map.insert(QString("minValue"), 1.0);
+    map.insert(QString("maxValue"), 100.0);
   } else if (propertyName == "toArrowScaling") {
     map.insert(QString("_kst_widgetType"), QString("KDoubleNumInput"));
     map.insert(QString("_kst_label"), i18n("End arrow scaling")); 
     map.insert(QString("minValue"), 1.0);
+    map.insert(QString("maxValue"), 100.0);
   }
   return map;
 }


More information about the Kst mailing list