21 #ifndef __qSlicerModulesMenu_h 22 #define __qSlicerModulesMenu_h 28 #include "qSlicerBaseQTGUIExport.h" 31 class qSlicerModulesMenuPrivate;
40 Q_PROPERTY(QString currentModule READ currentModule WRITE setCurrentModule NOTIFY currentModuleChanged)
48 Q_PROPERTY(
bool duplicateActions READ duplicateActions WRITE setDuplicateActions)
56 Q_PROPERTY(
bool showHiddenModules READ showHiddenModules WRITE setShowHiddenModules)
68 QAction* moduleAction(const QString& moduleName)const;
71 inline
void addModules(const QStringList& moduleNames);
74 inline
void removeModules(const QStringList& moduleNames);
77 QString currentModule()const;
83 void setDuplicateActions(
bool duplicate);
84 bool duplicateActions()const;
88 void setShowHiddenModules(
bool show);
89 bool showHiddenModules()const;
99 void addModule(const QString& moduleName);
102 void removeModule(const QString& moduleName);
105 void setCurrentModuleByTitle(const QString& title);
108 void setCurrentModule(const QString& moduleName);
113 void currentModuleChanged(const QString& name);
116 void onActionTriggered();
117 void actionSelected(QAction* action);
120 QScopedPointer<qSlicerModulesMenuPrivate> d_ptr;
133 foreach(
const QString& moduleName, moduleNames)
135 this->addModule(moduleName);
142 foreach(
const QString& moduleName, moduleNames)
144 this->removeModule(moduleName);
qSlicerAbstractCoreModule is the base class of any module in Slicer.