![]() |
open_iA
2020.01
A tool for the visual analysis and processing of volumetric datasets, with a focus on industrial computed tomography.
|
Base class for a module interface. More...
#include <iAModuleInterface.h>
Public Member Functions | |
| virtual void | ChildCreated (MdiChild *child) |
| Called whenever an MdiChild object is created. Override to react on this. More... | |
| iAModuleInterface () | |
| virtual void | Initialize ()=0 |
| Override to add references to the module in the core code, for example menu entries. More... | |
| virtual void | SaveSettings () const |
| Override to store custom settings of this module; called when program is shut down. More... | |
| void | SetDispatcher (iAModuleDispatcher *dispatcher) |
| Called by the module dispatcher on module initialization. There should be no need to call this method from user code. More... | |
| void | SetMainWindow (MainWindow *mainWnd) |
| Called by the module dispatcher on module initialization. There should be no need to call this method from user code. More... | |
| virtual | ~iAModuleInterface () |
Protected Slots | |
| void | attachedChildClosed () |
| void | detach () |
Protected Member Functions | |
| void | AddActionToMenuAlphabeticallySorted (QMenu *menu, QAction *action, bool isDisablable=true) |
| Add an action to a given menu ensuring alphabetic order. More... | |
| bool | AttachToMdiChild (MdiChild *child) |
| Sets up a new attachment for the given MdiChild via CreateAttachment and links the two. More... | |
| virtual iAModuleAttachmentToChild * | CreateAttachment (MainWindow *mainWnd, MdiChild *child) |
| Create a new attachment for the given child. More... | |
| template<class T > | |
| T * | GetAttachment () |
| Get an attachment of the current mdi child. More... | |
| QMenu * | getMenuWithTitle (QMenu *parentMenu, QString const &title, bool isDisablable=true) |
| Retrieve the menu with the given title (or creates it if it doesn't exist yet). More... | |
| bool | isAttached () |
| Return true if attached to current mdi child. More... | |
| void | PrepareActiveChild () |
| Set the currently active child as "current". More... | |
| void | PrepareResultChild (int childInd, QString const &title) |
| Create a new result child at the given index in the MdiChild list with the given title. More... | |
| void | PrepareResultChild (QString const &title) |
| Create a new result child, with a title made from the given title + the previous title of the active child. More... | |
Protected Attributes | |
| QVector< iAModuleAttachmentToChild * > | m_attachments |
| attachments of this module More... | |
| iAModuleDispatcher * | m_dispatcher |
| access to the module dispatcher More... | |
| MainWindow * | m_mainWnd |
| access to the main window More... | |
| MdiChild * | m_mdiChild |
| "current" mdi child More... | |
Base class for a module interface.
A class derived from this class, and having a name in the form iA<ModuleName>ModuleInterface needs to be part of each module. E.g. the XRF module needs to contain a class iAXRFModuleInterface. At least the Initialize method needs to be overriden in order to add the custom code of the module to open_iA. This can either be the addition of some filters, or adding an entry directly to open_iA's toolbar or menu.
| iAModuleInterface::iAModuleInterface | ( | ) |
|
virtual |
|
protected |
Add an action to a given menu ensuring alphabetic order.
| menu | the menu to add the entry to (see e.g. MainWindow::getToolMenu()) |
| action | the action to add to the menu |
| isDisablable | whether the action should be disabled when no child is currently open |
|
protectedslot |
|
protected |
Sets up a new attachment for the given MdiChild via CreateAttachment and links the two.
|
virtual |
Called whenever an MdiChild object is created. Override to react on this.
|
protectedvirtual |
Create a new attachment for the given child.
|
protectedslot |
|
protected |
Get an attachment of the current mdi child.
|
protected |
Retrieve the menu with the given title (or creates it if it doesn't exist yet).
|
pure virtual |
Override to add references to the module in the core code, for example menu entries.
|
protected |
Return true if attached to current mdi child.
|
protected |
Set the currently active child as "current".
|
protected |
Create a new result child at the given index in the MdiChild list with the given title.
|
protected |
Create a new result child, with a title made from the given title + the previous title of the active child.
|
virtual |
Override to store custom settings of this module; called when program is shut down.
| void iAModuleInterface::SetDispatcher | ( | iAModuleDispatcher * | dispatcher | ) |
Called by the module dispatcher on module initialization. There should be no need to call this method from user code.
| void iAModuleInterface::SetMainWindow | ( | MainWindow * | mainWnd | ) |
Called by the module dispatcher on module initialization. There should be no need to call this method from user code.
|
protected |
attachments of this module
|
protected |
access to the module dispatcher
|
protected |
access to the main window
|
protected |
"current" mdi child
1.8.16