QCAD
Open Source 2D CAD
RPluginInterface.h
Go to the documentation of this file.
1 
20 #ifndef RPLUGININTERFACE_H
21 #define RPLUGININTERFACE_H
22 
23 #include "core_global.h"
24 
25 #include <QtPlugin>
26 #include <QMetaType>
27 
28 #include "RPluginInfo.h"
29 
30 class QString;
31 class QScriptEngine;
32 
40 public:
41  enum InitStatus {
49  AllDone
50  };
51 
52 public:
53  virtual ~RPluginInterface() {}
54 
60  virtual bool init() = 0;
61 
65  virtual void uninit(bool remove = false) = 0;
66 
72  virtual void postInit(RPluginInterface::InitStatus status) = 0;
73 
81  virtual void initScriptExtensions(QScriptEngine& engine) = 0;
82 
93  virtual RPluginInfo getPluginInfo() = 0;
94 };
95 
96 QT_BEGIN_NAMESPACE
97 Q_DECLARE_INTERFACE(RPluginInterface, "org.qcad.QCAD.RPluginInterface/1.0")
98 QT_END_NAMESPACE
99 
103 
104 #endif
Information about a plugin.
Definition: RPluginInfo.h:42
Interface for all C++ QCAD plugins.
Definition: RPluginInterface.h:39
#define QCADCORE_EXPORT
Definition: core_global.h:10
Loaded files given on command line.
Definition: RPluginInterface.h:47
Main window with all tools and menus has been created.
Definition: RPluginInterface.h:46
Main window created but not shown yet.
Definition: RPluginInterface.h:45
Splashscreen showing.
Definition: RPluginInterface.h:42
Q_DECLARE_METATYPE(RMath *)
InitStatus
Definition: RPluginInterface.h:41
Actions have been added to widgets.
Definition: RPluginInterface.h:44
Executed scripts given on command line.
Definition: RPluginInterface.h:48
Add ons are initialized, actions created but not added to widgets.
Definition: RPluginInterface.h:43
void init(void basePath)
Definition: AddBlockInit.js:2
virtual ~RPluginInterface()
Definition: RPluginInterface.h:53
void postInit()
Definition: CheckForUpdatesPostInit.js:2