Commit f1dd4960 authored by allens's avatar allens

added message handling and clearing

git-svn-id: http://visit.ilight.com/svn/visit/trunk/src@27759 18c085ea-50e0-402c-830e-de6fd14e8384
parent f7f2f4ef
......@@ -66,6 +66,11 @@ QvisSimulationMessageWindow::CreateWindowContents()
messages = new QTextEdit(central);
messages->setReadOnly(true);
topLayout->addWidget(messages);
QPushButton *clearButton = new QPushButton(tr("Clear"), central);
connect(clearButton, SIGNAL(clicked()), this, SLOT(clear()));
clearButton->setEnabled(true);
topLayout->addWidget(clearButton, 1, 0);
}
//
......
......@@ -994,6 +994,33 @@ QvisSimulationWindow::UpdateWindow(bool doAll)
uiValues->GetEnabled());
}
}
if(uiValues->GetName() == "SIMULATION_STATUS")
{
QString message = QString(uiValues->GetSvalue().c_str());
QString error = QString("<span style=\"color:#000000;\">%1</span>").arg(message);
simMessages->addMessage(error);
}
if(uiValues->GetName() == "SIMULATION_STATUS_WARNING")
{
QString message = QString(uiValues->GetSvalue().c_str());
QString warning = QString("<span style=\" color:#aaaa00;\">%1</span>").arg(message);
simMessages->addMessage(warning);
}
if(uiValues->GetName() == "SIMULATION_STATUS_ERROR")
{
QString message = QString(uiValues->GetSvalue().c_str());
QString error = QString("<span style=\" color:#aa0000;\">%1</span>").arg(message);
simMessages->addMessage(error);
}
if(uiValues->GetName() == "SIMULATION_STATUS_CLEAR")
{
simMessages->clear();
}
}
// ****************************************************************************
......@@ -1224,6 +1251,10 @@ QvisSimulationWindow::UpdateInformation()
break;
}
// Update the message window
QString message = QString(md->GetSimInfo().GetMessage().c_str());
simMessages->addMessage(message);
// Update command buttons
bool updateSize = false;
int nButtonsToUpdate = std::max(simCommands->numCommandButtons(),
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment