statepublisher_base.h
Go to the documentation of this file.
1 /*
2  * This Source Code Form is subject to the terms of the Mozilla Public
3  * License, v. 2.0. If a copy of the MPL was not distributed with this
4  * file, You can obtain one at https://mozilla.org/MPL/2.0/.
5  */
6 
7 #ifndef STATEPUBLISHER_TEMPLATE_H
8 #define STATEPUBLISHER_TEMPLATE_H
9 
10 #include <QObject>
11 #include <QtPlugin>
12 #include <QMenu>
13 #include <QDomElement>
14 #include <functional>
15 #include "PlotJuggler/plotdata.h"
16 #include "PlotJuggler/pj_plugin.h"
17 
18 namespace PJ
19 {
21 {
22  Q_OBJECT
23 
24 public:
26  virtual bool enabled() const = 0;
27 
29  virtual void updateState(double current_time) = 0;
30 
33  virtual void play(double interval) = 0;
34 
35  virtual ~StatePublisher() = default;
36 
37  void setDataMap(const PlotDataMapRef* datamap)
38  {
39  _datamap = datamap;
40  }
41 
42 public slots:
44  virtual void setEnabled(bool enabled) = 0;
45 
46 signals:
47 
49  void closed();
50 
51 protected:
53 };
54 
55 using StatePublisherPtr = std::shared_ptr<StatePublisher>;
56 
57 } // namespace PJ
58 
59 QT_BEGIN_NAMESPACE
60 #define StatePublisher_iid "facontidavide.PlotJuggler3.StatePublisher"
61 Q_DECLARE_INTERFACE(PJ::StatePublisher, StatePublisher_iid)
62 QT_END_NAMESPACE
63 
64 #endif
PJ::StatePublisher::~StatePublisher
virtual ~StatePublisher()=default
PJ::StatePublisher::enabled
virtual bool enabled() const =0
True if started.
PJ::StatePublisher::closed
void closed()
signal to be emitted when the plugin disable itself.
PJ::PlotJugglerPlugin
The PlotJugglerPlugin is the base class of all the plugins.
Definition: pj_plugin.h:22
PJ::StatePublisher::setDataMap
void setDataMap(const PlotDataMapRef *datamap)
Definition: statepublisher_base.h:37
StatePublisher_iid
#define StatePublisher_iid
Definition: statepublisher_base.h:60
PJ::StatePublisher::setEnabled
virtual void setEnabled(bool enabled)=0
Method called when the checkbox "enabled" is checked in the main app.
plotdata.h
pj_plugin.h
PJ::StatePublisher::play
virtual void play(double interval)=0
PJ
Definition: dataloader_base.h:16
PJ::StatePublisher::updateState
virtual void updateState(double current_time)=0
Method called when the timetracker is moved manually to a certain position.
PJ::PlotDataMapRef
Definition: plotdata.h:34
PJ::StatePublisher
Definition: statepublisher_base.h:20
PJ::StatePublisherPtr
std::shared_ptr< StatePublisher > StatePublisherPtr
Definition: statepublisher_base.h:55
PJ::StatePublisher::_datamap
const PlotDataMapRef * _datamap
Definition: statepublisher_base.h:52


plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Aug 11 2024 02:24:26