SHAPER  9.12.0
XGUI_ActiveControlMgr Class Reference

Interface of providing only one active control for workshop. More...

Inheritance diagram for XGUI_ActiveControlMgr:
Inheritance graph

Public Member Functions

 XGUI_ActiveControlMgr (ModuleBase_IWorkshop *theWorkshop)
 Constructor. More...
 
void addSelector (XGUI_ActiveControlSelector *theSelector)
 Register selector to process activation of control. More...
 
XGUI_ActiveControlSelectorgetSelector (const QString &theType)
 Returns selector by type name. More...
 
XGUI_ActiveControlSelectoractiveSelector () const
 Returns the active selector. More...
 
void deactivateSelector (XGUI_ActiveControlSelector *theSelector)
 

Protected Slots

void onSelectorActivated ()
 Deactivates active selector and set the sender selector as active. More...
 
void onSelectorDeactivated ()
 Deactivate the active selector. More...
 
void onSelectionChanged ()
 Listens workshop selection and pass it to the active selector. More...
 

Protected Member Functions

void activateSelector (XGUI_ActiveControlSelector *theSelector)
 

Protected Attributes

ModuleBase_IWorkshopmyWorkshop
 the current workshop More...
 
QList< XGUI_ActiveControlSelector * > mySelectors
 workshop selectors More...
 
XGUI_ActiveControlSelectormyActiveSelector
 active selector More...
 
bool myIsBlocked
 blocking flag to avoid cycling signals processing More...
 

Detailed Description

Interface of providing only one active control for workshop.

It has container of selectors, where only one might be active at the moment. Selection in 3D view is processed by the active selector.

Constructor & Destructor Documentation

◆ XGUI_ActiveControlMgr()

XGUI_ActiveControlMgr::XGUI_ActiveControlMgr ( ModuleBase_IWorkshop theWorkshop)

Constructor.

Parameters
theWorkshopthe current workshop instance

Member Function Documentation

◆ addSelector()

void XGUI_ActiveControlMgr::addSelector ( XGUI_ActiveControlSelector theSelector)

Register selector to process activation of control.

◆ getSelector()

XGUI_ActiveControlSelector * XGUI_ActiveControlMgr::getSelector ( const QString &  theType)

Returns selector by type name.

Parameters
theTypea selector type
Returns
selector instance

◆ activeSelector()

XGUI_ActiveControlSelector* XGUI_ActiveControlMgr::activeSelector ( ) const
inline

Returns the active selector.

Returns
selector instance

◆ onSelectorActivated

void XGUI_ActiveControlMgr::onSelectorActivated ( )
protectedslot

Deactivates active selector and set the sender selector as active.

◆ onSelectorDeactivated

void XGUI_ActiveControlMgr::onSelectorDeactivated ( )
protectedslot

Deactivate the active selector.

◆ onSelectionChanged

void XGUI_ActiveControlMgr::onSelectionChanged ( )
protectedslot

Listens workshop selection and pass it to the active selector.

Field Documentation

◆ myWorkshop

ModuleBase_IWorkshop* XGUI_ActiveControlMgr::myWorkshop
protected

the current workshop

◆ mySelectors

QList<XGUI_ActiveControlSelector*> XGUI_ActiveControlMgr::mySelectors
protected

workshop selectors

◆ myActiveSelector

XGUI_ActiveControlSelector* XGUI_ActiveControlMgr::myActiveSelector
protected

active selector

◆ myIsBlocked

bool XGUI_ActiveControlMgr::myIsBlocked
protected

blocking flag to avoid cycling signals processing