[Kst] extragear/graphics/kst/kst

George Staikos staikos at kde.org
Mon Jul 25 20:12:11 CEST 2005


SVN commit 438671 by staikos:

change show() to showing() to make it less confusing (it doesn't show the object
but rather sets the showing state)

fix compile.



 M  +3 -3      datawizard.ui.h  
 M  +3 -3      extensions/js/bind_legend.cpp  
 M  +1 -1      kstlegend.cpp  
 M  +2 -2      kstlegend.h  
 M  +9 -3      kstplotdialog_i.cpp  
 M  +1 -1      main.cpp  


--- trunk/extragear/graphics/kst/kst/datawizard.ui.h #438670:438671
@@ -856,13 +856,13 @@
 	    pp->setTopLabel(QString::null);
 	}
 	if (_legendsOn->isChecked()) {
-	    pp->Legend->setShow(true);
+	    pp->Legend->setShowing(true);
 	    pp->Legend->setFront(true);
 	} else if (_legendsOff->isChecked()) {
-	    pp->Legend->setShow(false);
+	    pp->Legend->setShowing(false);
 	} else if (_legendsAuto->isChecked()) {
 	    if (pp->Curves.count() > 1) {
-		pp->Legend->setShow(true);
+		pp->Legend->setShowing(true);
 		pp->Legend->setFront(true);
 	    }
 	}
--- trunk/extragear/graphics/kst/kst/extensions/js/bind_legend.cpp #438670:438671
@@ -162,7 +162,7 @@
     return;
   }
   KstWriteLocker wl(_d);
-  _d->setShow(value.toBoolean(exec));
+  _d->setShowing(value.toBoolean(exec));
   KstApp::inst()->paintAll(P_PAINT);
 }
 
@@ -170,7 +170,7 @@
 KJS::Value KstBindLegend::enabled(KJS::ExecState *exec) const {
   Q_UNUSED(exec)
   KstReadLocker rl(_d);
-  return KJS::Boolean(_d->getShow());
+  return KJS::Boolean(_d->showing());
 }
 
 
@@ -189,7 +189,7 @@
 KJS::Value KstBindLegend::front(KJS::ExecState *exec) const {
   Q_UNUSED(exec)
   KstReadLocker rl(_d);
-  return KJS::Boolean(_d->getFront());
+  return KJS::Boolean(_d->front());
 }
 
 
--- trunk/extragear/graphics/kst/kst/kstlegend.cpp #438670:438671
@@ -98,7 +98,7 @@
   _doScalarReplacement = in_do;
 }
 
-void KstLegend::setShow(bool bShow) {
+void KstLegend::setShowing(bool bShow) {
   _showLegend = bShow;
 }
 
--- trunk/extragear/graphics/kst/kst/kstlegend.h #438670:438671
@@ -32,8 +32,8 @@
     void setRelPosition(float new_x, float new_y);
     void offsetRelPosition(float offset_x, float offset_y);
     void setJustification(KstJustifyType Justify);
-    void setShow(bool show);
-    bool show() const { return _showLegend; }
+    void setShowing(bool show);
+    bool showing() const { return _showLegend; }
     void setFront(bool in_bFront);
     bool front() const { return _bFront; }
     void setColorBackground( const QColor& in_color );
--- trunk/extragear/graphics/kst/kst/kstplotdialog_i.cpp #438670:438671
@@ -245,9 +245,11 @@
   _minorGridColor->setColor(defaultColor);
 }
 
+
 KstPlotDialogI::~KstPlotDialogI() {
 }
 
+
 void KstPlotDialogI::show_I(const QString& window, const QString& plot) {
   _windowName = window;
   _plotName = plot;
@@ -257,20 +259,23 @@
   update();
 }
 
+
 void KstPlotDialogI::show_I() {
-
   show();
   raise();
   update();
 }
 
+
 void KstPlotDialogI::newTab() {
 }
 
+
 void KstPlotDialogI::updateWindow() {
   updateWindowList();
 }
 
+
 void KstPlotDialogI::setMajorSpacing(QComboBox* majorTicks, int spacing) {
   for (int i = 0; i < (int)numMajorTickSpacings; i++) {
     if (MajorTickSpacings[i].majorTickDensity <= spacing) {
@@ -279,6 +284,7 @@
   }
 }
 
+
 void KstPlotDialogI::update(int new_index) {
   Q_UNUSED(new_index)
 
@@ -498,7 +504,7 @@
     // initialize all the legend settings for the current plot
     LegendFontComboBox->setCurrentFont(plot->Legend->fontName());
     LegendFontSize->setValue(plot->Legend->size());
-    ShowLegend->setChecked(plot->Legend->show());
+    ShowLegend->setChecked(plot->Legend->showing());
     checkBoxVerticalLayout->setChecked(plot->Legend->verticalLayout());
     legendInFront->setChecked(plot->Legend->front());
     legendColors->setForeground(plot->Legend->colorForeground());
@@ -627,7 +633,7 @@
 
     plotExtra->Legend->setFontName(LegendFontComboBox->currentText());
     plotExtra->Legend->setSize(LegendFontSize->value());
-    plotExtra->Legend->setShow(ShowLegend->isChecked());
+    plotExtra->Legend->setShowing(ShowLegend->isChecked());
     plotExtra->Legend->setLayout(layout);
     plotExtra->Legend->setAlignment(alignment);
     plotExtra->Legend->setFront(legendInFront->isChecked());
--- trunk/extragear/graphics/kst/kst/main.cpp #438670:438671
@@ -693,7 +693,7 @@
         plot = *plist.at(i_plot);
         plot->GenerateDefaultLabels();
         if (plot->Curves.count() > 3 || in.dolegend) {
-          plot->Legend->setShow(true);
+          plot->Legend->setShowing(true);
           plot->Legend->setFront(true);
         }
         handled++;


More information about the Kst mailing list