SHAPER  9.12.0
XGUI_SalomeConnector Class Referenceabstract

An interface which provides a connection of XGUI functionality with functionality of SALOME module interface. More...

Inheritance diagram for XGUI_SalomeConnector:
Inheritance graph

Public Member Functions

 XGUI_SalomeConnector ()
 Default constructor. More...
 
virtual ~XGUI_SalomeConnector ()
 Virtual destructor. More...
 
virtual QAction * addFeature (const QString &theWBName, const QString &theTBName, const QString &theId, const QString &theTitle, const QString &theTip, const QIcon &theIcon, const QKeySequence &theKeys, bool isCheckable, const bool isAddSeparator, const QString &theStatusTip)=0
 Creates a feature (command) in SALOME desktop. More...
 
virtual QAction * addFeature (const QString &theWBName, const ActionInfo &theInfo, const bool isAddSeparator)=0
 Creates a feature (command) in SALOME desktop. More...
 
virtual QAction * addFeatureOfNested (const QString &theWBName, const ActionInfo &theInfo, const QList< QAction * > &theNestedActions)=0
 Creates a feature (command) in SALOME desktop. More...
 
virtual bool isFeatureOfNested (const QAction *theAction)=0
 Returns true if the feature action is a nested action, in other words, it is created by addFeatureOfNested(). More...
 
virtual QAction * addDesktopCommand (const QString &theId, const QString &theTitle, const QString &theTip, const QIcon &theIcon, const QKeySequence &theKeys, bool isCheckable, const char *theMenuSourceText, const QString &theSubMenu=QString(), const int theMenuPosition=10, const int theSuibMenuPosition=-1)=0
 Creates a command in Edit menu of SALOME desktop. More...
 
virtual void addDesktopMenuSeparator (const char *theMenuSourceText, const int theMenuPosition=10)=0
 Insert separator into Edit menu of SALOME desktop. More...
 
virtual bool addActionInToolbar (QAction *theAction, const QString &theToolBarTitle)=0
 Add an action into tool bar. More...
 
virtual void createFeatureActions ()=0
 Creates menu/tool bar actions for loaded features stored in the menu manager. More...
 
virtual QMainWindow * desktop () const =0
 Returns desktop window of SALOME. More...
 
virtual QList< QAction * > commandList () const =0
 Returns list of defined actions (just by SHAPER module) More...
 
virtual void setFeatureInfo (const QString &theFeatureId, const std::shared_ptr< Config_FeatureMessage > &theMessage)=0
 Stores XML information for the feature kind. More...
 
virtual std::shared_ptr< Config_FeatureMessagefeatureInfo (const QString &theFeatureId)=0
 Returns XML information for the feature kind. More...
 
virtual ModuleBase_IViewerviewer () const =0
 Returns interface to Salome viewer. More...
 
virtual void createPreferences ()=0
 Create preferences. More...
 
virtual void putInfo (const QString &theInfo, const int theMSecs=0)=0
 Shows the given text in status bar as a permanent text \theInfo a string value \theMsecs interval of msec milliseconds when the message will be hidden, if -1, it stays. More...
 

Detailed Description

An interface which provides a connection of XGUI functionality with functionality of SALOME module interface.

Constructor & Destructor Documentation

◆ XGUI_SalomeConnector()

XGUI_SalomeConnector::XGUI_SalomeConnector ( )

Default constructor.

◆ ~XGUI_SalomeConnector()

XGUI_SalomeConnector::~XGUI_SalomeConnector ( )
virtual

Virtual destructor.

Member Function Documentation

◆ addFeature() [1/2]

virtual QAction* XGUI_SalomeConnector::addFeature ( const QString &  theWBName,
const QString &  theTBName,
const QString &  theId,
const QString &  theTitle,
const QString &  theTip,
const QIcon &  theIcon,
const QKeySequence &  theKeys,
bool  isCheckable,
const bool  isAddSeparator,
const QString &  theStatusTip 
)
pure virtual

Creates a feature (command) in SALOME desktop.

Parameters
theWBName- a workbench name
theTBName- a toolbar name
theId- an id of the feature
theTitle- a menu item string
theTip- a tooltip string (help)
theIcon- icon
isCheckable- is checkable or not
theKeys- hot keys
isAddSeparatorboolean flag about adding separator after the action returns created action

Implemented in SHAPERGUI.

◆ addFeature() [2/2]

virtual QAction* XGUI_SalomeConnector::addFeature ( const QString &  theWBName,
const ActionInfo theInfo,
const bool  isAddSeparator 
)
pure virtual

Creates a feature (command) in SALOME desktop.

Parameters
theWBName- name of toolbar (workbench)
theInfo- information about action (icon, text, etc)
isAddSeparatorboolean flag about adding separator after the action

Implemented in SHAPERGUI.

◆ addFeatureOfNested()

virtual QAction* XGUI_SalomeConnector::addFeatureOfNested ( const QString &  theWBName,
const ActionInfo theInfo,
const QList< QAction * > &  theNestedActions 
)
pure virtual

Creates a feature (command) in SALOME desktop.

Parameters
theWBName- name of toolbar (workbench)
theInfo- information about action (icon, text, etc)
theNestedActionsa list of nested actions

Implemented in SHAPERGUI.

◆ isFeatureOfNested()

virtual bool XGUI_SalomeConnector::isFeatureOfNested ( const QAction *  theAction)
pure virtual

Returns true if the feature action is a nested action, in other words, it is created by addFeatureOfNested().

Parameters
theAction- an action of a feature returns boolean result

Implemented in SHAPERGUI.

◆ addDesktopCommand()

virtual QAction* XGUI_SalomeConnector::addDesktopCommand ( const QString &  theId,
const QString &  theTitle,
const QString &  theTip,
const QIcon &  theIcon,
const QKeySequence &  theKeys,
bool  isCheckable,
const char *  theMenuSourceText,
const QString &  theSubMenu = QString(),
const int  theMenuPosition = 10,
const int  theSuibMenuPosition = -1 
)
pure virtual

Creates a command in Edit menu of SALOME desktop.

Parameters
theId- an id of the feature
theTitle- a menu item string
theTip- a tooltip string (help)
theIcon- icon
isCheckable- is checkable or not
theKeys- hot keys
theMenuSourceText- a source text of the desktop menu
theSubMenu- a sub-menu name
theMenuPosition- a position of the command in the desktop menu
theSuibMenuPosition- a position of the sub-menu in the desktop menu returns created action

Implemented in SHAPERGUI.

◆ addDesktopMenuSeparator()

virtual void XGUI_SalomeConnector::addDesktopMenuSeparator ( const char *  theMenuSourceText,
const int  theMenuPosition = 10 
)
pure virtual

Insert separator into Edit menu of SALOME desktop.

Implemented in SHAPERGUI.

◆ addActionInToolbar()

virtual bool XGUI_SalomeConnector::addActionInToolbar ( QAction *  theAction,
const QString &  theToolBarTitle 
)
pure virtual

Add an action into tool bar.

Parameters
theActionthe Action object
theToolBarTitlethe toolbar name

Implemented in SHAPERGUI.

◆ createFeatureActions()

virtual void XGUI_SalomeConnector::createFeatureActions ( )
pure virtual

Creates menu/tool bar actions for loaded features stored in the menu manager.

Implemented in SHAPERGUI.

◆ desktop()

virtual QMainWindow* XGUI_SalomeConnector::desktop ( ) const
pure virtual

Returns desktop window of SALOME.

Implemented in SHAPERGUI.

◆ commandList()

virtual QList<QAction*> XGUI_SalomeConnector::commandList ( ) const
pure virtual

Returns list of defined actions (just by SHAPER module)

Implemented in SHAPERGUI.

◆ setFeatureInfo()

virtual void XGUI_SalomeConnector::setFeatureInfo ( const QString &  theFeatureId,
const std::shared_ptr< Config_FeatureMessage > &  theMessage 
)
pure virtual

Stores XML information for the feature kind.

Parameters
theFeatureIda feature kind
theMessagea container of the feature XML properties

Implemented in SHAPERGUI.

◆ featureInfo()

virtual std::shared_ptr<Config_FeatureMessage> XGUI_SalomeConnector::featureInfo ( const QString &  theFeatureId)
pure virtual

Returns XML information for the feature kind.

Parameters
theFeatureIda feature kind
Returns
theMessage a container of the feature XML properties

Implemented in SHAPERGUI.

◆ viewer()

virtual ModuleBase_IViewer* XGUI_SalomeConnector::viewer ( ) const
pure virtual

Returns interface to Salome viewer.

Implemented in SHAPERGUI.

◆ createPreferences()

virtual void XGUI_SalomeConnector::createPreferences ( )
pure virtual

Create preferences.

Implemented in SHAPERGUI.

◆ putInfo()

virtual void XGUI_SalomeConnector::putInfo ( const QString &  theInfo,
const int  theMSecs = 0 
)
pure virtual

Shows the given text in status bar as a permanent text \theInfo a string value \theMsecs interval of msec milliseconds when the message will be hidden, if -1, it stays.

Implemented in SHAPERGUI.