1 #ifndef ModuleBase_IModule_H
2 #define ModuleBase_IModule_H
9 class Config_WidgetAPI;
10 class ModuleBase_ModelWidget;
13 * Interface to a module
15 class ModuleBase_IModule: public QObject
18 /// Reads description of features from XML file
19 virtual void createFeatures() = 0;
21 /// Called on creation of menu item in desktop
22 virtual void featureCreated(QAction*) = 0;
24 /// Creates an operation and send it to loop
25 /// \param theCmdId the operation name
26 virtual void launchOperation(const QString& theCmdId) = 0;
28 /// Called when it is necessary to update a command state (enable or disable it)
29 //virtual bool isFeatureEnabled(const QString& theCmdId) const = 0;
31 /// Creates custom widgets for property panel
32 virtual QWidget* createWidgetByType(const std::string& theType, QWidget* theParent,
33 Config_WidgetAPI* theWidgetApi, QList<ModuleBase_ModelWidget*>& theModelWidgets)
38 virtual ~ModuleBase_IModule() {};
41 //! This function must return a new module instance.
44 typedef ModuleBase_IModule* (*CREATE_FUNC)(XGUI_Workshop*);
47 #define CREATE_MODULE "createModule"
49 #endif //ModuleBase_IModule