void ModuleBase_IModule::actionCreated(QAction* theFeature)
{
- theFeature->setStatusTip(theFeature->text());
connect(theFeature, SIGNAL(triggered(bool)), this, SLOT(onFeatureTriggered()));
}
return addFeature(theWBName,
theInfo.id,
theInfo.text,
- theInfo.toolTip,
+ theInfo.text, //Issue #650: in the SALOME mode the tooltip should be same as text
theInfo.icon,
theInfo.shortcut,
theInfo.checkable,
- isAddSeparator);
+ isAddSeparator,
+ theInfo.toolTip);
}
//******************************************************
QAction* SHAPERGUI::addFeature(const QString& theWBName, const QString& theId,
const QString& theTitle, const QString& theTip,
const QIcon& theIcon, const QKeySequence& theKeys,
- bool isCheckable, const bool isAddSeparator)
+ bool isCheckable, const bool isAddSeparator,
+ const QString& theStatusTip)
{
static QString aLastTool = "";
static int aNb = 0;
aKeys += theKeys[i];
QAction* aAction = createAction(aId, theTip, theIcon, theTitle, theTip, aKeys, aDesk,
isCheckable);
+ aAction->setStatusTip(theStatusTip);
+
aAction->setData(theId);
int aWBMenu = createMenu(theWBName, -1, -1, 50/*10-Window, 1000 - Help*/);
aKeys += theKeys[i];
QAction* aAction = createAction(aId, theTip, theIcon, theTitle, theTip, aKeys, aDesk,
isCheckable);
+ aAction->setStatusTip(theTip);
aAction->setData(theId);
createMenu(aId, aMenu, theMenuPosition);
return aAction;
virtual QAction* addFeature(const QString& theWBName, const QString& theId,
const QString& theTitle, const QString& theTip, const QIcon& theIcon,
- const QKeySequence& theKeys = QKeySequence(),
- bool isCheckable = false, const bool isAddSeparator = false);
+ const QKeySequence& theKeys/* = QKeySequence()*/,
+ bool isCheckable /*= false*/, const bool isAddSeparator/* = false*/,
+ const QString& theStatusTip);
//! Add feature (QAction) in the \a theWBName toolbar with given \a theInfo about action
virtual QAction* addFeature(const QString& theWBName,
aNestedActList);
}
else {
- //Issue #650: in the SALOME mode the tooltip should be same as text
- aFeatureInfo.toolTip = aFeatureInfo.text;
anAction = aSalomeConnector->addFeature(theWchName.c_str(), aFeatureInfo, aUseSeparator);
}
#endif
//! returns created action
virtual QAction* addFeature(const QString& theWBName, const QString& theId,
const QString& theTitle, const QString& theTip, const QIcon& theIcon,
- const QKeySequence& theKeys, bool isCheckable, const bool isAddSeparator) = 0;
+ const QKeySequence& theKeys, bool isCheckable, const bool isAddSeparator,
+ const QString& theStatusTip) = 0;
//! Creates a feature (command) in SALOME desktop
//! \param theWBName - name of toolbar (workbench)