open_iA 2021.08
A tool for the visual analysis and processing of volumetric datasets, with a focus on industrial computed tomography.
Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes | List of all members
iAGUIModuleInterface Class Referenceabstract

Base class for a module interface. More...

#include <iAGUIModuleInterface.h>

Inheritance diagram for iAGUIModuleInterface:
[legend]
Collaboration diagram for iAGUIModuleInterface:
[legend]

Public Member Functions

 iAGUIModuleInterface ()
 
virtual ~iAGUIModuleInterface ()
 
virtual void ChildCreated (iAMdiChild *child)
 Called whenever an iAMdiChild object is created. Override to react on this. More...
 
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 SetMainWindow (iAMainWindow *mainWnd)
 Called by the module dispatcher on module initialization. There should be no need to call this method from user code. More...
 
- Public Member Functions inherited from iAModuleInterface
virtual ~iAModuleInterface ()
 

Protected Slots

void attachedChildClosed ()
 
void detach ()
 

Protected Member Functions

template<class T >
T * attachment (iAMdiChild *child)
 Get an attachment of an mdi child; the type of attachment is given by the templated type. More...
 
bool AttachToMdiChild (iAMdiChild *child)
 Sets up a new attachment for the given iAMdiChild via CreateAttachment and links the two. More...
 
virtual iAModuleAttachmentToChildCreateAttachment (iAMainWindow *mainWnd, iAMdiChild *child)
 Create a new attachment for the given child. 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 iAMdiChild 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...
 
iAMainWindowm_mainWnd
 access to the main window More...
 
iAMdiChildm_mdiChild
 "current" mdi child More...
 

Detailed Description

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 FeatureScout module needs to contain a class iAFeatureScoutModuleInterface. 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.

Constructor & Destructor Documentation

◆ iAGUIModuleInterface()

iAGUIModuleInterface::iAGUIModuleInterface ( )

◆ ~iAGUIModuleInterface()

iAGUIModuleInterface::~iAGUIModuleInterface ( )
virtual

Member Function Documentation

◆ attachedChildClosed

void iAGUIModuleInterface::attachedChildClosed ( )
protectedslot

◆ attachment()

template<class T >
T * iAGUIModuleInterface::attachment ( iAMdiChild child)
protected

Get an attachment of an mdi child; the type of attachment is given by the templated type.

Call by explicitly specifying a type, e.g. auto attach = GetAttachment<iAMyModuleAttachment>();

Parameters
childthe child window to check for attachments

◆ AttachToMdiChild()

bool iAGUIModuleInterface::AttachToMdiChild ( iAMdiChild child)
protected

Sets up a new attachment for the given iAMdiChild via CreateAttachment and links the two.

◆ ChildCreated()

void iAGUIModuleInterface::ChildCreated ( iAMdiChild child)
virtual

Called whenever an iAMdiChild object is created. Override to react on this.

◆ CreateAttachment()

iAModuleAttachmentToChild * iAGUIModuleInterface::CreateAttachment ( iAMainWindow mainWnd,
iAMdiChild child 
)
protectedvirtual

Create a new attachment for the given child.

◆ detach

void iAGUIModuleInterface::detach ( )
protectedslot

◆ Initialize()

virtual void iAGUIModuleInterface::Initialize ( )
pure virtual

Override to add references to the module in the core code, for example menu entries.

Implements iAModuleInterface.

◆ isAttached()

bool iAGUIModuleInterface::isAttached ( )
protected

Return true if attached to current mdi child.

Note
: current mdi child is determined through m_mdiChild member which is not automatically updated to the active mdi child!

◆ PrepareActiveChild()

void iAGUIModuleInterface::PrepareActiveChild ( )
protected

Set the currently active child as "current".

Deprecated:
. Don't use m_mdichild mechanism, use activeMdiChild from iAMainWindow directly.

◆ PrepareResultChild() [1/2]

void iAGUIModuleInterface::PrepareResultChild ( int  childInd,
QString const &  title 
)
protected

Create a new result child at the given index in the iAMdiChild list with the given title.

Deprecated:
. Use methods from iAMainWindow directly

◆ PrepareResultChild() [2/2]

void iAGUIModuleInterface::PrepareResultChild ( QString const &  title)
protected

Create a new result child, with a title made from the given title + the previous title of the active child.

Deprecated:
. Use methods from iAMainWindow directly

◆ SaveSettings()

void iAGUIModuleInterface::SaveSettings ( ) const
virtual

Override to store custom settings of this module; called when program is shut down.

Reimplemented from iAModuleInterface.

◆ SetMainWindow()

void iAGUIModuleInterface::SetMainWindow ( iAMainWindow mainWnd)

Called by the module dispatcher on module initialization. There should be no need to call this method from user code.

Member Data Documentation

◆ m_attachments

QVector<iAModuleAttachmentToChild*> iAGUIModuleInterface::m_attachments
protected

attachments of this module

◆ m_mainWnd

iAMainWindow* iAGUIModuleInterface::m_mainWnd
protected

access to the main window

◆ m_mdiChild

iAMdiChild* iAGUIModuleInterface::m_mdiChild
protected

"current" mdi child

Deprecated:
use direct access via iAMainWindow methods

The documentation for this class was generated from the following files: