CurveConfig.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_CURVE_CONFIG_H
20 #define RQT_MULTIPLOT_CURVE_CONFIG_H
21 
22 #include <QMap>
23 #include <QString>
24 
25 #include <rqt_multiplot/Config.h>
30 
31 namespace rqt_multiplot {
32  class CurveConfig :
33  public Config {
34  Q_OBJECT
35  public:
36  enum Axis {
37  X,
38  Y
39  };
40 
41  static const QString MimeType;
42 
43  CurveConfig(QObject* parent = 0, const QString& title = "Untitled Curve",
44  size_t subscriberQueueSize = 100);
45  ~CurveConfig();
46 
47  void setTitle(const QString& title);
48  const QString& getTitle() const;
49  CurveAxisConfig* getAxisConfig(Axis axis) const;
53  void setSubscriberQueueSize(size_t queueSize);
54  size_t getSubscriberQueueSize() 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 
63  CurveConfig& operator=(const CurveConfig& src);
64 
65  signals:
66  void titleChanged(const QString& title);
67  void subscriberQueueSizeChanged(size_t queueSize);
68 
69  private:
70  QString title_;
71  QMap<Axis, CurveAxisConfig*> axisConfig_;
76 
77  private slots:
78  void axisConfigChanged();
79  void colorConfigChanged();
80  void styleConfigChanged();
81  void dataConfigChanged();
82  };
83 };
84 
85 #endif
void save(QSettings &settings) const
static const QString MimeType
Definition: CurveConfig.h:41
void subscriberQueueSizeChanged(size_t queueSize)
CurveColorConfig * colorConfig_
Definition: CurveConfig.h:72
CurveDataConfig * getDataConfig() const
Definition: CurveConfig.cpp:90
size_t getSubscriberQueueSize() const
CurveAxisConfig * getAxisConfig(Axis axis) const
Definition: CurveConfig.cpp:73
void read(QDataStream &stream)
void load(QSettings &settings)
CurveStyleConfig * styleConfig_
Definition: CurveConfig.h:73
void write(QDataStream &stream) const
QMap< Axis, CurveAxisConfig * > axisConfig_
Definition: CurveConfig.h:71
void titleChanged(const QString &title)
CurveDataConfig * dataConfig_
Definition: CurveConfig.h:74
void setSubscriberQueueSize(size_t queueSize)
Definition: CurveConfig.cpp:94
const QString & getTitle() const
Definition: CurveConfig.cpp:69
CurveConfig(QObject *parent=0, const QString &title="Untitled Curve", size_t subscriberQueueSize=100)
Definition: CurveConfig.cpp:33
void setTitle(const QString &title)
Definition: CurveConfig.cpp:60
CurveStyleConfig * getStyleConfig() const
Definition: CurveConfig.cpp:86
CurveConfig & operator=(const CurveConfig &src)
CurveColorConfig * getColorConfig() const
Definition: CurveConfig.cpp:82


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