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

Mike Fenton mike at staikos.net
Wed Jul 8 20:49:08 CEST 2009


SVN commit 993479 by fenton:

Fix updates for Selector Widgets when changes happen in other dialogs.


 M  +8 -0      curveselector.cpp  
 M  +2 -0      curveselector.h  
 M  +7 -0      matrixselector.cpp  
 M  +2 -0      matrixselector.h  
 M  +8 -0      scalarselector.cpp  
 M  +2 -0      scalarselector.h  
 M  +9 -0      stringselector.cpp  
 M  +1 -0      stringselector.h  
 M  +11 -0     vectorselector.cpp  
 M  +2 -0      vectorselector.h  


--- branches/work/kst/portto4/kst/src/widgets/curveselector.cpp #993478:993479
@@ -130,6 +130,14 @@
     setSelectedCurve(current);
 }
 
+
+bool CurveSelector::event(QEvent * event) {
+  if (event->type() == QEvent::QEvent::WindowActivate) {
+    fillCurves();
+  }
+  return QWidget::event(event);
 }
 
+}
+
 // vim: ts=2 sw=2 et
--- branches/work/kst/portto4/kst/src/widgets/curveselector.h #993478:993479
@@ -40,6 +40,8 @@
 
     void clearSelection();
 
+    virtual bool event(QEvent * event);
+
   Q_SIGNALS:
     void selectionChanged(const QString&);
 
--- branches/work/kst/portto4/kst/src/widgets/matrixselector.cpp #993478:993479
@@ -140,6 +140,13 @@
 }
 
 
+bool MatrixSelector::event(QEvent * event) {
+  if (event->type() == QEvent::QEvent::WindowActivate) {
+    fillMatrices();
+  }
+  return QWidget::event(event);
 }
 
+}
+
 // vim: ts=2 sw=2 et
--- branches/work/kst/portto4/kst/src/widgets/matrixselector.h #993478:993479
@@ -37,6 +37,8 @@
 
     void clearSelection();
 
+    virtual bool event(QEvent * event);
+
   Q_SIGNALS:
     void selectionChanged();
 
--- branches/work/kst/portto4/kst/src/widgets/scalarselector.cpp #993478:993479
@@ -52,6 +52,7 @@
   fillScalars();
 }
 
+
 void ScalarSelector::updateDescriptionTip() {
   setToolTip(selectedScalarString());
 }
@@ -223,6 +224,13 @@
   _selectScalar->setEnabled(_scalar->count() > 0);
 }
 
+
+bool ScalarSelector::event(QEvent * event) {
+  if (event->type() == QEvent::QEvent::WindowActivate) {
+    fillScalars();
+  }
+  return QWidget::event(event);
 }
+}
 
 // vim: ts=2 sw=2 et
--- branches/work/kst/portto4/kst/src/widgets/scalarselector.h #993478:993479
@@ -42,6 +42,8 @@
 
     void setDefaultValue(double value);
 
+    virtual bool event(QEvent * event);
+
   Q_SIGNALS:
     void selectionChanged(const QString&);
 
--- branches/work/kst/portto4/kst/src/widgets/stringselector.cpp #993478:993479
@@ -159,6 +159,15 @@
     _string->setCurrentIndex(0);
   }
 }
+
+
+bool StringSelector::event(QEvent * event) {
+  if (event->type() == QEvent::QEvent::WindowActivate) {
+    fillStrings();
+  }
+  return QWidget::event(event);
 }
 
+}
+
 // vim: ts=2 sw=2 et
--- branches/work/kst/portto4/kst/src/widgets/stringselector.h #993478:993479
@@ -39,6 +39,7 @@
 
     void fillStrings();
 
+    virtual bool event(QEvent * event);
 
   Q_SIGNALS:
     void selectionChanged(const QString&);
--- branches/work/kst/portto4/kst/src/widgets/vectorselector.cpp #993478:993479
@@ -50,6 +50,7 @@
   fillVectors();
 }
 
+
 void VectorSelector::updateDescriptionTip() {
   if (selectedVector()) {
     setToolTip(selectedVector()->descriptionTip());
@@ -146,6 +147,7 @@
   emit contentChanged();
 }
 
+
 void VectorSelector::setToLastX() {
   if (!_store) {
     return;
@@ -156,6 +158,7 @@
   }
 }
 
+
 void VectorSelector::fillVectors() {
   if (!_store) {
     return;
@@ -197,6 +200,14 @@
 
 }
 
+
+bool VectorSelector::event(QEvent * event) {
+  if (event->type() == QEvent::QEvent::WindowActivate) {
+    fillVectors();
+  }
+  return QWidget::event(event);
 }
 
+}
+
 // vim: ts=2 sw=2 et
--- branches/work/kst/portto4/kst/src/widgets/vectorselector.h #993478:993479
@@ -46,6 +46,8 @@
     void setIsX(bool is_x) {_isX = is_x;}
     int count() {return _vector->count();}
 
+    virtual bool event(QEvent * event);
+
   Q_SIGNALS:
     void selectionChanged(const QString&);
     void contentChanged(); // something in the combo changed (new or edit)


More information about the Kst mailing list