[Kst] kdeextragear-2/kst/kst

Andrew Walker arwalker at sumusltd.com
Fri Jun 25 01:13:30 CEST 2004


CVS commit by arwalker: 

Make sure that we update the dialogs after a window is created or destroyed.


  M +1 -0      curveplacementwidget.ui   1.8
  M +29 -0     curveplacementwidget.ui.h   1.6
  M +3 -1      kst.cpp   1.160
  M +1 -0      kstviewwindow.cpp   1.14
  M +2 -2      vectordialog.ui   1.17


--- kdeextragear-2/kst/kst/curveplacementwidget.ui  #1.7:1.8
@@ -251,4 +251,5 @@
     <function returnType="QString">plotName()</function>
     <function returnType="int">columns()</function>
+    <function>updateEnabled()</function>
 </functions>
 <layoutdefaults spacing="6" margin="11"/>

--- kdeextragear-2/kst/kst/curveplacementwidget.ui.h  #1.5:1.6
@@ -8,4 +8,5 @@
 *****************************************************************************/
 
+#include <qspinbox.h>
 
 bool CurvePlacementWidget::existingPlot()
@@ -72,4 +73,6 @@ void CurvePlacementWidget::update()
 
     updatePlotList();
+    
+    updateEnabled();
 }
 
@@ -100,2 +103,28 @@ void CurvePlacementWidget::updatePlotLis
   }
 }
+
+
+void CurvePlacementWidget::updateEnabled()
+{
+  bool bHaveWindow = TRUE;
+  bool bHavePlot = TRUE;
+  
+  if (_plotWindow->count() == 0) {
+    bHaveWindow = FALSE;
+  }
+  
+  _plotWindow->setEnabled( bHaveWindow );
+  _newPlot->setEnabled( bHaveWindow );
+  if (bHaveWindow && _newPlot->isChecked()) {
+    _plotColumns->setEnabled( TRUE );
+  } else {
+    _plotColumns->setEnabled( FALSE );
+  }
+  
+  if (_plotList->count() == 0) {
+    bHavePlot = FALSE;
+  }  
+  
+  _inPlot->setEnabled( bHavePlot );
+  _plotList->setEnabled( bHavePlot );
+}

--- kdeextragear-2/kst/kst/kst.cpp  #1.159:1.160
@@ -1390,4 +1390,6 @@ QString KstApp::newWindow(const QString&
     addWindow(w);
     w->activate();
+
+    KstApp::inst()->updateDialogs();
   }
 

--- kdeextragear-2/kst/kst/kstviewwindow.cpp  #1.13:1.14
@@ -125,4 +125,5 @@ void KstViewWindow::updateActions() {
 
 KstViewWindow::~KstViewWindow() {
+  KstApp::inst()->updateDialogs();
 }
 

--- kdeextragear-2/kst/kst/vectordialog.ui  #1.16:1.17
@@ -10,5 +10,5 @@
             <y>0</y>
             <width>474</width>
-            <height>223</height>
+            <height>313</height>
         </rect>
     </property>
@@ -257,5 +257,5 @@
                         <size>
                             <width>0</width>
-                            <height>10</height>
+                            <height>114</height>
                         </size>
                     </property>





More information about the Kst mailing list