From: vsv Date: Mon, 14 Nov 2016 16:13:50 +0000 (+0300) Subject: Issue #1853: Change column name from Equation to Expression and disable Result column X-Git-Tag: V_2.6.0~89 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=64e62259a3a29f1a104404271586349272895b8b;p=modules%2Fshaper.git Issue #1853: Change column name from Equation to Expression and disable Result column --- diff --git a/src/ParametersPlugin/ParametersPlugin_WidgetParamsMgr.cpp b/src/ParametersPlugin/ParametersPlugin_WidgetParamsMgr.cpp index 7087b1b9c..be7aa91ec 100644 --- a/src/ParametersPlugin/ParametersPlugin_WidgetParamsMgr.cpp +++ b/src/ParametersPlugin/ParametersPlugin_WidgetParamsMgr.cpp @@ -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; }