110 connect(curveConfig, SIGNAL(
changed()),
this,
112 connect(curveConfig, SIGNAL(destroyed()),
this,
146 QVector<CurveConfig*> curves;
156 settings.setValue(
"title",
title_);
158 settings.beginGroup(
"curves");
160 for (
size_t index = 0; index <
curveConfig_.count(); ++index) {
161 settings.beginGroup(
"curve_"+QString::number(index));
168 settings.beginGroup(
"axes");
172 settings.beginGroup(
"legend");
176 settings.setValue(
"plot_rate",
plotRate_);
180 setTitle(settings.value(
"title",
"Untitled Curve").toString());
182 settings.beginGroup(
"curves");
184 QStringList groups = settings.childGroups();
187 for (QStringList::iterator it = groups.begin(); it != groups.end(); ++it) {
195 settings.beginGroup(*it);
196 curveConfig->
load(settings);
207 settings.beginGroup(
"axes");
211 settings.beginGroup(
"legend");
215 setPlotRate(settings.value(
"plot_rate", 30.0).toDouble());
233 for (
size_t index = 0; index <
curveConfig_.count(); ++index)
252 for (
size_t index = 0; index <
curveConfig_.count(); ++index)
274 for (
size_t index = 0; index <
curveConfig_.count(); ++index)
290 for (
size_t index = 0; index <
curveConfig_.count(); ++index) {
302 int index =
curveConfig_.indexOf(static_cast<CurveConfig*>(sender()));
308 curveConfig_[i]->getColorConfig()->setAutoColorIndex(i);
void write(QDataStream &stream) const
PlotAxesConfig * getAxesConfig() const
QVector< CurveConfig * > findCurves(const QString &title) const
void write(QDataStream &stream) const
PlotConfig & operator=(const PlotConfig &src)
void write(QDataStream &stream) const
PlotConfig(QObject *parent=0, const QString &title="Untitled Plot", double plotRate=30.0)
QVector< CurveConfig * > curveConfig_
void setNumCurves(size_t numCurves)
PlotLegendConfig * getLegendConfig() const
void load(QSettings &settings)
void read(QDataStream &stream)
void setAutoColorIndex(unsigned char index)
PlotAxesConfig * axesConfig_
void save(QSettings &settings) const
void load(QSettings &settings)
void curveConfigChanged()
const QString & getTitle() const
void save(QSettings &settings) const
double getPlotRate() const
void curveRemoved(size_t index)
PlotLegendConfig * legendConfig_
void setPlotRate(double rate)
CurveConfig * getCurveConfig(size_t index) const
void load(QSettings &settings)
size_t getNumCurves() const
void setTitle(const QString &title)
void removeCurve(CurveConfig *curveConfig)
void save(QSettings &settings) const
void legendConfigChanged()
void curveConfigDestroyed()
CurveColorConfig * getColorConfig() const
void titleChanged(const QString &title)
void curveAdded(size_t index)
void load(QSettings &settings)
void plotRateChanged(double rate)