Core: Gui: DAGView: using pending icon and showing valid status for tool tip
This commit is contained in:
parent
e6f77dc067
commit
78f3e9786b
|
@ -126,6 +126,8 @@ Model::Model(QObject *parentIn, const Gui::Document &documentIn) : QGraphicsScen
|
|||
passPixmap = passIcon.pixmap(iconSize, iconSize);
|
||||
QIcon failIcon(Gui::BitmapFactory().pixmap("dagViewFail"));
|
||||
failPixmap = failIcon.pixmap(iconSize, iconSize);
|
||||
QIcon pendingIcon(Gui::BitmapFactory().pixmap("dagViewPending"));
|
||||
pendingPixmap = pendingIcon.pixmap(iconSize, iconSize);
|
||||
|
||||
renameAction = new QAction(this);
|
||||
renameAction->setText(tr("Rename"));
|
||||
|
@ -844,19 +846,25 @@ void Model::updateStates()
|
|||
(*theGraph)[currentVertex].lastVisibleState = currentVisibilityState;
|
||||
}
|
||||
|
||||
FeatureState currentFeatureState = (record.DObject->isError()) ? FeatureState::Fail : FeatureState::Pass;
|
||||
FeatureState currentFeatureState = FeatureState::Pass;
|
||||
if (record.DObject->isError())
|
||||
currentFeatureState = FeatureState::Fail;
|
||||
else if ((record.DObject->mustExecute() == 1))
|
||||
currentFeatureState = FeatureState::Pending;
|
||||
if (currentFeatureState != (*theGraph)[currentVertex].lastFeatureState)
|
||||
{
|
||||
if (currentFeatureState == FeatureState::Pass)
|
||||
{
|
||||
(*theGraph)[currentVertex].stateIcon->setPixmap(passPixmap);
|
||||
(*theGraph)[currentVertex].stateIcon->setToolTip(QString());
|
||||
}
|
||||
else
|
||||
{
|
||||
(*theGraph)[currentVertex].stateIcon->setPixmap(failPixmap);
|
||||
(*theGraph)[currentVertex].stateIcon->setToolTip(QString::fromAscii(record.DObject->getStatusString()));
|
||||
if (currentFeatureState == FeatureState::Fail)
|
||||
(*theGraph)[currentVertex].stateIcon->setPixmap(failPixmap);
|
||||
else
|
||||
(*theGraph)[currentVertex].stateIcon->setPixmap(pendingPixmap);
|
||||
}
|
||||
(*theGraph)[currentVertex].stateIcon->setToolTip(QString::fromAscii(record.DObject->getStatusString()));
|
||||
(*theGraph)[currentVertex].lastFeatureState = currentFeatureState;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -149,6 +149,7 @@ namespace Gui
|
|||
QPixmap visiblePixmapDisabled;
|
||||
QPixmap passPixmap;
|
||||
QPixmap failPixmap;
|
||||
QPixmap pendingPixmap;
|
||||
|
||||
QAction *renameAction;
|
||||
QAction *editingFinishedAction;
|
||||
|
|
|
@ -57,7 +57,8 @@ namespace Gui
|
|||
{
|
||||
None = 0, //<! not determined.
|
||||
Pass, //<! feature updated ok.
|
||||
Fail //<! feature failed to update.
|
||||
Fail, //<! feature failed to update.
|
||||
Pending //<! feature is pending an update.
|
||||
};
|
||||
|
||||
//limit of column width? boost::dynamic_bitset?
|
||||
|
|
|
@ -105,6 +105,7 @@
|
|||
<file>dagViewVisible.svg</file>
|
||||
<file>dagViewPass.svg</file>
|
||||
<file>dagViewFail.svg</file>
|
||||
<file>dagViewPending.svg</file>
|
||||
<file>Part_Measure_Clear_All.svg</file>
|
||||
<file>Part_Measure_Toggle_All.svg</file>
|
||||
<file>spaceball_button.svg</file>
|
||||
|
|
Loading…
Reference in New Issue
Block a user