diff --git a/Modules/Wrappers/QtWidget/src/appmainwindow.ui b/Modules/Wrappers/QtWidget/src/appmainwindow.ui index c376f1984f3cec0518739bf1dd22fe3b6fb4f4be..45afb83aaf87a15ee6a27a139879eea56befc8e1 100644 --- a/Modules/Wrappers/QtWidget/src/appmainwindow.ui +++ b/Modules/Wrappers/QtWidget/src/appmainwindow.ui @@ -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"> diff --git a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetMainWindow.cxx b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetMainWindow.cxx index 93c3f459e2e43b49d43e879a84e3f83ccfa30345..f881e899881619697b75014c61da6c3465cd0688 100644 --- a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetMainWindow.cxx +++ b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetMainWindow.cxx @@ -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);