[Kst] extragear/graphics/kst/kst

Barth Netterfield netterfield at astro.utoronto.ca
Thu Nov 17 23:27:22 CET 2005


SVN commit 481109 by netterfield:

Legend text works for the psd dialog now.



 M  +1 -1      kstbasecurve.cpp  
 M  +1 -1      kstdatadialog.ui  
 M  +13 -1     kstpsddialog_i.cpp  


--- trunk/extragear/graphics/kst/kst/kstbasecurve.cpp #481108:481109
@@ -56,7 +56,7 @@
 void KstBaseCurve::updateParsedLegendTag() {  
   delete _parsedLegendTag; 
   if (_legendText.isEmpty()) {
-    _parsedLegendTag = Label::parse(tagName(), true);
+    _parsedLegendTag = Label::parse(tagName(), false);
   } else {
     _parsedLegendTag = Label::parse(legendText(), true);
   }
--- trunk/extragear/graphics/kst/kst/kstdatadialog.ui #481108:481109
@@ -149,7 +149,7 @@
 		</widget>
 		<widget class="QLabel" row="1" column="0">
 			<property name="name">
-				<cstring>_selectLabel2</cstring>
+				<cstring>_legendLabel</cstring>
 			</property>
 			<property name="sizePolicy">
 				<sizepolicy>
--- trunk/extragear/graphics/kst/kst/kstpsddialog_i.cpp #481108:481109
@@ -104,6 +104,8 @@
 
   _w->_curveAppearance->hide();
   _w->_curvePlacement->hide();
+  _legendText->hide();
+  _legendLabel->hide();
   adjustSize();
   resize(minimumSizeHint());
   setFixedHeight(height());
@@ -112,6 +114,9 @@
 
 void KstPsdDialogI::fillFieldsForNew() {
   _tagName->setText(defaultTag);
+  _legendText->setText(defaultTag);
+  _legendText->show();
+  _legendLabel->show();
   _w->_curvePlacement->update();
   _w->_kstFFTOptions->update();
 
@@ -184,6 +189,13 @@
     vc->setBarStyle(_w->_curveAppearance->barStyle());
     vc->setPointDensity(_w->_curveAppearance->pointDensity());
 
+    QString legend_text = _legendText->text();
+    if (legend_text == defaultTag) {
+      vc->setLegendText(QString(""));
+    } else {
+      vc->setLegendText(legend_text);
+    }
+
     Kst2DPlotPtr plot;
     KstViewWindow *w = dynamic_cast<KstViewWindow*>(KstApp::inst()->findWindow(_w->_curvePlacement->_plotWindow->currentText()));
     if (!w) {
@@ -391,7 +403,7 @@
   
   _tagName->setText("");
   _tagName->setEnabled(false);
-  
+
   // and clean all the fields
   _vectorDirty = false;
   _apodizeDirty = false;


More information about the Kst mailing list