Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef RQT_MULTIPLOT_PLOT_TABLE_CONFIG_H
00020 #define RQT_MULTIPLOT_PLOT_TABLE_CONFIG_H
00021
00022 #include <QColor>
00023 #include <QVector>
00024
00025 #include <rqt_multiplot/Config.h>
00026 #include <rqt_multiplot/PlotConfig.h>
00027
00028 namespace rqt_multiplot {
00029 class PlotTableConfig :
00030 public Config {
00031 Q_OBJECT
00032 public:
00033 PlotTableConfig(QObject* parent, const QColor& backgroundColor =
00034 Qt::white, const QColor& foregroundColor = Qt::black, size_t
00035 numRows = 1, size_t numColumns = 1, bool linkScale = false,
00036 bool linkCursor = false, bool trackPoints = false);
00037 ~PlotTableConfig();
00038
00039 void setBackgroundColor(const QColor& color);
00040 const QColor& getBackgroundColor() const;
00041 void setForegroundColor(const QColor& color);
00042 const QColor& getForegroundColor() const;
00043 void setNumPlots(size_t numRows, size_t numColumns);
00044 void setNumRows(size_t numRows);
00045 size_t getNumRows() const;
00046 void setNumColumns(size_t numColumns);
00047 size_t getNumColumns() const;
00048 PlotConfig* getPlotConfig(size_t row, size_t column) const;
00049 void setLinkScale(bool link);
00050 bool isScaleLinked() const;
00051 void setLinkCursor(bool link);
00052 bool isCursorLinked() const;
00053 void setTrackPoints(bool track);
00054 bool arePointsTracked() const;
00055
00056 void save(QSettings& settings) const;
00057 void load(QSettings& settings);
00058 void reset();
00059
00060 void write(QDataStream& stream) const;
00061 void read(QDataStream& stream);
00062
00063 PlotTableConfig& operator=(const PlotTableConfig& src);
00064
00065 signals:
00066 void backgroundColorChanged(const QColor& color);
00067 void foregroundColorChanged(const QColor& color);
00068 void numPlotsChanged(size_t numRows, size_t numColumns);
00069 void linkScaleChanged(bool link);
00070 void linkCursorChanged(bool link);
00071 void trackPointsChanged(bool track);
00072
00073 private:
00074 QColor backgroundColor_;
00075 QColor foregroundColor_;
00076 QVector<QVector<PlotConfig*> > plotConfig_;
00077 bool linkScale_;
00078 bool linkCursor_;
00079 bool trackPoints_;
00080
00081 private slots:
00082 void plotConfigChanged();
00083 };
00084 };
00085
00086 #endif