[Kst] branches/work/kst/1.5/kst/src

Duncan Hanson duncan.hanson at gmail.com
Wed May 16 21:07:10 CEST 2007


SVN commit 665381 by dhanson:

CCBUG:86915 implement the axes options.

 M  +28 -20    libkstapp/kstvvdialog_i.cpp  
 M  +0 -3      libkstmath/kstvectorview.h  


--- branches/work/kst/1.5/kst/src/libkstapp/kstvvdialog_i.cpp #665380:665381
@@ -438,17 +438,21 @@
 void KstVvDialogI::realtimeClicked() {
   Kst2DPlotPtr plot = Kst2DPlot::findPlotByName(_w->_plotList->currentText()); 
 
-  _w->_xMinCheckbox->setChecked(true);
-  _w->_xMinScalar->setSelection((plot->scalars())["xmin"]->tag().displayString());
+  if (_w->_plotAxes->currentText() == "XY Axes" || _w->_plotAxes->currentText() == "X Axis") {
+    _w->_xMinCheckbox->setChecked(true);
+    _w->_xMinScalar->setSelection((plot->scalars())["xmin"]->tag().displayString());
 
-  _w->_xMaxCheckbox->setChecked(true);
-  _w->_xMaxScalar->setSelection((plot->scalars())["xmax"]->tag().displayString());
+    _w->_xMaxCheckbox->setChecked(true);
+    _w->_xMaxScalar->setSelection((plot->scalars())["xmax"]->tag().displayString());
+  }
 
-  _w->_yMinCheckbox->setChecked(true);
-  _w->_yMinScalar->setSelection((plot->scalars())["ymin"]->tag().displayString());
+  if (_w->_plotAxes->currentText() == "XY Axes" || _w->_plotAxes->currentText() == "Y Axis") {
+    _w->_yMinCheckbox->setChecked(true);
+    _w->_yMinScalar->setSelection((plot->scalars())["ymin"]->tag().displayString());
 
-  _w->_yMaxCheckbox->setChecked(true);
-  _w->_yMaxScalar->setSelection((plot->scalars())["ymax"]->tag().displayString());
+    _w->_yMaxCheckbox->setChecked(true);
+    _w->_yMaxScalar->setSelection((plot->scalars())["ymax"]->tag().displayString());
+  }
 
   updateButtons();
 }
@@ -459,21 +463,25 @@
     KstScalarPtr sp;
     double v;
 
-    _w->_xMinCheckbox->setChecked(true);
-    v = (plot->scalars())["xmin"]->value();
-    _w->_xMinScalar->setSelection(QString::number(v));
+    if (_w->_plotAxes->currentText() == "XY Axes" || _w->_plotAxes->currentText() == "X Axis") {
+      _w->_xMinCheckbox->setChecked(true);
+      v = (plot->scalars())["xmin"]->value();
+      _w->_xMinScalar->setSelection(QString::number(v));
 
-    _w->_xMaxCheckbox->setChecked(true);
-    v = (plot->scalars())["xmax"]->value();
-    _w->_xMaxScalar->setSelection(QString::number(v));
+      _w->_xMaxCheckbox->setChecked(true);
+      v = (plot->scalars())["xmax"]->value();
+      _w->_xMaxScalar->setSelection(QString::number(v));
+    }
 
-    _w->_yMinCheckbox->setChecked(true);
-    v = (plot->scalars())["ymin"]->value();
-    _w->_yMinScalar->setSelection(QString::number(v));
+    if (_w->_plotAxes->currentText() == "XY Axes" || _w->_plotAxes->currentText() == "Y Axis") {
+      _w->_yMinCheckbox->setChecked(true);
+      v = (plot->scalars())["ymin"]->value();
+      _w->_yMinScalar->setSelection(QString::number(v));
 
-    _w->_yMaxCheckbox->setChecked(true);
-    v = (plot->scalars())["ymax"]->value();
-    _w->_yMaxScalar->setSelection(QString::number(v));
+      _w->_yMaxCheckbox->setChecked(true);
+      v = (plot->scalars())["ymax"]->value();
+      _w->_yMaxScalar->setSelection(QString::number(v));
+    }
 
     updateButtons();
 }
--- branches/work/kst/1.5/kst/src/libkstmath/kstvectorview.h #665380:665381
@@ -32,9 +32,6 @@
     // InterpType order must match the order of entries of _interp in 
     // vectorviewdialogwidget.ui
     enum InterpType {InterpY=0, InterpX=1, InterpMax=2, InterpMin=3};
-    // AxesType order must match the order of entries of _plotAxes in 
-    // vectorviewdialogwidget.ui
-    enum AxesType {XYAxes=0, XAxis=1, YAxis=2};
 
     KstVectorView(const QString &in_tag, KstVectorPtr in_X, KstVectorPtr in_Y, 
                   KstVectorView::InterpType itype, 


More information about the Kst mailing list