pj_plugin.h
Go to the documentation of this file.
1 #ifndef PJ_PLUGIN_H
2 #define PJ_PLUGIN_H
3 
4 #include <QtPlugin>
5 #include <QMenu>
6 #include <QWidget>
7 #include <QDomDocument>
8 
9 class PlotJugglerPlugin: public QObject
10 {
11 
12 public:
14 
15  virtual const char* name() const = 0;
16 
17  virtual bool isDebugPlugin() { return false; }
18 
19  virtual QWidget* optionsWidget() { return nullptr; }
20 
21  virtual bool xmlSaveState(QDomDocument &doc, QDomElement &parent_element) const
22  {
23  return false;
24  }
25 
26  virtual bool xmlLoadState(const QDomElement &parent_element )
27  {
28  return false;
29  }
30 
31  QDomElement xmlSaveState(QDomDocument &doc) const
32  {
33  QDomElement plugin_elem = doc.createElement("plugin");
34  plugin_elem.setAttribute("ID", QString(this->name()).replace(" ", "_") );
35  xmlSaveState(doc, plugin_elem);
36  return plugin_elem;
37  }
38 
39  virtual void addActionsToParentMenu( QMenu* menu ) {}
40 
41 private:
42 
43 };
44 
45 #endif // PJ_PLUGIN_H
virtual void addActionsToParentMenu(QMenu *menu)
Definition: pj_plugin.h:39
virtual bool xmlLoadState(const QDomElement &parent_element)
Definition: pj_plugin.h:26
virtual bool xmlSaveState(QDomDocument &doc, QDomElement &parent_element) const
Definition: pj_plugin.h:21
virtual const char * name() const =0
virtual QWidget * optionsWidget()
Definition: pj_plugin.h:19
virtual bool isDebugPlugin()
Definition: pj_plugin.h:17
QDomElement xmlSaveState(QDomDocument &doc) const
Definition: pj_plugin.h:31


plotjuggler
Author(s): Davide Faconti
autogenerated on Sat Jul 6 2019 03:44:17