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)
58 Q_PROPERTY(QStringList topLevelCategoryOrder READ topLevelCategoryOrder WRITE setTopLevelCategoryOrder)
70 Q_INVOKABLE QAction* moduleAction(const QString& moduleName)const;
73 inline
void addModules(const QStringList& moduleNames);
76 inline
void removeModules(const QStringList& moduleNames);
79 QString currentModule()const;
85 void setDuplicateActions(
bool duplicate);
86 bool duplicateActions()const;
90 void setShowHiddenModules(
bool show);
91 bool showHiddenModules()const;
93 void setTopLevelCategoryOrder(const QStringList& categories);
94 QStringList topLevelCategoryOrder()const;
101 Q_INVOKABLE
bool removeCategory(const QString& categoryName);
113 void addModule(const QString& moduleName);
123 bool removeModule(const QString& moduleName);
127 void setCurrentModuleByTitle(const QString& title);
131 void setCurrentModule(const QString& moduleName);
148 void currentModuleChanged(const QString& name);
151 void onActionTriggered();
152 void actionSelected(QAction* action);
155 QScopedPointer<qSlicerModulesMenuPrivate> d_ptr;
165 foreach(
const QString& moduleName, moduleNames)
167 this->addModule(moduleName);
174 foreach(
const QString& moduleName, moduleNames)
176 this->removeModule(moduleName);
qSlicerAbstractCoreModule is the base class of any module in Slicer.