From: vsv Date: Wed, 21 Oct 2015 08:53:20 +0000 (+0300) Subject: Set tooltips on icons X-Git-Tag: V_2.0.0_alfa1~75 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=d98db945e11f834b88904ce700e512e4233f57e3;p=modules%2Fshaper.git Set tooltips on icons --- diff --git a/src/ModuleBase/ModuleBase_WidgetChoice.cpp b/src/ModuleBase/ModuleBase_WidgetChoice.cpp index 3bb748f63..c89508324 100644 --- a/src/ModuleBase/ModuleBase_WidgetChoice.cpp +++ b/src/ModuleBase/ModuleBase_WidgetChoice.cpp @@ -31,6 +31,11 @@ ModuleBase_WidgetChoice::ModuleBase_WidgetChoice(QWidget* theParent, myLabel->setPixmap(QPixmap(aLabelIcon)); aLayout->addWidget(myLabel); + std::string aToolstr = theData->widgetTooltip(); + if (!aToolstr.empty()) { + myLabel->setToolTip(QString::fromStdString(aToolstr)); + } + myCombo = new QComboBox(this); aLayout->addWidget(myCombo, 1); diff --git a/src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp b/src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp index 2687b72a2..9b478cc8e 100644 --- a/src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp +++ b/src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp @@ -85,6 +85,7 @@ ModuleBase_WidgetDoubleValue::ModuleBase_WidgetDoubleValue(QWidget* theParent, QString aTTip = QString::fromStdString(theData->widgetTooltip()); mySpinBox->setToolTip(aTTip); + myLabel->setToolTip(aTTip); aControlLay->addRow(myLabel, mySpinBox); #ifdef APPLY_BY_ENTER_OR_TAB diff --git a/src/ModuleBase/ModuleBase_WidgetIntValue.cpp b/src/ModuleBase/ModuleBase_WidgetIntValue.cpp index 54e737c11..95045d0c2 100644 --- a/src/ModuleBase/ModuleBase_WidgetIntValue.cpp +++ b/src/ModuleBase/ModuleBase_WidgetIntValue.cpp @@ -84,6 +84,7 @@ ModuleBase_WidgetIntValue::ModuleBase_WidgetIntValue(QWidget* theParent, QString aTTip = QString::fromStdString(theData->widgetTooltip()); mySpinBox->setToolTip(aTTip); + myLabel->setToolTip(aTTip); aControlLay->addRow(myLabel, mySpinBox); #ifdef APPLY_BY_ENTER_OR_TAB diff --git a/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp b/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp index 113a6113f..1e60ec404 100644 --- a/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp +++ b/src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp @@ -87,6 +87,7 @@ ModuleBase_WidgetShapeSelector::ModuleBase_WidgetShapeSelector(QWidget* theParen myTextLine->installEventFilter(this); aLayout->addRow(myLabel, myTextLine); + myLabel->setToolTip(aToolTip); std::string aTypes = theData->getProperty("shape_types"); myShapeTypes = QString(aTypes.c_str()).split(' ', QString::SkipEmptyParts); diff --git a/src/PartSet/PartSet_WidgetSketchCreator.cpp b/src/PartSet/PartSet_WidgetSketchCreator.cpp index 4a90a591f..08e46a64d 100644 --- a/src/PartSet/PartSet_WidgetSketchCreator.cpp +++ b/src/PartSet/PartSet_WidgetSketchCreator.cpp @@ -59,6 +59,8 @@ PartSet_WidgetSketchCreator::PartSet_WidgetSketchCreator(QWidget* theParent, myTextLine->setToolTip(aToolTip); myTextLine->installEventFilter(this); + myLabel->setToolTip(aToolTip); + QString aUseBody = QString::fromStdString(theData->getProperty(USE_BODY)); if(!aUseBody.isEmpty()) { myUseBody = QVariant(aUseBody).toBool();