From: Konstantin Leontev Date: Fri, 16 Dec 2022 10:12:17 +0000 (+0300) Subject: [bos #32523][EDF] SALOME on Demand GUI. Make INFO button visible on the toolbar. X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ce368253effc4afa12cf3968a7dcd7b8b7d50455;p=modules%2Fgui.git [bos #32523][EDF] SALOME on Demand GUI. Make INFO button visible on the toolbar. --- diff --git a/src/LightApp/LightApp_ModuleAction.cxx b/src/LightApp/LightApp_ModuleAction.cxx index 8e941b80e..592087f51 100644 --- a/src/LightApp/LightApp_ModuleAction.cxx +++ b/src/LightApp/LightApp_ModuleAction.cxx @@ -53,7 +53,7 @@ public: \param parent parent object */ LightApp_ModuleAction::ActionSet::ActionSet( QObject* parent ) -: QtxActionSet( parent ) +: QtxActionSet( parent ) { } @@ -207,7 +207,7 @@ private: In menu, the action is represented as a plain list of items, one per module. - Only one module can be active at the moment. It can be set programmatically + Only one module can be active at the moment. It can be set programmatically with setActiveModule() function. Use this method with empty string to turn to the "neutral point". To get active module, use activeModule() function. @@ -414,7 +414,7 @@ void LightApp_ModuleAction::removeModule( const QString& name ) /*! \brief Get active module. - If there is no active module ("neutral point"), then the null string + If there is no active module ("neutral point"), then the null string is returned. \return active module name @@ -490,6 +490,7 @@ void LightApp_ModuleAction::addedTo( QWidget* w ) w->insertAction( this, myCombo ); w->insertAction( this, myAdd ); w->insertAction( this, myRemove ); + w->insertAction( this, myInfo ); w->insertAction( this, mySeparator ); w->insertAction( this, mySet ); update(); @@ -507,6 +508,7 @@ void LightApp_ModuleAction::removedFrom( QWidget* w ) w->removeAction( myCombo ); w->removeAction( myAdd ); w->removeAction( myRemove ); + w->removeAction( myInfo ); w->removeAction( mySeparator ); w->removeAction( mySet ); } @@ -544,6 +546,7 @@ void LightApp_ModuleAction::update() myCombo->setVisible( myMode & List ); myAdd->setVisible( myMode & AddRemove ); myRemove->setVisible( myMode & AddRemove ); + myInfo->setVisible( myMode & All ); mySet->setVisible( myMode & Buttons ); } @@ -561,7 +564,7 @@ void LightApp_ModuleAction::update( QtxComboBox* cb ) int curId = mySet->moduleId( active() ); QList alist = mySet->actions(); cb->clear(); - + cb->addItem( icon(), text() ); cb->setId( 0, -1 ); @@ -645,7 +648,7 @@ void LightApp_ModuleAction::onTriggered( int id ) /*! \brief Called when action state is changed. \internal - + This slot is used to prevent making the parent action visible. */ void LightApp_ModuleAction::onChanged() @@ -666,4 +669,4 @@ void LightApp_ModuleAction::onChanged() void LightApp_ModuleAction::onComboActivated( int id ) { QApplication::postEvent( this, new ActivateEvent( QEvent::MaxUser, id ) ); -} +}