toolbox_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 PJ_TOOLBOX_BASE_H
8 #define PJ_TOOLBOX_BASE_H
9 
10 #include <QAction>
11 
12 #include <functional>
13 #include "PlotJuggler/plotdata.h"
14 #include "PlotJuggler/pj_plugin.h"
16 
17 namespace PJ
18 {
20 {
21  Q_OBJECT
22 
23 public:
24  ToolboxPlugin() = default;
25 
26  virtual void init(PlotDataMapRef& src_data, TransformsMap& transform_map) = 0;
27 
28  virtual ~ToolboxPlugin() = default;
29 
31  {
34  };
35 
36  virtual std::pair<QWidget*, WidgetType> providedWidget() const = 0;
37 
38 public slots:
39 
40  virtual bool onShowWidget() = 0;
41 
42 signals:
43 
44  void plotCreated(std::string plot_name);
45 
46  void closed();
47 };
48 
49 using ToolboxPluginPtr = std::shared_ptr<ToolboxPlugin>;
50 
51 } // namespace PJ
52 
53 QT_BEGIN_NAMESPACE
54 #define Toolbox_iid "facontidavide.PlotJuggler3.Toolbox"
55 Q_DECLARE_INTERFACE(PJ::ToolboxPlugin, Toolbox_iid)
56 QT_END_NAMESPACE
57 
58 #endif
virtual std::pair< QWidget *, WidgetType > providedWidget() const =0
std::unordered_map< std::string, std::shared_ptr< TransformFunction > > TransformsMap
virtual void init(PlotDataMapRef &src_data, TransformsMap &transform_map)=0
void plotCreated(std::string plot_name)
#define Toolbox_iid
Definition: toolbox_base.h:54
std::shared_ptr< ToolboxPlugin > ToolboxPluginPtr
Definition: toolbox_base.h:49
virtual bool onShowWidget()=0
virtual ~ToolboxPlugin()=default
ToolboxPlugin()=default
The PlotJugglerPlugin is the base class of all the plugins.
Definition: pj_plugin.h:22


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Jun 19 2023 03:12:53