[Kst] branches/work/kst/1.6/kst/src/widgets

Andrew Walker arwalker at sumusltd.com
Thu Dec 13 22:54:51 CET 2007


SVN commit 748224 by arwalker:

enable apply button when editing and curve appearance is changed

 M  +4 -0      curveappearancewidget.ui  
 M  +24 -7     curveappearancewidget.ui.h  


--- branches/work/kst/1.6/kst/src/widgets/curveappearancewidget.ui #748223:748224
@@ -593,8 +593,12 @@
     <include location="global" impldecl="in declaration">kst_export.h</include>
 </includes>
 <exportmacro>KST_EXPORT</exportmacro>
+<signals>
+    <signal>changed()</signal>
+</signals>
 <slots>
     <slot>init()</slot>
+    <slot access="private">modified()</slot>
     <slot access="private">fillCombo()</slot>
     <slot>setColor( QColor c )</slot>
     <slot>drawLine()</slot>
--- branches/work/kst/1.6/kst/src/widgets/curveappearancewidget.ui.h #748223:748224
@@ -7,6 +7,30 @@
 ** place of a destructor.
 *****************************************************************************/
 
+void CurveAppearanceWidget::init()
+{
+    connect(_color, SIGNAL(changed(const QColor&)), this, SLOT(modified()));
+    connect(_showLines, SIGNAL(clicked()), this, SLOT(modified()));
+    connect(_showPoints, SIGNAL(clicked()), this, SLOT(modified()));
+    connect(_showBars, SIGNAL(clicked()), this, SLOT(modified()));
+    connect(_combo, SIGNAL(activated(int)), this, SLOT(modified()));
+    connect(_comboLineStyle, SIGNAL(activated(int)), this, SLOT(modified()));
+    connect(_comboPointDensity, SIGNAL(activated(int)), this, SLOT(modified()));
+    connect(_spinBoxLineWidth, SIGNAL(valueChanged(int)), this, SLOT(modified()));
+    connect(_spinBoxLineWidth->child("qt_spinbox_edit"), SIGNAL(textChanged(const QString&)), this, SLOT(modified()));
+    connect(_barStyle, SIGNAL(activated(int)), this, SLOT(modified()));
+
+    reset();
+    QTimer::singleShot(0, this, SLOT(drawLine()));
+}
+
+
+void CurveAppearanceWidget::modified()
+{
+    emit changed();
+}
+
+
 bool CurveAppearanceWidget::showLines()
 {
     return _showLines->isChecked();
@@ -25,13 +49,6 @@
 }
 
 
-void CurveAppearanceWidget::init()
-{
-    reset();
-    QTimer::singleShot(0, this, SLOT(drawLine()));
-}
-
-
 void CurveAppearanceWidget::fillCombo()
 {
     bool keepBlank = _combo->count() > 0 && _combo->text(0) == " ";


More information about the Kst mailing list