1 #ifndef ModuleBase_IModule_H
2 #define ModuleBase_IModule_H
11 * Interface to a module
13 class ModuleBase_IModule: public QObject
16 /// Reads description of features from XML file
17 virtual void createFeatures() = 0;
19 /// Called on creation of menu item in desktop
20 virtual void featureCreated(QAction*) = 0;
22 /// Creates an operation and send it to loop
23 /// \param theCmdId the operation name
24 virtual void launchOperation(const QString& theCmdId) = 0;
26 /// Called when it is necessary to update a command state (enable or disable it)
27 virtual bool isFeatureEnabled(const QString& theCmdId) const = 0;
29 virtual ~ModuleBase_IModule() {};
32 //! This function must return a new module instance.
35 typedef ModuleBase_IModule* (*CREATE_FUNC)(XGUI_Workshop*);
38 #define CREATE_MODULE "createModule"
40 #endif //ModuleBase_IModule