]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Issue #1853: Change column name from Equation to Expression and disable Result column
authorvsv <vitaly.smetannikov@opencascade.com>
Mon, 14 Nov 2016 16:13:50 +0000 (19:13 +0300)
committervsv <vitaly.smetannikov@opencascade.com>
Mon, 14 Nov 2016 16:13:50 +0000 (19:13 +0300)
src/ParametersPlugin/ParametersPlugin_WidgetParamsMgr.cpp

index 7087b1b9cd2fad45e2903b526af13761cef3d085..be7aa91ece6bcf2a70f2049ca7d00d06baa26d45 100644 (file)
@@ -102,7 +102,8 @@ void ParametersPlugin_ItemDelegate::paint(QPainter* painter,
 {
   QBrush aBrush = painter->brush();
   QPen aPen = painter->pen();
-//  if (!isEditable(index))
+  //if (!isEditable(index))
+  //  painter->setBrush(Qt::lightGray);
   if (!index.parent().isValid())
     painter->setBrush(Qt::lightGray);
 
@@ -168,7 +169,7 @@ ParametersPlugin_WidgetParamsMgr::ParametersPlugin_WidgetParamsMgr(QWidget* theP
   myTable = new ParametersPlugin_TreeWidget(this);
   myTable->setColumnCount(4);
   QStringList aHeaders;
-  aHeaders << tr("Name") << tr("Equation") << tr("Result") << tr("Comment");
+  aHeaders << tr("Name") << tr("Expression") << tr("Result") << tr("Comment");
   myTable->setHeaderLabels(aHeaders);
   myTable->setColumnWidth(Col_Name, 200);
   myTable->setColumnWidth(Col_Equation, 100);
@@ -519,9 +520,10 @@ QTreeWidgetItem* ParametersPlugin_WidgetParamsMgr::createNewItem(QTreeWidgetItem
   aValues << NoValue;
 
   QTreeWidgetItem* aItem = new QTreeWidgetItem(aValues);
-  if (theParent == myParameters)
+  if (theParent == myParameters) {
     aItem->setFlags(Qt::ItemIsSelectable | Qt::ItemIsEditable | Qt::ItemIsEnabled);
-  else
+    aItem->setForeground(2, Qt::darkGray);
+  } else
     aItem->setFlags(Qt::NoItemFlags);
   return aItem;
 }