Commit b4a34209 authored by Stéphane Albert's avatar Stéphane Albert

ENH: Changed return type of otb::Wrapper::Parameter from const char * to const std::string & .

parent a6add9cc
......@@ -86,7 +86,7 @@ public:
itkSetStringMacro(Description);
/** Get the parameter description */
itkGetStringMacro(Description);
itkGetConstReferenceMacro( Description, std::string );
/** Set the parameter key */
itkSetStringMacro(Key);
......
......@@ -61,7 +61,9 @@ void QtWidgetChoiceParameter::DoUpdateGUI()
void QtWidgetChoiceParameter::DoCreateWidget()
{
m_ComboBox = new QComboBox;
m_ComboBox->setToolTip(m_ChoiceParam->GetDescription());
m_ComboBox->setToolTip(
QString::fromStdString( m_ChoiceParam->GetDescription() )
);
m_StackWidget = new QStackedWidget;
......
......@@ -60,7 +60,9 @@ void QtWidgetComplexInputImageParameter::DoCreateWidget()
m_HLayout->setSpacing(0);
m_HLayout->setContentsMargins(0, 0, 0, 0);
m_Input = new QLineEdit;
m_Input->setToolTip( m_ComplexInputImageParam->GetDescription() );
m_Input->setToolTip(
QString::fromStdString( m_ComplexInputImageParam->GetDescription() )
);
connect( m_Input, SIGNAL(textChanged(const QString&)), this, SLOT(SetFileName(const QString&)) );
connect( m_Input, SIGNAL(textChanged(const QString&)), GetModel(), SLOT(NotifyUpdate()) );
......
......@@ -57,7 +57,9 @@ void QtWidgetComplexOutputImageParameter::DoCreateWidget()
m_HLayout->setSpacing(0);
m_HLayout->setContentsMargins(0, 0, 0, 0);
m_Input = new QLineEdit;
m_Input->setToolTip( m_OutputImageParam->GetDescription() );
m_Input->setToolTip(
QString::fromStdString( m_OutputImageParam->GetDescription() )
);
connect( m_Input, SIGNAL(textChanged(const QString&)), this, SLOT(SetFileName(const QString&)) );
connect( m_Input, SIGNAL(textChanged(const QString&)), GetModel(), SLOT(NotifyUpdate()) );
m_HLayout->addWidget(m_Input);
......
......@@ -56,7 +56,9 @@ void QtWidgetDirectoryParameter::DoCreateWidget()
m_HLayout->setSpacing(0);
m_HLayout->setContentsMargins(0, 0, 0, 0);
m_Input = new QLineEdit;
m_Input->setToolTip( m_DirectoryParam->GetDescription() );
m_Input->setToolTip(
QString::fromStdString( m_DirectoryParam->GetDescription() )
);
connect( m_Input, SIGNAL(textChanged(const QString&)), this, SLOT(SetFileName(const QString&)) );
connect( m_Input, SIGNAL(textChanged(const QString&)), GetModel(), SLOT(NotifyUpdate()) );
......
......@@ -72,7 +72,11 @@ void QtWidgetFloatParameter::DoCreateWidget()
m_QDoubleSpinBox->setDecimals(5);
m_QDoubleSpinBox->setSingleStep(0.1);
m_QDoubleSpinBox->setRange(m_FloatParam->GetMinimumValue(), m_FloatParam->GetMaximumValue());
m_QDoubleSpinBox->setToolTip(m_FloatParam->GetDescription());
m_QDoubleSpinBox->setToolTip(
QString::fromStdString(
m_FloatParam->GetDescription()
)
);
connect( m_QDoubleSpinBox, SIGNAL(valueChanged(double)), this, SLOT(SetValue(double)) );
connect( m_QDoubleSpinBox, SIGNAL(valueChanged(double)), GetModel(), SLOT(NotifyUpdate()) );
......
......@@ -61,7 +61,9 @@ void QtWidgetInputFilenameParameter::DoCreateWidget()
m_HLayout->setSpacing(0);
m_HLayout->setContentsMargins(0, 0, 0, 0);
m_Input = new QLineEdit;
m_Input->setToolTip( m_FilenameParam->GetDescription() );
m_Input->setToolTip(
QString::fromStdString( m_FilenameParam->GetDescription() )
);
connect( m_Input, SIGNAL(textChanged(const QString&)), this, SLOT(SetFileName(const QString&)) );
connect( m_Input, SIGNAL(textChanged(const QString&)), GetModel(), SLOT(NotifyUpdate()) );
......
......@@ -68,7 +68,9 @@ void QtWidgetInputImageParameter::DoCreateWidget()
m_HLayout->setSpacing(0);
m_HLayout->setContentsMargins(0, 0, 0, 0);
m_Input = new QLineEdit;
m_Input->setToolTip( m_InputImageParam->GetDescription() );
m_Input->setToolTip(
QString::fromStdString( m_InputImageParam->GetDescription() )
);
connect( m_Input, SIGNAL(textChanged(const QString&)), this, SLOT(SetFileName(const QString&)) );
connect( m_Input, SIGNAL(textChanged(const QString&)), GetModel(), SLOT(NotifyUpdate()) );
......
......@@ -60,7 +60,9 @@ void QtWidgetInputProcessXMLParameter::DoCreateWidget()
m_HLayout->setSpacing(0);
m_HLayout->setContentsMargins(0, 0, 0, 0);
m_Input = new QLineEdit;
m_Input->setToolTip( m_XMLParam->GetDescription() );
m_Input->setToolTip(
QString::fromStdString( m_XMLParam->GetDescription() )
);
connect( m_Input, SIGNAL(textChanged(const QString&)), this, SLOT(SetFileName(const QString&)) );
connect( m_Input, SIGNAL(textChanged(const QString&)), GetModel(), SLOT(NotifyUpdate()) );
......
......@@ -61,7 +61,9 @@ void QtWidgetInputVectorDataParameter::DoCreateWidget()
m_HLayout->setSpacing(0);
m_HLayout->setContentsMargins(0, 0, 0, 0);
m_Input = new QLineEdit;
m_Input->setToolTip( m_InputVectorDataParam->GetDescription() );
m_Input->setToolTip(
QString::fromStdString( m_InputVectorDataParam->GetDescription() )
);
connect( m_Input, SIGNAL(textChanged(const QString&)), this, SLOT(SetFileName(const QString&)) );
connect( m_Input, SIGNAL(textChanged(const QString&)), GetModel(), SLOT(NotifyUpdate()) );
......
......@@ -44,7 +44,9 @@ void QtWidgetIntParameter::DoCreateWidget()
m_QSpinBox = new QSpinBox;
m_QSpinBox->setRange(m_IntParam->GetMinimumValue(), m_IntParam->GetMaximumValue());
m_QSpinBox->setToolTip(m_IntParam->GetDescription());
m_QSpinBox->setToolTip(
QString::fromStdString( m_IntParam->GetDescription() )
);
connect( m_QSpinBox, SIGNAL(valueChanged(int)), this, SLOT(SetValue(int)) );
connect( m_QSpinBox, SIGNAL(valueChanged(int)), GetModel(), SLOT(NotifyUpdate()) );
......
......@@ -102,7 +102,9 @@ void QtWidgetListViewParameter::DoUpdateGUI()
void QtWidgetListViewParameter::DoCreateWidget()
{
m_ListView = new QListWidget();
m_ListView->setToolTip(m_ListViewParam->GetDescription());
m_ListView->setToolTip(
QString::fromStdString( m_ListViewParam->GetDescription() )
);
if(m_ListViewParam->GetSingleSelection())
{
......
......@@ -57,7 +57,9 @@ void QtWidgetOutputFilenameParameter::DoCreateWidget()
m_HLayout->setSpacing(0);
m_HLayout->setContentsMargins(0, 0, 0, 0);
m_Input = new QLineEdit;
m_Input->setToolTip( m_FilenameParam->GetDescription() );
m_Input->setToolTip(
QString::fromStdString( m_FilenameParam->GetDescription() )
);
connect( m_Input, SIGNAL(textChanged(const QString&)), this, SLOT(SetFileName(const QString&)) );
connect( m_Input, SIGNAL(textChanged(const QString&)), GetModel(), SLOT(NotifyUpdate()) );
......
......@@ -58,7 +58,9 @@ void QtWidgetOutputImageParameter::DoCreateWidget()
m_HLayout->setSpacing(0);
m_HLayout->setContentsMargins(0, 0, 0, 0);
m_Input = new QLineEdit();
m_Input->setToolTip( m_OutputImageParam->GetDescription() );
m_Input->setToolTip(
QString::fromStdString( m_OutputImageParam->GetDescription() )
);
connect( m_Input, SIGNAL(textChanged(const QString&)), this, SLOT(SetFileName(const QString&)) );
connect( m_Input, SIGNAL(textChanged(const QString&)), GetModel(), SLOT(NotifyUpdate()) );
m_HLayout->addWidget(m_Input);
......
......@@ -55,7 +55,9 @@ void QtWidgetOutputProcessXMLParameter::DoCreateWidget()
m_HLayout->setSpacing(0);
m_HLayout->setContentsMargins(0, 0, 0, 0);
m_Input = new QLineEdit;
m_Input->setToolTip( m_XMLParam->GetDescription() );
m_Input->setToolTip(
QString::fromStdString( m_XMLParam->GetDescription() )
);
connect( m_Input, SIGNAL(textChanged(const QString&)), this, SLOT(SetFileName(const QString&)) );
connect( m_Input, SIGNAL(textChanged(const QString&)), GetModel(), SLOT(NotifyUpdate()) );
......
......@@ -53,7 +53,9 @@ void QtWidgetOutputVectorDataParameter::DoCreateWidget()
m_HLayout->setContentsMargins(0, 0, 0, 0);
m_Input = new QLineEdit;
m_Input->setToolTip( m_OutputVectorDataParam->GetDescription() );
m_Input->setToolTip(
QString::fromStdString( m_OutputVectorDataParam->GetDescription() )
);
connect( m_Input, SIGNAL(textChanged(const QString&)), this, SLOT(SetFileName(const QString&)) );
connect( m_Input, SIGNAL(textChanged(const QString&)), GetModel(), SLOT(NotifyUpdate()) );
m_HLayout->addWidget(m_Input);
......
......@@ -43,7 +43,9 @@ void QtWidgetRAMParameter::DoCreateWidget()
m_QHBoxLayout->setContentsMargins(0, 0, 0, 0);
m_QSpinBox = new QSpinBox;
m_QSpinBox->setToolTip(m_RAMParam->GetDescription());
m_QSpinBox->setToolTip(
QString::fromStdString( m_RAMParam->GetDescription() )
);
connect( m_QSpinBox, SIGNAL(valueChanged(int)), this, SLOT(SetValue(int)) );
connect( m_QSpinBox, SIGNAL(valueChanged(int)), GetModel(), SLOT(NotifyUpdate()) );
......
......@@ -37,7 +37,9 @@ QtWidgetStringParameter::~QtWidgetStringParameter()
void QtWidgetStringParameter::DoUpdateGUI()
{
m_Input->setToolTip(m_StringParam->GetDescription());
m_Input->setToolTip(
QString::fromStdString( m_StringParam->GetDescription() )
);
// Update the lineEdit only if there is a change and that's not empty or whitespaces
QString text( m_StringParam->GetValue().c_str() );
......@@ -55,7 +57,9 @@ void QtWidgetStringParameter::DoCreateWidget()
m_HLayout->setContentsMargins(0, 0, 0, 0);
m_Input = new QLineEdit;
m_Input->setToolTip(m_StringParam->GetDescription());
m_Input->setToolTip(
QString::fromStdString( m_StringParam->GetDescription() )
);
m_HLayout->addWidget(m_Input);
connect( m_Input, SIGNAL(textChanged(const QString&)), this, SLOT(SetValue(const QString&)) );
......
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