Commit b4f75ff7 authored by Guillaume Pasero's avatar Guillaume Pasero

BUG: Mantis-1494: enhance messages for user, minor UI and translation fixes

parent 9f8eed39
......@@ -63,7 +63,7 @@ endif()
#############################################################################
qt4_wrap_cpp( OTBMapla_SRC_MOC ${OTBMapla_HEADERS_MOC} )
qt4_wrap_ui( OTBMapla_FORMS_HEADERS ${OTBMapla_FORMS} )
qt4_add_resources( OTBMapla_RESOURCES_RCC ${OTBMapla_RESOURCES} )
qt4_add_resources( OTBMapla_RESOURCES_RCC ${OTBMapla_RESOURCES} OPTIONS "-no-compress")
#############################################################################
add_to_qt4_i18n_sources( ${OTBMapla_SRCS} )
......
......@@ -12,6 +12,8 @@
<file alias="action_ZoomOut_Icon">../../../../Utilities/Data/Icons/action-zoomout_24x24.png</file>
<file alias="action_ZoomFull_Icon">../../../../Utilities/Data/Icons/action-zoomtolayer_24x24.png</file>
<file alias="action_Open_Icon">../../../../Utilities/Data/Icons/document-open_32x32.png</file>
<file alias="done">../../../../Utilities/Data/Icons/check_24x24.png</file>
<file alias="failed">../../../../Utilities/Data/Icons/forbidden-24x24.png</file>
</qresource>
<qresource prefix="/images">
<file alias="application_icon">../../../../Utilities/Data/Icons/monteverdi-128x128.png</file>
......
......@@ -46,7 +46,7 @@ set( OTBMonteverdi_RESOURCES
#############################################################################
qt4_wrap_cpp( OTBMonteverdi_SRC_MOC ${OTBMonteverdi_HEADERS_MOC} )
qt4_wrap_ui( OTBMonteverdi_FORMS_HEADERS ${OTBMonteverdi_FORMS} )
qt4_add_resources( OTBMonteverdi_RESOURCES_RCC ${OTBMonteverdi_RESOURCES} )
qt4_add_resources( OTBMonteverdi_RESOURCES_RCC ${OTBMonteverdi_RESOURCES} OPTIONS "-no-compress")
#############################################################################
add_to_qt4_i18n_sources( ${OTBMonteverdi_SRCS} )
......
......@@ -22,6 +22,8 @@
<file alias="action_ZoomOut_Icon">../../../../Utilities/Data/Icons/action-zoomout_24x24.png</file>
<file alias="action_ZoomLayer_Icon">../../../../Utilities/Data/Icons/action-zoomtolayer_24x24.png</file>
<file alias="action_Open_Icon">../../../../Utilities/Data/Icons/document-open_32x32.png</file>
<file alias="done">../../../../Utilities/Data/Icons/check_24x24.png</file>
<file alias="failed">../../../../Utilities/Data/Icons/forbidden-24x24.png</file>
</qresource>
<qresource prefix="/images">
<file alias="application_icon">../../../../Utilities/Data/Icons/monteverdi-128x128.png</file>
......
......@@ -187,20 +187,19 @@ QtWidgetView
// Create a VBoxLayout with the header, the input widgets, and the footer
QVBoxLayout *mainLayout = new QVBoxLayout();
QTabWidget *tab = new QTabWidget();
tab->addTab(CreateInputWidgets(), "Parameters");
tab->addTab(CreateInputWidgets(), tr("Parameters"));
//otb::Wrapper::QtWidgetProgressReport* prog = new otb::Wrapper::QtWidgetProgressReport(m_Model);
//prog->SetApplication(m_Application);
//tab->addTab(prog, "Progress");
tab->addTab(CreateDoc(), "Documentation");
tab->addTab(CreateDoc(), tr("Documentation"));
mainLayout->addWidget(tab);
QTextEdit *log = new QTextEdit();
connect( m_Model->GetLogOutput(), SIGNAL(NewContentLog(QString)), log, SLOT(append(QString) ) );
tab->addTab(log, "Logs");
tab->addTab(log, tr("Logs"));
m_Message = new QLabel("<center><font color=\"#FF0000\">Select parameters</font></center>");
m_Message = new QLabel("<center><font color=\"#FF0000\">"+tr("Select parameters")+"</font></center>");
connect(
m_Model,
SIGNAL( SetApplicationReady( bool ) ),
......@@ -215,12 +214,16 @@ QtWidgetView
otb::Wrapper::QtWidgetSimpleProgressReport* progressReport =
new otb::Wrapper::QtWidgetSimpleProgressReport(m_Model);
progressReport->SetApplication(m_Application);
QWidget* footer = CreateFooter();
QHBoxLayout *footLayout = new QHBoxLayout;
footLayout->addWidget(progressReport);
footLayout->addWidget(CreateFooter());
footLayout->addWidget(footer);
mainLayout->addLayout(footLayout);
footLayout->setAlignment(footer, Qt::AlignBottom);
QGroupBox *mainGroup = new QGroupBox();
mainGroup->setLayout(mainLayout);
......@@ -617,7 +620,7 @@ QtWidgetView
emit ExecuteAndWriteOutput();
m_Message->setText("<center><font color=\"#FF0000\">Running</font></center>");
m_Message->setText("<center><font color=\"#FF0000\">"+tr("Running")+"</font></center>");
}
/******************************************************************************/
......@@ -627,11 +630,15 @@ QtWidgetView
{
if (status >= 0)
{
m_Message->setText("<center><font color=\"#00A000\">DONE</font></center>");
m_Message->setText("<center>"
"<img src=\":/icons/done\" width=\"16\" height=\"16\" />"
"<font color=\"#00A000\">"+tr("Done")+"</font></center>");
}
else
{
m_Message->setText("<center><font color=\"#FF0000\">FAILED !</font></center>");
m_Message->setText("<center>"
"<img src=\":/icons/failed\" width=\"16\" height=\"16\" />"
"<font color=\"#FF0000\">"+tr("Failed")+"</font></center>");
}
}
......@@ -641,9 +648,9 @@ QtWidgetView
::UpdateMessageAfterApplicationReady( bool val )
{
if(val == true)
m_Message->setText("<center><font color=\"#00FF00\">Ready to run</font></center>");
m_Message->setText("<center><font color=\"#00A000\">"+tr("Ready to run")+"</font></center>");
else
m_Message->setText("<center><font color=\"#FF0000\">Select parameters</font></center>");
m_Message->setText("<center><font color=\"#FF0000\">"+tr("Select parameters")+"</font></center>");
}
/*******************************************************************************/
......
......@@ -45,7 +45,9 @@ QtWidgetSimpleProgressReport::QtWidgetSimpleProgressReport(QtWidgetModel * model
m_AddProcessCommand->SetCallbackFunction( this, &QtWidgetSimpleProgressReport::ProcessEvent );
m_Bar = new itk::QtProgressBar(this);
m_Label = new QLabel("No process");
m_Label->setWordWrap(true);
connect( m_Bar, SIGNAL(SetValueChanged(int)), m_Bar, SLOT(setValue(int)) );
connect( m_Model, SIGNAL(SetProgressReportDone()), m_Bar, SLOT(reset()) );
......
......@@ -97,11 +97,11 @@ void QtWidgetView::UpdateMessageAfterExecution(int status)
{
if (status >= 0)
{
m_Message->setText("<center><font color=\"#00A000\">DONE</font></center>");
m_Message->setText("<center><font color=\"#00A000\">Done</font></center>");
}
else
{
m_Message->setText("<center><font color=\"#FF0000\">FAILED !</font></center>");
m_Message->setText("<center><font color=\"#FF0000\">Failed</font></center>");
}
}
......
......@@ -5110,5 +5110,37 @@ Le(s) résultat(s) vont être importés en tant que jeu de données.</translatio
<source>Following files are being viewed in </source>
<translation>Les fichiers suivants sont en cours de visualisation dans </translation>
</message>
<message>
<source>Running</source>
<translation>En cours</translation>
</message>
<message>
<source>Done</source>
<translation>Terminé</translation>
</message>
<message>
<source>Failed</source>
<translation>Echec</translation>
</message>
<message>
<source>Ready to run</source>
<translation>Prêt à démarrer</translation>
</message>
<message>
<source>Select parameters</source>
<translation>Choix des paramètres</translation>
</message>
<message>
<source>Parameters</source>
<translation>Paramètres</translation>
</message>
<message>
<source>Documentation</source>
<translation>Documentation</translation>
</message>
<message>
<source>Logs</source>
<translation>Logs</translation>
</message>
</context>
</TS>
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