PlotCurve.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_CURVE_H
20 #define RQT_MULTIPLOT_PLOT_CURVE_H
21 
22 #include <QObject>
23 #include <QPair>
24 #include <QPointF>
25 
26 #include <qwt/qwt_plot_curve.h>
27 
31 
32 namespace rqt_multiplot {
33  class CurveData;
34  class CurveDataSequencer;
35 
36  class PlotCurve :
37  public QObject,
38  public QwtPlotCurve {
39  Q_OBJECT
40  public:
41  PlotCurve(QObject* parent = 0);
42  virtual ~PlotCurve();
43 
45  CurveConfig* getConfig() const;
46  void setBroker(MessageBroker* broker);
47  MessageBroker* getBroker() const;
48  CurveData* getData() const;
50  QPair<double, double> getPreferredAxisScale(CurveConfig::Axis
51  axis) const;
53 
54  void attach(QwtPlot* plot);
55  void detach();
56 
57  void run();
58  void pause();
59  void clear();
60 
61  signals:
62  void preferredScaleChanged(const BoundingRectangle& bounds);
63  void replotRequested();
64 
65  private:
67 
69 
72 
73  bool paused_;
74 
75  private slots:
76  void configTitleChanged(const QString& title);
78  void configColorConfigCurrentColorChanged(const QColor& color);
81 
82  void dataSequencerPointReceived(const QPointF& point);
83  };
84 };
85 
86 #endif
PlotCurve(QObject *parent=0)
Definition: PlotCurve.cpp:34
MessageBroker * broker_
Definition: PlotCurve.h:68
MessageBroker * getBroker() const
Definition: PlotCurve.cpp:117
void configTitleChanged(const QString &title)
Definition: PlotCurve.cpp:211
config
CurveData * getData() const
Definition: PlotCurve.cpp:121
void attach(QwtPlot *plot)
Definition: PlotCurve.cpp:170
void setBroker(MessageBroker *broker)
Definition: PlotCurve.cpp:109
CurveConfig * getConfig() const
Definition: PlotCurve.cpp:105
CurveDataSequencer * dataSequencer_
Definition: PlotCurve.h:71
void dataSequencerPointReceived(const QPointF &point)
Definition: PlotCurve.cpp:282
QPair< double, double > getPreferredAxisScale(CurveConfig::Axis axis) const
Definition: PlotCurve.cpp:129
void preferredScaleChanged(const BoundingRectangle &bounds)
BoundingRectangle getPreferredScale() const
Definition: PlotCurve.cpp:158
CurveConfig * config_
Definition: PlotCurve.h:66
void configColorConfigCurrentColorChanged(const QColor &color)
Definition: PlotCurve.cpp:219
void setConfig(CurveConfig *config)
Definition: PlotCurve.cpp:56
CurveDataSequencer * getDataSequencer() const
Definition: PlotCurve.cpp:125


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