Commit 4db79fc4 authored by Cédric Traizet's avatar Cédric Traizet
Browse files

ENH: add a deprecation status label for deprecated applications in QtWidgetMainWindow

No related merge requests found
Showing with 19 additions and 0 deletions
+19 -0
......@@ -34,6 +34,13 @@
<property name="bottomMargin">
<number>12</number>
</property>
<item alignment="Qt::AlignHCenter|Qt::AlignVCenter">
<widget class="QLabel" name="deprecation">
<property name="text">
<string>Deprecation status</string>
</property>
</widget>
</item>
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
......
......@@ -70,6 +70,18 @@ QtMainWindow::QtMainWindow(Application::Pointer app, QtWidgetView* gui, QWidget*
// Setup the progress bar to observe the model
ui->progressBar->SetModel(gui->GetModel());
// Fill and display the deprecation status label if needed, or hide it.
if (app->IsDeprecated())
{
ui->deprecation->setVisible(true);
ui->deprecation->setText("<font color='red'>This application is deprecated and will be removed in a future release.</font>");
}
else
{
ui->deprecation->setVisible(false);
ui->deprecation->setText("");
}
// Connect application progress text to the QLabel
connect(ui->progressBar, &QtWidgetSimpleProgressReport::SetText, ui->message, &QLabel::setText);
......
Supports Markdown
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