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

Mike Fenton mike at staikos.net
Tue Feb 12 21:30:57 CET 2008


SVN commit 774235 by fenton:

Add interface for log axis.


 M  +22 -0     plotitem.cpp  
 M  +8 -0      plotitem.h  
 M  +2 -0      plotrenderitemdialog.cpp  


--- branches/work/kst/portto4/kst/src/libkstapp/plotitem.cpp #774234:774235
@@ -52,6 +52,8 @@
   _calculatedLabelMarginHeight(0.0),
   _calculatedAxisMarginWidth(0.0),
   _calculatedAxisMarginHeight(0.0),
+  _xAxisLog(false),
+  _yAxisLog(false),
   _xAxisReversed(false),
   _yAxisReversed(false),
   _xAxisBaseOffset(false),
@@ -921,6 +923,26 @@
 }
 
 
+bool PlotItem::xAxisLog() const {
+  return _xAxisLog;
+}
+
+
+void PlotItem::setXAxisLog(bool log) {
+  _xAxisLog = log;
+}
+
+
+bool PlotItem::yAxisLog() const {
+  return _yAxisLog;
+}
+
+
+void PlotItem::setYAxisLog(bool log) {
+  _yAxisLog = log;
+}
+
+
 PlotItem::MajorTickMode PlotItem::xAxisMajorTickMode() const {
   return _xAxisMajorTickMode;
 }
--- branches/work/kst/portto4/kst/src/libkstapp/plotitem.h #774234:774235
@@ -174,6 +174,12 @@
     QFont bottomLabelFont() const;
     void setBottomLabelFont(const QFont &font);
 
+    bool xAxisLog() const;
+    void setXAxisLog(bool log);
+
+    bool yAxisLog() const;
+    void setYAxisLog(bool log);
+
     bool xAxisReversed() const;
     void setXAxisReversed(const bool enabled);
 
@@ -318,6 +324,8 @@
     QFont _topLabelFont;
     QFont _rightLabelFont;
 
+    bool _xAxisLog;
+    bool _yAxisLog;
     bool _xAxisReversed;
     bool _yAxisReversed;
     bool _xAxisBaseOffset;
--- branches/work/kst/portto4/kst/src/libkstapp/plotrenderitemdialog.cpp #774234:774235
@@ -341,6 +341,7 @@
   _plotItem->plotItem()->setXAxisMinorGridLineColor(_xAxisTab->axisMinorGridLineColor());
   _plotItem->plotItem()->setXAxisMajorGridLineStyle(_xAxisTab->axisMajorGridLineStyle());
   _plotItem->plotItem()->setXAxisMinorGridLineStyle(_xAxisTab->axisMinorGridLineStyle());
+  _plotItem->plotItem()->setXAxisLog(_xAxisTab->isLog());
   _plotItem->setXAxisLog(_xAxisTab->isLog());
   _plotItem->plotItem()->setXAxisReversed(_xAxisTab->isReversed());
   _plotItem->plotItem()->setXAxisInterpret(_xAxisTab->isInterpret());
@@ -363,6 +364,7 @@
   _plotItem->plotItem()->setYAxisMinorGridLineColor(_yAxisTab->axisMinorGridLineColor());
   _plotItem->plotItem()->setYAxisMajorGridLineStyle(_yAxisTab->axisMajorGridLineStyle());
   _plotItem->plotItem()->setYAxisMinorGridLineStyle(_yAxisTab->axisMinorGridLineStyle());
+  _plotItem->plotItem()->setYAxisLog(_yAxisTab->isLog());
   _plotItem->setYAxisLog(_yAxisTab->isLog());
   _plotItem->plotItem()->setYAxisReversed(_yAxisTab->isReversed());
   _plotItem->plotItem()->setYAxisInterpret(_yAxisTab->isInterpret());


More information about the Kst mailing list