#include <Base/QTGUI/qSlicerModulesMenu.h>
|
void | addModule (const QString &moduleName) |
|
void | removeModule (const QString &moduleName) |
| Remove the module from the list of available module. More...
|
|
void | setCurrentModule (const QString &moduleName) |
| Select a module by name. It looks for the module action and triggers it. More...
|
|
void | setCurrentModuleByTitle (const QString &title) |
| Select a module by title. It looks for the module action and triggers it. More...
|
|
|
QScopedPointer< qSlicerModulesMenuPrivate > | d_ptr |
|
qSlicerModulesMenu supports a tree hierarchy of modules (based on module->category() )
Definition at line 37 of file qSlicerModulesMenu.h.
◆ Superclass
◆ currentModule
QString qSlicerModulesMenu::currentModule |
|
readwrite |
◆ duplicateActions
bool qSlicerModulesMenu::duplicateActions |
|
readwrite |
By default (duplicateActions = false), multiple instances of qSlicerModulesMenu share the same QActions. When a module QAction is fired from a menu, all the qSlicerModulesMenu would make it the current module. When duplicateActions is true, the QActions populating the menu are duplicates from the original module QAction. That way the qSlicerModulesMenu behaves independently from the other qSlicerModulesMenus. Note: this property should be set before moduels are added (addModule()).
Definition at line 48 of file qSlicerModulesMenu.h.
◆ showHiddenModules
bool qSlicerModulesMenu::showHiddenModules |
|
readwrite |
By default (showHiddenModules == false), modules with the hidden property set to true are not shown. If showHiddenModules is true, all the modules are visible. Note: this property should be set before modules are added (addModule), changing its value won't change the visibility of the current volumes but only the future added modules
Definition at line 56 of file qSlicerModulesMenu.h.
◆ qSlicerModulesMenu() [1/2]
qSlicerModulesMenu::qSlicerModulesMenu |
( |
const QString & |
title, |
|
|
QWidget * |
parent = 0 |
|
) |
| |
Constructor title is the name of the menu (can appear using right click on the toolbar area)
◆ qSlicerModulesMenu() [2/2]
qSlicerModulesMenu::qSlicerModulesMenu |
( |
QWidget * |
parent = 0 | ) |
|
◆ ~qSlicerModulesMenu()
virtual qSlicerModulesMenu::~qSlicerModulesMenu |
( |
| ) |
|
|
virtual |
◆ actionSelected
void qSlicerModulesMenu::actionSelected |
( |
QAction * |
action | ) |
|
|
protectedslot |
◆ addModule [1/2]
void qSlicerModulesMenu::addModule |
( |
const QString & |
moduleName | ) |
|
|
slot |
Add a module by name into the menu. The category property of the module is used to assign a submenu to the module action. If a module is hidden and showHiddenModules is false (default), the module is ignored and not added into the list
- See also
- qSlicerAbstractCoreModule::category()
-
qSlicerAbstractCoreModule::action()
-
qSlicerAbstractCoreModule::isHidden()
◆ addModule() [2/2]
◆ addModules()
void qSlicerModulesMenu::addModules |
( |
const QStringList & |
moduleNames | ) |
|
|
inline |
◆ currentModule()
QString qSlicerModulesMenu::currentModule |
( |
| ) |
const |
Return the last selected module name.
◆ currentModuleChanged
void qSlicerModulesMenu::currentModuleChanged |
( |
const QString & |
name | ) |
|
|
signal |
The signal is fired every time a module is selected. The QAction of the module is triggered.
◆ duplicateActions()
bool qSlicerModulesMenu::duplicateActions |
( |
| ) |
const |
◆ moduleAction()
QAction* qSlicerModulesMenu::moduleAction |
( |
const QString & |
moduleName | ) |
const |
◆ moduleManager()
◆ onActionTriggered
void qSlicerModulesMenu::onActionTriggered |
( |
| ) |
|
|
protectedslot |
◆ removeModule [1/2]
void qSlicerModulesMenu::removeModule |
( |
const QString & |
moduleName | ) |
|
|
slot |
Remove the module from the list of available module.
◆ removeModule() [2/2]
◆ removeModules()
void qSlicerModulesMenu::removeModules |
( |
const QStringList & |
moduleNames | ) |
|
|
inline |
◆ setCurrentModule
void qSlicerModulesMenu::setCurrentModule |
( |
const QString & |
moduleName | ) |
|
|
slot |
Select a module by name. It looks for the module action and triggers it.
◆ setCurrentModuleByTitle
void qSlicerModulesMenu::setCurrentModuleByTitle |
( |
const QString & |
title | ) |
|
|
slot |
Select a module by title. It looks for the module action and triggers it.
◆ setDuplicateActions()
void qSlicerModulesMenu::setDuplicateActions |
( |
bool |
duplicate | ) |
|
◆ setModuleManager()
Set the module manager to retrieve the modules from.
◆ setShowHiddenModules()
void qSlicerModulesMenu::setShowHiddenModules |
( |
bool |
show | ) |
|
If true, modules with the hidden property set to true are still visible in the module.
◆ showHiddenModules()
bool qSlicerModulesMenu::showHiddenModules |
( |
| ) |
const |
◆ d_ptr
QScopedPointer<qSlicerModulesMenuPrivate> qSlicerModulesMenu::d_ptr |
|
protected |
The documentation for this class was generated from the following file: