[Kst] branches/work/kst/portto4/kst/src
Barth Netterfield
netterfield at astro.utoronto.ca
Sat Feb 26 17:05:52 CET 2011
SVN commit 1222844 by netterfield:
Add sticky 'vertical layout' legend option to data wizard.
M +1 -2 libkst/vector.cpp
M +8 -0 libkstapp/datawizard.cpp
M +1 -0 libkstapp/datawizard.h
M +8 -1 libkstapp/datawizardpageplot.ui
--- branches/work/kst/portto4/kst/src/libkst/vector.cpp #1222843:1222844
@@ -2,7 +2,7 @@
vector.cpp - description
-------------------
begin : Fri Sep 22 2000
- copyright : (C) 2000-2002 by cbn
+ copyright : (C) 2000-2011 by C. Barth Netterfield
email : netterfield at astro.utoronto.ca
***************************************************************************/
@@ -28,7 +28,6 @@
#include "datacollection.h"
#include "math_kst.h"
#include "vector.h"
-//#include "scalar.h"
#include "debug.h"
#include "objectstore.h"
#include "updatemanager.h"
--- branches/work/kst/portto4/kst/src/libkstapp/datawizard.cpp #1222843:1222844
@@ -422,6 +422,10 @@
return _legendsAuto->isChecked();
}
+bool DataWizardPagePlot::legendsVertical() const {
+ return _legendsVertical->isChecked();
+}
+
bool DataWizardPagePlot::rescaleFonts() const {
return _rescaleFonts->isChecked();
}
@@ -454,6 +458,7 @@
_legendsOn->setChecked(_dialogDefaults->value("wizard/legendsOn",false).toBool());
_legendsAuto->setChecked(_dialogDefaults->value("wizard/legendsAuto",false).toBool());
+ _legendsVertical->setChecked(_dialogDefaults->value("legend/verticalDisplay",false).toBool());
_rescaleFonts->setChecked(_dialogDefaults->value("wizard/rescaleFonts", true).toBool());
_shareAxis->setChecked(_dialogDefaults->value("wizard/shareAxis", false).toBool());
@@ -716,6 +721,7 @@
_dialogDefaults->setValue("wizard/legendsOn", _pagePlot->legendsOn());
_dialogDefaults->setValue("wizard/legendsAuto", _pagePlot->legendsAuto());
+ _dialogDefaults->setValue("legend/verticalDisplay", _pagePlot->legendsVertical());
_dialogDefaults->setValue("wizard/logX", _pagePlot->PSDLogX());
_dialogDefaults->setValue("wizard/logY", _pagePlot->PSDLogY());
@@ -1119,9 +1125,11 @@
foreach (PlotItem* plot, plotList) {
if (_pagePlot->legendsOn()) {
plot->setShowLegend(true, true);
+ plot->legend()->setVerticalDisplay(_pagePlot->legendsVertical());
} else if (_pagePlot->legendsAuto()) {
if (plot->renderItem(PlotRenderItem::Cartesian)->relationList().count() > 1) {
plot->setShowLegend(true, true);
+ plot->legend()->setVerticalDisplay(_pagePlot->legendsVertical());
}
}
}
--- branches/work/kst/portto4/kst/src/libkstapp/datawizard.h #1222843:1222844
@@ -119,6 +119,7 @@
bool legendsOn() const;
bool legendsAuto() const;
+ bool legendsVertical() const;
bool rescaleFonts() const;
bool shareAxis() const;
--- branches/work/kst/portto4/kst/src/libkstapp/datawizardpageplot.ui #1222843:1222844
@@ -6,7 +6,7 @@
<rect>
<x>0</x>
<y>0</y>
- <width>624</width>
+ <width>653</width>
<height>376</height>
</rect>
</property>
@@ -322,6 +322,13 @@
</property>
</widget>
</item>
+ <item row="1" column="0">
+ <widget class="QCheckBox" name="_legendsVertical">
+ <property name="text">
+ <string>&Vertical</string>
+ </property>
+ </widget>
+ </item>
</layout>
</widget>
</item>
More information about the Kst
mailing list