CurveColorConfig.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_COLOR_CONFIG_H
20 #define RQT_MULTIPLOT_CURVE_COLOR_CONFIG_H
21 
22 #include <QColor>
23 
24 #include <rqt_multiplot/Config.h>
25 
26 namespace rqt_multiplot {
28  public Config {
29  Q_OBJECT
30  public:
31  enum Type {
34  };
35 
36  CurveColorConfig(QObject* parent = 0, Type type = Auto, unsigned char
37  autoColorIndex = 0, const QColor& customColor = Qt::black);
39 
40  void setType(Type type);
41  Type getType() const;
42  void setAutoColorIndex(unsigned char index);
43  unsigned char getAutoColorIndex() const;
44  void setCustomColor(const QColor& color);
45  const QColor& getCustomColor() const;
46  QColor getCurrentColor() const;
47 
48  void save(QSettings& settings) const;
49  void load(QSettings& settings);
50  void reset();
51 
52  void write(QDataStream& stream) const;
53  void read(QDataStream& stream);
54 
56 
57  signals:
58  void typeChanged(int type);
59  void autoColorIndexChanged(unsigned char index);
60  void customColorChanged(const QColor& color);
61  void currentColorChanged(const QColor& color);
62 
63  private:
65  unsigned char autoColorIndex_;
66  QColor customColor_;
67  };
68 };
69 
70 #endif
CurveColorConfig(QObject *parent=0, Type type=Auto, unsigned char autoColorIndex=0, const QColor &customColor=Qt::black)
const QColor & getCustomColor() const
void customColorChanged(const QColor &color)
void load(QSettings &settings)
void save(QSettings &settings) const
CurveColorConfig & operator=(const CurveColorConfig &src)
unsigned char getAutoColorIndex() const
void write(QDataStream &stream) const
void setAutoColorIndex(unsigned char index)
void read(QDataStream &stream)
void currentColorChanged(const QColor &color)
void autoColorIndexChanged(unsigned char index)
void setCustomColor(const QColor &color)


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