CurveAxisConfig.h
Go to the documentation of this file.
00001 /******************************************************************************
00002  * Copyright (C) 2015 by Ralf Kaestner                                        *
00003  * ralf.kaestner@gmail.com                                                    *
00004  *                                                                            *
00005  * This program is free software; you can redistribute it and/or modify       *
00006  * it under the terms of the Lesser GNU General Public License as published by*
00007  * the Free Software Foundation; either version 3 of the License, or          *
00008  * (at your option) any later version.                                        *
00009  *                                                                            *
00010  * This program is distributed in the hope that it will be useful,            *
00011  * but WITHOUT ANY WARRANTY; without even the implied warranty of             *
00012  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the               *
00013  * Lesser GNU General Public License for more details.                        *
00014  *                                                                            *
00015  * You should have received a copy of the Lesser GNU General Public License   *
00016  * along with this program. If not, see <http://www.gnu.org/licenses/>.       *
00017  ******************************************************************************/
00018 
00019 #ifndef RQT_MULTIPLOT_CURVE_AXIS_CONFIG_H
00020 #define RQT_MULTIPLOT_CURVE_AXIS_CONFIG_H
00021 
00022 #include <QString>
00023 
00024 #include <rqt_multiplot/Config.h>
00025 #include <rqt_multiplot/CurveAxisScaleConfig.h>
00026 
00027 namespace rqt_multiplot {
00028   class CurveAxisConfig :
00029     public Config {
00030   Q_OBJECT
00031   public:
00032     enum FieldType {
00033       MessageData,
00034       MessageReceiptTime
00035     };
00036     
00037     CurveAxisConfig(QObject* parent = 0, const QString& topic = QString(),
00038       const QString& type = QString(), FieldType fieldType = MessageData,
00039       const QString& field = QString());
00040     ~CurveAxisConfig();
00041 
00042     void setTopic(const QString& topic);
00043     const QString& getTopic() const;
00044     void setType(const QString& type);
00045     const QString& getType() const;
00046     void setFieldType(FieldType fieldType);
00047     FieldType getFieldType() const;
00048     void setField(const QString& field);
00049     const QString& getField() const;
00050     CurveAxisScaleConfig* getScaleConfig() const;
00051   
00052     void save(QSettings& settings) const;
00053     void load(QSettings& settings);
00054     void reset();
00055     
00056     void write(QDataStream& stream) const;
00057     void read(QDataStream& stream);
00058     
00059     CurveAxisConfig& operator=(const CurveAxisConfig& src);
00060     
00061   signals:
00062     void topicChanged(const QString& topic);
00063     void typeChanged(const QString& type);
00064     void fieldTypeChanged(int fieldType);
00065     void fieldChanged(const QString& field);
00066     
00067   private:
00068     QString topic_;
00069     QString type_;
00070     FieldType fieldType_;
00071     QString field_;
00072     
00073     CurveAxisScaleConfig* scaleConfig_;
00074     
00075   private slots:
00076     void scaleChanged();
00077   };
00078 };
00079 
00080 #endif


rqt_multiplot
Author(s): Ralf Kaestner
autogenerated on Tue May 9 2017 02:16:02