25 #include <QVBoxLayout>
37 QVBoxLayout* layout =
new QVBoxLayout;
39 m_view =
new QTextEdit;
40 m_view->setReadOnly(
true);
41 m_view->setText(
"No information");
43 layout->addWidget(m_view);
56 m_progress = progress;
60 void Status::UpdateView()
63 m_view->setText(
"No information available");
65 std::stringstream output;
67 output <<
"Name: " << m_progress->GetExploration().GetName() << std::endl << std::endl;
68 output <<
"Progress:" << std::endl;
69 output <<
"\t" << m_progress->GetTaskCount(
TaskState::Finished) <<
"/" << m_progress->GetExploration().GetNumberOfTasks() << std::endl;
71 if (m_progress->IsFinished()) {
72 output <<
"\t" <<
"Done" << std::endl;
74 output <<
"\t" << m_progress->GetTaskCount(
TaskState::Running) <<
" running" << std::endl;
78 output <<
"An error occurred, check the task overview for more information." << std::endl;
85 m_view->setText(QString::fromStdString(output.str()));
91 QString text = m_view->toPlainText();
92 m_view->setTextColor(QColor(
"black"));
93 m_view->setText(text);
98 QString text = m_view->toPlainText();
99 m_view->setTextColor(QColor(
"gray"));
100 m_view->setText(text);
Interface for Exploration.
The task is waiting to be sent for the first time.
The task is being executed.
void UpdateStatus(const std::shared_ptr< const ExplorationProgress > &progress)
Update the status of an exploration.
void Clear()
Clear the current displayed exploration.
Namespace for SimPT parameter explorer package.
void Disconnected()
Set font to disconnected state.
Interface for ExplorationProgress.
The task was cancelled or stopped.
void Connected()
Set font to connected state.