Salome HOME
Set tooltips on icons
authorvsv <vitaly.smetannikov@opencascade.com>
Wed, 21 Oct 2015 08:53:20 +0000 (11:53 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Wed, 21 Oct 2015 08:53:20 +0000 (11:53 +0300)
src/ModuleBase/ModuleBase_WidgetChoice.cpp
src/ModuleBase/ModuleBase_WidgetDoubleValue.cpp
src/ModuleBase/ModuleBase_WidgetIntValue.cpp
src/ModuleBase/ModuleBase_WidgetShapeSelector.cpp
src/PartSet/PartSet_WidgetSketchCreator.cpp

index 3bb748f63f6f69f6a2d06a564474ed3e21f3acb4..c89508324c86fb47807bb34de494e79ef99ac2f5 100644 (file)
@@ -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);
  
index 2687b72a26e6be3c496b77629b6b31b515ce44da..9b478cc8e0ff4edf54a17f0d2a7a7253f0baa6ad 100644 (file)
@@ -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
index 54e737c11c62e58e8f36d077065038c0c213fe8a..95045d0c20bd3857783ea1e1e5d6f71541409095 100644 (file)
@@ -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
index 113a6113f8b2d73e5059a7826b64f501baf93192..1e60ec4049cb8c90ed12ac61673872be54419485 100644 (file)
@@ -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);
index 4a90a591f741882a50a1d665fff13eb7d5dc299f..08e46a64dd1a9bb44760b58ad16478fb52cc8051 100644 (file)
@@ -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();