[Kst] kdeextragear-2/kst/kst
George Staikos
staikos at kde.org
Thu Mar 4 21:36:34 CET 2004
CVS commit by staikos:
I guess the label code works better for people when I commit it
M +21 -3 datawizard.ui.h 1.11
--- kdeextragear-2/kst/kst/datawizard.ui.h #1.10:1.11
@@ -267,5 +267,4 @@ void DataWizard::finished()
if (_onePlot->isChecked()) {
KstPlot *p = new KstPlot(KST::plotList.generatePlotName());
- p->GenerateDefaultLabels();
if (_legends->isChecked()) {
p->Legend->setShow(true);
@@ -278,5 +277,4 @@ void DataWizard::finished()
for (uint i = 0; i < l.count(); ++i) {
p = new KstPlot(KST::plotList.generatePlotName());
- p->GenerateDefaultLabels();
if (_legends->isChecked()) {
p->Legend->setShow(true);
@@ -296,5 +294,4 @@ void DataWizard::finished()
for (int i = 0; i < _plotNumber->value(); ++i) {
p = new KstPlot(KST::plotList.generatePlotName());
- p->GenerateDefaultLabels();
if (_legends->isChecked()) {
p->Legend->setShow(true);
@@ -338,4 +335,25 @@ void DataWizard::finished()
}
+ bool xl = _xAxisLabels->isChecked();
+ bool yl = _yAxisLabels->isChecked();
+ bool tl = _plotTitles->isChecked();
+
+ if (xl || yl || tl) {
+ pit.toFirst();
+ while (pit.current()) {
+ pit.current()->GenerateDefaultLabels();
+ if (!xl) {
+ pit.current()->setXLabel(QString::null);
+ }
+ if (!yl) {
+ pit.current()->setYLabel(QString::null);
+ }
+ if (!tl) {
+ pit.current()->setTopLabel(QString::null);
+ }
+ ++pit;
+ }
+ }
+
if (relayout) {
KST::plotList.arrangePlots(QMAX(KST::plotList.getPlotCols(), unsigned(sqrt(plots.count()))));
More information about the Kst
mailing list