[Kst] extragear/graphics/kst/kst
Barth Netterfield
netterfield at astro.utoronto.ca
Thu Nov 17 23:52:18 CET 2005
SVN commit 481113 by netterfield:
Arbitrary legend text in histogram dialogs
M +12 -0 ksthsdialog_i.cpp
--- trunk/extragear/graphics/kst/kst/ksthsdialog_i.cpp #481112:481113
@@ -117,6 +117,8 @@
// can't edit curve props from here....
_w->_curveAppearance->hide();
_w->_curvePlacement->hide();
+ _legendText->hide();
+ _legendLabel->hide();
adjustSize();
resize(minimumSizeHint());
@@ -127,6 +129,9 @@
void KstHsDialogI::fillFieldsForNew() {
// set tag name
_tagName->setText(defaultTag);
+ _legendText->setText(defaultTag);
+ _legendText->show();
+ _legendLabel->show();
// set the curve placement window
_w->_curvePlacement->update();
@@ -228,6 +233,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);
+ }
+
KstViewWindow *w = dynamic_cast<KstViewWindow*>(KstApp::inst()->findWindow(_w->_curvePlacement->_plotWindow->currentText()));
if (!w) {
QString n = KstApp::inst()->newWindow(KST::suggestWinName());
More information about the Kst
mailing list