PlotTableConfig.h
Go to the documentation of this file.
1 /******************************************************************************
2  * Copyright (C) 2015 by Ralf Kaestner *
3  * ralf.kaestner@gmail.com *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the Lesser GNU General Public License as published by*
7  * the Free Software Foundation; either version 3 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * Lesser GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the Lesser GNU General Public License *
16  * along with this program. If not, see <http://www.gnu.org/licenses/>. *
17  ******************************************************************************/
18 
19 #ifndef RQT_MULTIPLOT_PLOT_TABLE_CONFIG_H
20 #define RQT_MULTIPLOT_PLOT_TABLE_CONFIG_H
21 
22 #include <QColor>
23 #include <QVector>
24 
25 #include <rqt_multiplot/Config.h>
27 
28 namespace rqt_multiplot {
30  public Config {
31  Q_OBJECT
32  public:
33  PlotTableConfig(QObject* parent, const QColor& backgroundColor =
34  Qt::white, const QColor& foregroundColor = Qt::black, size_t
35  numRows = 1, size_t numColumns = 1, bool linkScale = false,
36  bool linkCursor = false, bool trackPoints = false);
38 
39  void setBackgroundColor(const QColor& color);
40  const QColor& getBackgroundColor() const;
41  void setForegroundColor(const QColor& color);
42  const QColor& getForegroundColor() const;
43  void setNumPlots(size_t numRows, size_t numColumns);
44  void setNumRows(size_t numRows);
45  size_t getNumRows() const;
46  void setNumColumns(size_t numColumns);
47  size_t getNumColumns() const;
48  PlotConfig* getPlotConfig(size_t row, size_t column) const;
49  void setLinkScale(bool link);
50  bool isScaleLinked() const;
51  void setLinkCursor(bool link);
52  bool isCursorLinked() const;
53  void setTrackPoints(bool track);
54  bool arePointsTracked() const;
55 
56  void save(QSettings& settings) const;
57  void load(QSettings& settings);
58  void reset();
59 
60  void write(QDataStream& stream) const;
61  void read(QDataStream& stream);
62 
64 
65  signals:
66  void backgroundColorChanged(const QColor& color);
67  void foregroundColorChanged(const QColor& color);
68  void numPlotsChanged(size_t numRows, size_t numColumns);
69  void linkScaleChanged(bool link);
70  void linkCursorChanged(bool link);
71  void trackPointsChanged(bool track);
72 
73  private:
76  QVector<QVector<PlotConfig*> > plotConfig_;
77  bool linkScale_;
80 
81  private slots:
82  void plotConfigChanged();
83  };
84 };
85 
86 #endif
QVector< QVector< PlotConfig * > > plotConfig_
void linkScaleChanged(bool link)
void load(QSettings &settings)
const QColor & getForegroundColor() const
void backgroundColorChanged(const QColor &color)
void setNumColumns(size_t numColumns)
void foregroundColorChanged(const QColor &color)
PlotConfig * getPlotConfig(size_t row, size_t column) const
const QColor & getBackgroundColor() const
void setForegroundColor(const QColor &color)
void linkCursorChanged(bool link)
void save(QSettings &settings) const
void write(QDataStream &stream) const
PlotTableConfig & operator=(const PlotTableConfig &src)
void setBackgroundColor(const QColor &color)
PlotTableConfig(QObject *parent, const QColor &backgroundColor=Qt::white, const QColor &foregroundColor=Qt::black, size_t numRows=1, size_t numColumns=1, bool linkScale=false, bool linkCursor=false, bool trackPoints=false)
void trackPointsChanged(bool track)
void numPlotsChanged(size_t numRows, size_t numColumns)
void setNumPlots(size_t numRows, size_t numColumns)
void read(QDataStream &stream)


rqt_multiplot
Author(s): Ralf Kaestner
autogenerated on Wed Jul 10 2019 03:49:44