SHAPER  9.12.0
ModuleBase_IModule Class Referenceabstract

Interface to a module. More...

Inheritance diagram for ModuleBase_IModule:
Inheritance graph

Public Types

enum  ModuleBase_CustomizeFlag { CustomizeArguments = 0 , CustomizeResults , CustomizeHighlightedObjects }
 enumeration to know which objects should be customized More...
 

Public Slots

virtual void onFeatureTriggered ()
 Called on call of command corresponded to a feature. More...
 
virtual void onObjectDisplayed (ObjectPtr theObject, AISObjectPtr theAIS)
 Slot called on object display. More...
 
virtual void onBeforeObjectErase (ObjectPtr theObject, AISObjectPtr theAIS)
 Slot called on before object erase. More...
 
virtual void onViewTransformed (int theTrsfType=2)
 Called on transformation in current viewer. More...
 

Signals

void resumed (ModuleBase_Operation *theOp)
 Segnal emitted when an operation is resumed. More...
 

Public Member Functions

 ModuleBase_IModule (ModuleBase_IWorkshop *theParent)
 Constructor. More...
 
virtual void storeSelection ()
 Stores the current selection. More...
 
virtual void restoreSelection ()
 Restores the current selection. More...
 
virtual void createFeatures ()
 Reads description of features from XML file. More...
 
virtual void actionCreated (QAction *)
 Called on creation of menu item in desktop. More...
 
virtual void editFeature (FeaturePtr theFeature)
 Launching of a edit operation on the feature. More...
 
virtual bool canCommitOperation () const
 Returns true if the operation can be committed. More...
 
virtual void launchOperation (const QString &theCmdId, const bool &isStartAfterCommitOnly)
 Creates an operation and send it to loop. More...
 
virtual void launchModal (const QString &theCmdId)
 Executes feature as a modal dialog box. More...
 
virtual void operationStarted (ModuleBase_Operation *theOperation)
 Realizes some functionality by an operation start. More...
 
virtual void operationResumed (ModuleBase_Operation *theOperation)
 Realizes some functionality by an operation resume By default it emits operationResumed signal. More...
 
virtual void operationStopped (ModuleBase_Operation *theOperation)
 Realizes some functionality by an operation stop. More...
 
virtual void operationCommitted (ModuleBase_Operation *theOperation)
 Realizes some functionality by an operation commit. More...
 
virtual void operationAborted (ModuleBase_Operation *theOperation)
 Realizes some functionality by an operation abort. More...
 
virtual ModuleBase_OperationcurrentOperation () const =0
 Realizes some functionality by an operation start. More...
 
virtual bool addViewerMenu (const QMap< QString, QAction * > &theStdActions, QWidget *theParent, QMap< int, QAction * > &theMenuActions) const
 Add menu items for viewer into the actions map. More...
 
virtual void addObjectBrowserMenu (QMenu *theMenu) const
 Add menu items for object browser into the given menu. More...
 
virtual ModuleBase_ModelWidgetcreateWidgetByType (const std::string &theType, QWidget *theParent, Config_WidgetAPI *theWidgetApi)
 Creates custom widgets for property panel. More...
 
virtual ModuleBase_ModelWidgetactiveWidget () const =0
 Returns the active widget, by default it is the property panel active widget. More...
 
ModuleBase_IWorkshopworkshop () const
 Returns current workshop. More...
 
virtual void propertyPanelDefined (ModuleBase_Operation *theOperation)
 Call back forlast tuning of property panel before operation performance It is called as on clearing of property panel as on filling with new widgets. More...
 
virtual bool createWidgets (const FeaturePtr &theFeature, const QString &theXmlRepr, QList< ModuleBase_ModelWidget * > &theWidgets) const
 Have an opportunity to create widgets for the current operation instead of standard creation in workshop. More...
 
virtual bool canUndo () const
 Returns True if there are available Undos and there is not an active operation. More...
 
virtual bool canRedo () const
 Returns True if there are available Redos and there is not an active operation. More...
 
virtual bool canApplyAction (const ObjectPtr &theObject, const QString &theActionId) const =0
 Returns true if the action can be applyed to the object. More...
 
virtual bool canEraseObject (const ObjectPtr &theObject) const
 Returns True if the current operation can be committed. More...
 
virtual bool canDisplayObject (const ObjectPtr &theObject) const
 Returns whether the object can be displayed. More...
 
virtual bool canUsePreselection (const QString &thePreviousOperationKind, const QString &theStartedOperationKind)
 Returns whether the started operation may use preselection of the previous one Cases are: previous operation is null, edit operation, previuos and started operations kinds are the same. More...
 
virtual bool canActivateSelection (const ObjectPtr &theObject) const
 Make some functionality after the objects are hidden in viewer. More...
 
virtual bool deleteObjects ()
 Reacts to the delete action in module. More...
 
virtual void closeDocument ()=0
 Performs functionality on closing document. More...
 
virtual void clearViewer ()=0
 Clears specific presentations in the viewer. More...
 
virtual void activeSelectionModes (QIntList &theModes)
 Returns a list of modes, where the AIS objects should be activated. More...
 
virtual void moduleSelectionModes (int theModesType, QIntList &theModes)=0
 Appends specific selection modes for the module to the list of types. More...
 
virtual void moduleSelectionFilters (const QIntList &theFilterTypes, SelectMgr_ListOfFilter &theSelectionFilters)=0
 Appends into container of filters module filters corresponded to the modes type. More...
 
virtual QIntList selectionFilters ()
 Returns types of registered module selection filters. More...
 
virtual HandlesselectionFilter (const int theType)
 Returns selection filter. More...
 
void registerSelectionFilter (const ModuleBase_SelectionFilterType theFilterType, const Handle &&theFilter)
 Append selection filter into the module and type of the filter in internal container. More...
 
virtual bool isCustomPrsActivated (const ModuleBase_CustomizeFlag &theFlag) const
 Return true if the custom presentation is activated. More...
 
virtual void activateCustomPrs (const FeaturePtr &theFeature, const ModuleBase_CustomizeFlag &theFlag, const bool theUpdateViewer)
 Activate custom presentation for the object. More...
 
virtual void deactivateCustomPrs (const ModuleBase_CustomizeFlag &theFlag, const bool theUpdateViewer)
 Deactivate custom presentation for the object. More...
 
virtual bool customizeFeature (ObjectPtr theObject, const ModuleBase_CustomizeFlag &theFlag, const bool theUpdateViewer)
 Modifies the given presentation in the custom way. More...
 
virtual void disableCustomMode (ModuleBase_CustomizeFlag theMode)
 Disable displaying of custom mode. More...
 
virtual void enableCustomModes ()
 Enables disabled custom mode. More...
 
virtual void customizeObjectBrowser (QWidget *theObjectBrowser)
 This method is called on object browser creation for customization of module specific features. More...
 
virtual ModuleBase_OperationcreateOperation (const std::string &theCmdId)
 Creates a new operation. More...
 
virtual AISObjectPtr createPresentation (const ObjectPtr &theResult)
 Create specific for the module presentation. More...
 
virtual void customizePresentation (const ObjectPtr &theObject, const AISObjectPtr &thePrs) const
 Customize presentation according to objects attributes. More...
 
virtual ObjectPtr findPresentedObject (const AISObjectPtr &theAIS) const =0
 Returns data object by AIS. More...
 
virtual bool canBeShaded (HandlettheAIS) const
 Returns true if the presentation can be shown in shading mode. More...
 
virtual void updateObjectBrowserMenu (const QMap< QString, QAction * > &theStdActions)
 Update state of pop-up menu items in object browser. More...
 
virtual void updateViewerMenu (const QMap< QString, QAction * > &theStdActions)
 Update state of pop-up menu items in viewer. More...
 
virtual bool isActionEnableStateFixed (const int theActionId) const
 Returns true if the action should be always enabled. More...
 
virtual QString getFeatureError (const FeaturePtr &theFeature)
 Returns the feature error if the current state of the feature in the module is not correct If the feature is correct, it returns an empty value. More...
 
virtual void grantedOperationIds (ModuleBase_Operation *theOperation, QStringList &theIds) const
 Returns list of granted operation indices. More...
 
virtual void connectToPropertyPanel (ModuleBase_ModelWidget *theWidget, const bool isToConnect)
 Connects or disconnects to the value changed signal of the property panel widgets. More...
 
virtual void widgetStateChanged (int thePreviousState)
 Validates the operation to change the "Apply" button state. More...
 
virtual bool processEnter (const std::string &thePreviousAttributeID)
 Returns true if the event is processed. More...
 
virtual void beforeOperationStopped (ModuleBase_Operation *theOperation)
 Performs some GUI actions before an operation transaction is stopped Default realization is empty. More...
 
virtual GeomShapePtr findShape (const AttributePtr &theAttribute)=0
 Finds a shape by attribute if it is possible. More...
 
virtual AttributePtr findAttribute (const ObjectPtr &theObject, const GeomShapePtr &theGeomShape)=0
 Finds an attribute by geom shape if it is possible. More...
 
virtual std::shared_ptr< Events_MessagereentrantMessage ()=0
 Returns reentrant message if it was accepted. More...
 
virtual void setReentrantPreSelection (const std::shared_ptr< Events_Message > &theMessage)=0
 Put current selection into reentrant message. More...
 
void getXMLRepresentation (const std::string &theFeatureId, std::string &theXmlCfg, std::string &theDescription)
 Returns XML information by the feature index. More...
 
virtual ModuleBase_ITreeNoderootNode () const =0
 Returns root tree node which represents a data model. More...
 

Protected Slots

virtual void onSelectionChanged ()
 Called on selection changed event. More...
 

Protected Member Functions

virtual void registerValidators ()
 Register validators for this module. More...
 
virtual void registerProperties ()
 Register properties of this module. More...
 
virtual ModuleBase_OperationgetNewOperation (const std::string &theFeatureId)
 Returns new instance of operation object (used in createOperation for customization) More...
 
void loadProprietaryPlugins ()
 Load plugins required license. More...
 
void processProprietaryFeatures ()
 Collect features, which have valid license. More...
 

Protected Attributes

ModuleBase_IWorkshopmyWorkshop
 Reference to workshop. More...
 
std::map< std::string, std::string > myFeaturesInFiles
 Map of features in XML. More...
 
std::map< std::string, std::string > myProprietaryFeatures
 Map of features in XML, which require license but not confirmed yet. More...
 
std::set< std::string > myProprietaryPlugins
 Proprietary plugins. More...
 
std::set< std::string > myFeaturesValidLicense
 Features, which have valid license. More...
 
std::map< ModuleBase_SelectionFilterType, Handle > mySelectionFilters
 

Detailed Description

Interface to a module.

Member Enumeration Documentation

◆ ModuleBase_CustomizeFlag

enumeration to know which objects should be customized

Enumerator
CustomizeResults 

references of other objects referenced to the current feature

CustomizeHighlightedObjects 

results of the current feature

highlighted objects of the active widget

Constructor & Destructor Documentation

◆ ModuleBase_IModule()

ModuleBase_IModule::ModuleBase_IModule ( ModuleBase_IWorkshop theParent)

Constructor.

Parameters
theParentinstance of workshop interface

Member Function Documentation

◆ storeSelection()

virtual void ModuleBase_IModule::storeSelection ( )
inlinevirtual

Stores the current selection.

Reimplemented in PartSet_Module.

◆ restoreSelection()

virtual void ModuleBase_IModule::restoreSelection ( )
inlinevirtual

Restores the current selection.

Reimplemented in PartSet_Module.

◆ createFeatures()

void ModuleBase_IModule::createFeatures ( )
virtual

Reads description of features from XML file.

Reimplemented in PartSet_Module.

◆ actionCreated()

void ModuleBase_IModule::actionCreated ( QAction *  theFeature)
virtual

Called on creation of menu item in desktop.

◆ editFeature()

void ModuleBase_IModule::editFeature ( FeaturePtr  theFeature)
virtual

Launching of a edit operation on the feature.

Parameters
theFeaturefeature for editing

Reimplemented in PartSet_Module.

◆ canCommitOperation()

virtual bool ModuleBase_IModule::canCommitOperation ( ) const
inlinevirtual

Returns true if the operation can be committed.

Result in default implementation is true.

Returns
boolean value

Reimplemented in PartSet_Module.

◆ launchOperation()

void ModuleBase_IModule::launchOperation ( const QString &  theCmdId,
const bool &  isStartAfterCommitOnly 
)
virtual

Creates an operation and send it to loop.

Parameters
theCmdIdthe operation name
isStartAfterCommitOnlyoperation is launched if there is no active operation or it is committed

selection should be obtained from workshop before ask if the operation can be started as the canStartOperation method performs commit/abort of previous operation. Sometimes commit/abort may cause selection clear(Sketch operation) as a result it will be lost and is not used for preselection.

reentrant operation(Sketch Line) should not be started if operation is aborted

Reimplemented in PartSet_Module.

◆ launchModal()

void ModuleBase_IModule::launchModal ( const QString &  theCmdId)
virtual

Executes feature as a modal dialog box.

Parameters
theCmdIdthe operation name

◆ operationStarted()

virtual void ModuleBase_IModule::operationStarted ( ModuleBase_Operation theOperation)
inlinevirtual

Realizes some functionality by an operation start.

Parameters
theOperationa started operation

Reimplemented in PartSet_Module.

◆ operationResumed()

void ModuleBase_IModule::operationResumed ( ModuleBase_Operation theOperation)
virtual

Realizes some functionality by an operation resume By default it emits operationResumed signal.

Parameters
theOperationa resumed operation

Reimplemented in PartSet_Module.

◆ operationStopped()

virtual void ModuleBase_IModule::operationStopped ( ModuleBase_Operation theOperation)
inlinevirtual

Realizes some functionality by an operation stop.

Reimplemented in PartSet_Module.

◆ operationCommitted()

virtual void ModuleBase_IModule::operationCommitted ( ModuleBase_Operation theOperation)
inlinevirtual

Realizes some functionality by an operation commit.

Reimplemented in PartSet_Module.

◆ operationAborted()

virtual void ModuleBase_IModule::operationAborted ( ModuleBase_Operation theOperation)
inlinevirtual

Realizes some functionality by an operation abort.

Reimplemented in PartSet_Module.

◆ currentOperation()

virtual ModuleBase_Operation* ModuleBase_IModule::currentOperation ( ) const
pure virtual

Realizes some functionality by an operation start.

Implemented in PartSet_Module.

◆ addViewerMenu()

virtual bool ModuleBase_IModule::addViewerMenu ( const QMap< QString, QAction * > &  theStdActions,
QWidget theParent,
QMap< int, QAction * > &  theMenuActions 
) const
inlinevirtual

Add menu items for viewer into the actions map.

Parameters
theStdActionsa map of standard actions
theParenta parent widget
theMenuActionsmap of action/menu for the desirable index in the viewer menu
Returns
true if items are added and there is no necessity to provide standard menu

Reimplemented in PartSet_Module.

◆ addObjectBrowserMenu()

virtual void ModuleBase_IModule::addObjectBrowserMenu ( QMenu theMenu) const
inlinevirtual

Add menu items for object browser into the given menu.

Parameters
theMenua popup menu to be shown in the object browser

Reimplemented in PartSet_Module.

◆ createWidgetByType()

virtual ModuleBase_ModelWidget* ModuleBase_IModule::createWidgetByType ( const std::string &  theType,
QWidget theParent,
Config_WidgetAPI theWidgetApi 
)
inlinevirtual

Creates custom widgets for property panel.

Parameters
theTypea type of widget
theParentthe parent object
theWidgetApithe widget configuration. The attribute of the model widget is obtained from

Reimplemented in PartSet_Module.

◆ activeWidget()

virtual ModuleBase_ModelWidget* ModuleBase_IModule::activeWidget ( ) const
pure virtual

Returns the active widget, by default it is the property panel active widget.

Implemented in PartSet_Module.

◆ workshop()

ModuleBase_IWorkshop* ModuleBase_IModule::workshop ( ) const
inline

Returns current workshop.

◆ propertyPanelDefined()

virtual void ModuleBase_IModule::propertyPanelDefined ( ModuleBase_Operation theOperation)
inlinevirtual

Call back forlast tuning of property panel before operation performance It is called as on clearing of property panel as on filling with new widgets.

Reimplemented in PartSet_Module.

◆ createWidgets()

virtual bool ModuleBase_IModule::createWidgets ( const FeaturePtr &  theFeature,
const QString &  theXmlRepr,
QList< ModuleBase_ModelWidget * > &  theWidgets 
) const
inlinevirtual

Have an opportunity to create widgets for the current operation instead of standard creation in workshop.

Parameters
theFeaturea feature of the started operation
theXmlRepran XML representation of the operation
theWidgetsa list of created widgets
Returns
boolean result, false by default

Reimplemented in PartSet_Module.

◆ canUndo()

bool ModuleBase_IModule::canUndo ( ) const
virtual

Returns True if there are available Undos and there is not an active operation.

Reimplemented in PartSet_Module.

◆ canRedo()

bool ModuleBase_IModule::canRedo ( ) const
virtual

Returns True if there are available Redos and there is not an active operation.

Reimplemented in PartSet_Module.

◆ canApplyAction()

virtual bool ModuleBase_IModule::canApplyAction ( const ObjectPtr &  theObject,
const QString &  theActionId 
) const
pure virtual

Returns true if the action can be applyed to the object.

Parameters
theObjecta checked object
theActionIdan identifier of action, to be found in the menu manager like "DELETE_CMD"
Returns
the a boolean result

Implemented in PartSet_Module.

◆ canEraseObject()

bool ModuleBase_IModule::canEraseObject ( const ObjectPtr &  theObject) const
virtual

Returns True if the current operation can be committed.

By default it is true.

Returns
a boolean value Returns whether the object can be erased. The default realization returns true.
Parameters
theObjecta model object

Reimplemented in PartSet_Module.

◆ canDisplayObject()

bool ModuleBase_IModule::canDisplayObject ( const ObjectPtr &  theObject) const
virtual

Returns whether the object can be displayed.

The default realization returns true.

Parameters
theObjecta model object

Reimplemented in PartSet_Module.

◆ canUsePreselection()

bool ModuleBase_IModule::canUsePreselection ( const QString &  thePreviousOperationKind,
const QString &  theStartedOperationKind 
)
virtual

Returns whether the started operation may use preselection of the previous one Cases are: previous operation is null, edit operation, previuos and started operations kinds are the same.

Parameters
thePreviousOperationKinda kind of previous operation
theStartedOperationKinda kind of a started operation

Reimplemented in PartSet_Module.

◆ canActivateSelection()

bool ModuleBase_IModule::canActivateSelection ( const ObjectPtr &  theObject) const
virtual

Make some functionality after the objects are hidden in viewer.

Parameters
theObjectsa list of hidden objects Returns true if selection for the object can be activate. By default a result or feature of the current operation can not be activated
theObjecta model object

Reimplemented in PartSet_Module.

◆ deleteObjects()

virtual bool ModuleBase_IModule::deleteObjects ( )
inlinevirtual

Reacts to the delete action in module.

Returns
true if the action is processed

◆ closeDocument()

virtual void ModuleBase_IModule::closeDocument ( )
pure virtual

Performs functionality on closing document.

Implemented in PartSet_Module.

◆ clearViewer()

virtual void ModuleBase_IModule::clearViewer ( )
pure virtual

Clears specific presentations in the viewer.

Implemented in PartSet_Module.

◆ activeSelectionModes()

virtual void ModuleBase_IModule::activeSelectionModes ( QIntList &  theModes)
inlinevirtual

Returns a list of modes, where the AIS objects should be activated.

Parameters
theModesa list of modes

Reimplemented in PartSet_Module.

◆ moduleSelectionModes()

virtual void ModuleBase_IModule::moduleSelectionModes ( int  theModesType,
QIntList &  theModes 
)
pure virtual

Appends specific selection modes for the module to the list of types.

Parameters
theModesTypecombination of available selection filters
theModesa selection modes to be extended

Implemented in PartSet_Module.

◆ moduleSelectionFilters()

virtual void ModuleBase_IModule::moduleSelectionFilters ( const QIntList &  theFilterTypes,
SelectMgr_ListOfFilter &  theSelectionFilters 
)
pure virtual

Appends into container of filters module filters corresponded to the modes type.

Parameters
theFilterTypescontainer of available selection filters
theSelectionFilters[out] container to be extend by elements

Implemented in PartSet_Module.

◆ selectionFilters()

QIntList ModuleBase_IModule::selectionFilters ( )
virtual

Returns types of registered module selection filters.

Parameters
theSelectionFilters[out] container of type value

◆ HandlesselectionFilter()

virtual ModuleBase_IModule::HandlesselectionFilter ( const int  theType)
virtual

Returns selection filter.

Parameters
theTypeselection filter type
theFilterinstance of filter

◆ registerSelectionFilter()

void ModuleBase_IModule::registerSelectionFilter ( const ModuleBase_SelectionFilterType  theFilterType,
const Handle &&  theFilter 
)

Append selection filter into the module and type of the filter in internal container.

Parameters
theFilterTypeselection filter type
theFilteradded filter

◆ isCustomPrsActivated()

virtual bool ModuleBase_IModule::isCustomPrsActivated ( const ModuleBase_CustomizeFlag theFlag) const
inlinevirtual

Return true if the custom presentation is activated.

Parameters
theFlaga flag of level of customization, which means that only part of sub-elements
Returns
boolean value

Reimplemented in PartSet_Module.

◆ activateCustomPrs()

virtual void ModuleBase_IModule::activateCustomPrs ( const FeaturePtr &  theFeature,
const ModuleBase_CustomizeFlag theFlag,
const bool  theUpdateViewer 
)
inlinevirtual

Activate custom presentation for the object.

Default realization is empty.

Parameters
theFeaturea feature instance
theFlaga flag of level of customization, which means that only part of sub-elements
theUpdateViewerthe parameter whether the viewer should be update immediately

Reimplemented in PartSet_Module.

◆ deactivateCustomPrs()

virtual void ModuleBase_IModule::deactivateCustomPrs ( const ModuleBase_CustomizeFlag theFlag,
const bool  theUpdateViewer 
)
inlinevirtual

Deactivate custom presentation for the object.

Default realization is empty.

Parameters
theFlaga flag of level of customization, which means that only part of sub-elements
theUpdateViewerthe parameter whether the viewer should be update immediately

Reimplemented in PartSet_Module.

◆ customizeFeature()

virtual bool ModuleBase_IModule::customizeFeature ( ObjectPtr  theObject,
const ModuleBase_CustomizeFlag theFlag,
const bool  theUpdateViewer 
)
inlinevirtual

Modifies the given presentation in the custom way.

Update the object presentable properties such as color, lines width and other If the object is result with the color attribute value set, it is used, otherwise the customize is applyed to the object's feature if it is a custom prs

Parameters
theObjectan object instance
theFlaga flag of level of customization, which means that only part of sub-elements should be updated(e.g. only highlighted elements)
theUpdateViewerthe parameter whether the viewer should be update immediately
Returns
true if the object is modified

Reimplemented in PartSet_Module.

◆ disableCustomMode()

virtual void ModuleBase_IModule::disableCustomMode ( ModuleBase_CustomizeFlag  theMode)
inlinevirtual

Disable displaying of custom mode.

Parameters
theModea mode to disable

Reimplemented in PartSet_Module.

◆ enableCustomModes()

virtual void ModuleBase_IModule::enableCustomModes ( )
inlinevirtual

Enables disabled custom mode.

Reimplemented in PartSet_Module.

◆ customizeObjectBrowser()

virtual void ModuleBase_IModule::customizeObjectBrowser ( QWidget theObjectBrowser)
inlinevirtual

This method is called on object browser creation for customization of module specific features.

Parameters
theObjectBrowsera pinter on Object Browser widget

Reimplemented in PartSet_Module.

◆ createOperation()

ModuleBase_Operation * ModuleBase_IModule::createOperation ( const std::string &  theCmdId)
virtual

Creates a new operation.

Parameters
theCmdIdthe operation name

◆ createPresentation()

AISObjectPtr ModuleBase_IModule::createPresentation ( const ObjectPtr &  theResult)
virtual

Create specific for the module presentation.

The presentation has to be customized accordingly to the object.

Parameters
theResultan object for presentation
Returns
created presentation or NULL(default value)

Reimplemented in PartSet_Module.

◆ customizePresentation()

virtual void ModuleBase_IModule::customizePresentation ( const ObjectPtr &  theObject,
const AISObjectPtr &  thePrs 
) const
inlinevirtual

Customize presentation according to objects attributes.

Parameters
theObjectan object for presentation
thePrsa presentation object

Reimplemented in PartSet_Module.

◆ findPresentedObject()

virtual ObjectPtr ModuleBase_IModule::findPresentedObject ( const AISObjectPtr &  theAIS) const
pure virtual

Returns data object by AIS.

Implemented in PartSet_Module.

◆ canBeShaded()

bool ModuleBase_IModule::canBeShaded ( HandlettheAIS  ) const
virtual

Returns true if the presentation can be shown in shading mode.

Parameters
theAISpresentation to be checked
Returns
boolean value

Reimplemented in PartSet_Module.

◆ updateObjectBrowserMenu()

virtual void ModuleBase_IModule::updateObjectBrowserMenu ( const QMap< QString, QAction * > &  theStdActions)
inlinevirtual

Update state of pop-up menu items in object browser.

Parameters
theStdActions- a map of standard actions

◆ updateViewerMenu()

virtual void ModuleBase_IModule::updateViewerMenu ( const QMap< QString, QAction * > &  theStdActions)
inlinevirtual

Update state of pop-up menu items in viewer.

Parameters
theStdActions- a map of standard actions

Reimplemented in PartSet_Module.

◆ isActionEnableStateFixed()

virtual bool ModuleBase_IModule::isActionEnableStateFixed ( const int  theActionId) const
inlinevirtual

Returns true if the action should be always enabled.

Parameters
theActionIdan action index: Accept or Accept All
Returns
boolean value

Reimplemented in PartSet_Module.

◆ getFeatureError()

QString ModuleBase_IModule::getFeatureError ( const FeaturePtr &  theFeature)
virtual

Returns the feature error if the current state of the feature in the module is not correct If the feature is correct, it returns an empty value.

Returns
string value

Reimplemented in PartSet_Module.

◆ grantedOperationIds()

void ModuleBase_IModule::grantedOperationIds ( ModuleBase_Operation theOperation,
QStringList &  theIds 
) const
virtual

Returns list of granted operation indices.

Reimplemented in PartSet_Module.

◆ connectToPropertyPanel()

virtual void ModuleBase_IModule::connectToPropertyPanel ( ModuleBase_ModelWidget theWidget,
const bool  isToConnect 
)
inlinevirtual

Connects or disconnects to the value changed signal of the property panel widgets.

Parameters
theWidgeta property contol widget
isToConnecta boolean value whether connect or disconnect

Reimplemented in PartSet_Module.

◆ widgetStateChanged()

virtual void ModuleBase_IModule::widgetStateChanged ( int  thePreviousState)
inlinevirtual

Validates the operation to change the "Apply" button state.

Parameters
thePreviousStatethe previous state of the widget

Reimplemented in PartSet_Module.

◆ processEnter()

virtual bool ModuleBase_IModule::processEnter ( const std::string &  thePreviousAttributeID)
inlinevirtual

Returns true if the event is processed.

Parameters
thePreviousAttributeIDan index of the previous active attribute

Reimplemented in PartSet_Module.

◆ beforeOperationStopped()

virtual void ModuleBase_IModule::beforeOperationStopped ( ModuleBase_Operation theOperation)
inlinevirtual

Performs some GUI actions before an operation transaction is stopped Default realization is empty.

Reimplemented in PartSet_Module.

◆ findShape()

virtual GeomShapePtr ModuleBase_IModule::findShape ( const AttributePtr &  theAttribute)
pure virtual

Finds a shape by attribute if it is possible.

Parameters
theAttributean attribute
Returns
a geom shape

Implemented in PartSet_Module.

◆ findAttribute()

virtual AttributePtr ModuleBase_IModule::findAttribute ( const ObjectPtr &  theObject,
const GeomShapePtr &  theGeomShape 
)
pure virtual

Finds an attribute by geom shape if it is possible.

Parameters
theObjectan object of the attribute
theGeomShapea geom shape
Returns
theAttribute

Implemented in PartSet_Module.

◆ reentrantMessage()

virtual std::shared_ptr<Events_Message> ModuleBase_IModule::reentrantMessage ( )
pure virtual

Returns reentrant message if it was accepted.

Implemented in PartSet_Module.

◆ setReentrantPreSelection()

virtual void ModuleBase_IModule::setReentrantPreSelection ( const std::shared_ptr< Events_Message > &  theMessage)
pure virtual

Put current selection into reentrant message.

Parameters
theMessagea message of reentrant operation

Implemented in PartSet_Module.

◆ getXMLRepresentation()

void ModuleBase_IModule::getXMLRepresentation ( const std::string &  theFeatureId,
std::string &  theXmlCfg,
std::string &  theDescription 
)

Returns XML information by the feature index.

Parameters
theFeatureIda feature id
theXmlCfgXML configuration
theDescriptionfeature description

◆ rootNode()

virtual ModuleBase_ITreeNode* ModuleBase_IModule::rootNode ( ) const
pure virtual

Returns root tree node which represents a data model.

Implemented in PartSet_Module.

◆ resumed

void ModuleBase_IModule::resumed ( ModuleBase_Operation theOp)
signal

Segnal emitted when an operation is resumed.

Parameters
theOpa resumed operation

◆ onFeatureTriggered

void ModuleBase_IModule::onFeatureTriggered ( )
virtualslot

Called on call of command corresponded to a feature.

◆ onObjectDisplayed

virtual void ModuleBase_IModule::onObjectDisplayed ( ObjectPtr  theObject,
AISObjectPtr  theAIS 
)
inlinevirtualslot

Slot called on object display.

Parameters
theObjecta data object
theAISa presentation object

◆ onBeforeObjectErase

virtual void ModuleBase_IModule::onBeforeObjectErase ( ObjectPtr  theObject,
AISObjectPtr  theAIS 
)
inlinevirtualslot

Slot called on before object erase.

Parameters
theObjecta data object
theAISa presentation object

◆ onViewTransformed

virtual void ModuleBase_IModule::onViewTransformed ( int  theTrsfType = 2)
inlinevirtualslot

Called on transformation in current viewer.

Parameters
theTrsfTypetype of tranformation

◆ onSelectionChanged

virtual void ModuleBase_IModule::onSelectionChanged ( )
inlineprotectedvirtualslot

Called on selection changed event.

◆ registerValidators()

virtual void ModuleBase_IModule::registerValidators ( )
inlineprotectedvirtual

Register validators for this module.

Reimplemented in PartSet_Module.

◆ registerProperties()

virtual void ModuleBase_IModule::registerProperties ( )
inlineprotectedvirtual

Register properties of this module.

◆ getNewOperation()

ModuleBase_Operation * ModuleBase_IModule::getNewOperation ( const std::string &  theFeatureId)
protectedvirtual

Returns new instance of operation object (used in createOperation for customization)

◆ loadProprietaryPlugins()

void ModuleBase_IModule::loadProprietaryPlugins ( )
protected

Load plugins required license.

◆ processProprietaryFeatures()

void ModuleBase_IModule::processProprietaryFeatures ( )
protected

Collect features, which have valid license.

Field Documentation

◆ myWorkshop

ModuleBase_IWorkshop* ModuleBase_IModule::myWorkshop
protected

Reference to workshop.

◆ myFeaturesInFiles

std::map<std::string, std::string> ModuleBase_IModule::myFeaturesInFiles
protected

Map of features in XML.

◆ myProprietaryFeatures

std::map<std::string, std::string> ModuleBase_IModule::myProprietaryFeatures
protected

Map of features in XML, which require license but not confirmed yet.

◆ myProprietaryPlugins

std::set<std::string> ModuleBase_IModule::myProprietaryPlugins
protected

Proprietary plugins.

◆ myFeaturesValidLicense

std::set<std::string> ModuleBase_IModule::myFeaturesValidLicense
protected

Features, which have valid license.