Commit fda0338e authored by Victor Poughon's avatar Victor Poughon

Merge branch 'widget_parents' into 'develop'

BUG: Fix missing QWidget parents See merge request !125
parents 9bdec1f7 afb5b1d7
......@@ -40,7 +40,7 @@ class OTBQtWidget_EXPORT QtWidgetBoolParameter : public QtWidgetParameterBase
Q_OBJECT
public:
QtWidgetBoolParameter(BoolParameter*, QtWidgetModel*);
QtWidgetBoolParameter(BoolParameter*, QtWidgetModel*, QWidget*);
~QtWidgetBoolParameter() override;
public slots:
......
......@@ -39,7 +39,7 @@ class OTBQtWidget_EXPORT QtWidgetChoiceParameter : public QtWidgetParameterBase
{
Q_OBJECT
public:
QtWidgetChoiceParameter(ChoiceParameter*, QtWidgetModel*);
QtWidgetChoiceParameter(ChoiceParameter*, QtWidgetModel*, QWidget*);
~QtWidgetChoiceParameter() override;
protected slots:
......
......@@ -40,7 +40,7 @@ class OTBQtWidget_EXPORT QtWidgetComplexInputImageParameter : public QtWidgetPar
{
Q_OBJECT
public:
QtWidgetComplexInputImageParameter(ComplexInputImageParameter*, QtWidgetModel*);
QtWidgetComplexInputImageParameter(ComplexInputImageParameter*, QtWidgetModel*, QWidget*);
~QtWidgetComplexInputImageParameter() override;
inline const QLineEdit* GetInput() const;
......
......@@ -40,7 +40,7 @@ class OTBQtWidget_EXPORT QtWidgetComplexOutputImageParameter : public QtWidgetPa
{
Q_OBJECT
public:
QtWidgetComplexOutputImageParameter(ComplexOutputImageParameter*, QtWidgetModel*);
QtWidgetComplexOutputImageParameter(ComplexOutputImageParameter*, QtWidgetModel*, QWidget*);
~QtWidgetComplexOutputImageParameter() override;
inline const QLineEdit* GetInput() const;
......
......@@ -40,7 +40,7 @@ class OTBQtWidget_EXPORT QtWidgetDirectoryParameter : public QtWidgetParameterBa
{
Q_OBJECT
public:
QtWidgetDirectoryParameter(DirectoryParameter*, QtWidgetModel*);
QtWidgetDirectoryParameter(DirectoryParameter*, QtWidgetModel*, QWidget*);
~QtWidgetDirectoryParameter() override;
protected slots:
......
......@@ -40,7 +40,7 @@ class OTBQtWidget_EXPORT QtWidgetEmptyParameter : public QtWidgetParameterBase
Q_OBJECT
public:
QtWidgetEmptyParameter(EmptyParameter*, QtWidgetModel*);
QtWidgetEmptyParameter(EmptyParameter*, QtWidgetModel*, QWidget*);
~QtWidgetEmptyParameter() override;
private:
......
......@@ -41,7 +41,7 @@ class OTBQtWidget_EXPORT QtWidgetFloatParameter : public QtWidgetParameterBase
{
Q_OBJECT
public:
QtWidgetFloatParameter(FloatParameter*, QtWidgetModel*);
QtWidgetFloatParameter(FloatParameter*, QtWidgetModel*, QWidget*);
~QtWidgetFloatParameter() override;
private slots:
......
......@@ -46,7 +46,7 @@ class OTBQtWidget_EXPORT QtWidgetInputFilenameListParameter :
//
// Public methods.
public:
QtWidgetInputFilenameListParameter( InputFilenameListParameter *, QtWidgetModel * );
QtWidgetInputFilenameListParameter( InputFilenameListParameter *, QtWidgetModel * , QWidget *);
~QtWidgetInputFilenameListParameter() override;
//
......
......@@ -40,7 +40,7 @@ class OTBQtWidget_EXPORT QtWidgetInputFilenameParameter : public QtWidgetParamet
{
Q_OBJECT
public:
QtWidgetInputFilenameParameter(InputFilenameParameter*, QtWidgetModel*);
QtWidgetInputFilenameParameter(InputFilenameParameter*, QtWidgetModel*, QWidget*);
~QtWidgetInputFilenameParameter() override;
inline const QLineEdit* GetInput() const;
......
......@@ -53,7 +53,7 @@ class OTBQtWidget_EXPORT QtWidgetInputImageListParameter :
//
// Public methods.
public:
QtWidgetInputImageListParameter( InputImageListParameter *, QtWidgetModel * );
QtWidgetInputImageListParameter( InputImageListParameter *, QtWidgetModel *, QWidget * );
~QtWidgetInputImageListParameter() override;
//
......
......@@ -40,7 +40,7 @@ class OTBQtWidget_EXPORT QtWidgetInputImageParameter : public QtWidgetParameterB
{
Q_OBJECT
public:
QtWidgetInputImageParameter(InputImageParameter*, QtWidgetModel*);
QtWidgetInputImageParameter(InputImageParameter*, QtWidgetModel*, QWidget*);
~QtWidgetInputImageParameter() override;
inline const QLineEdit* GetInput() const;
......
......@@ -40,7 +40,7 @@ class OTBQtWidget_EXPORT QtWidgetInputProcessXMLParameter : public QtWidgetParam
{
Q_OBJECT
public:
QtWidgetInputProcessXMLParameter(InputProcessXMLParameter*, QtWidgetModel*);
QtWidgetInputProcessXMLParameter(InputProcessXMLParameter*, QtWidgetModel*, QWidget*);
~QtWidgetInputProcessXMLParameter() override;
inline const QLineEdit* GetInput() const;
......
......@@ -52,7 +52,7 @@ class OTBQtWidget_EXPORT QtWidgetInputVectorDataListParameter
// Public methods.
public:
QtWidgetInputVectorDataListParameter( InputVectorDataListParameter *,
QtWidgetModel * );
QtWidgetModel *, QWidget * );
~QtWidgetInputVectorDataListParameter() override;
......
......@@ -40,7 +40,7 @@ class OTBQtWidget_EXPORT QtWidgetInputVectorDataParameter : public QtWidgetParam
{
Q_OBJECT
public:
QtWidgetInputVectorDataParameter(InputVectorDataParameter*, QtWidgetModel*);
QtWidgetInputVectorDataParameter(InputVectorDataParameter*, QtWidgetModel*, QWidget*);
~QtWidgetInputVectorDataParameter() override;
inline const QLineEdit* GetInput() const;
......
......@@ -42,7 +42,7 @@ class OTBQtWidget_EXPORT QtWidgetIntParameter : public QtWidgetParameterBase
{
Q_OBJECT
public:
QtWidgetIntParameter(IntParameter*, QtWidgetModel*);
QtWidgetIntParameter(IntParameter*, QtWidgetModel*, QWidget*);
~QtWidgetIntParameter() override;
private slots:
......
......@@ -39,7 +39,7 @@ class OTBQtWidget_EXPORT QtWidgetListViewParameter : public QtWidgetParameterBas
{
Q_OBJECT
public:
QtWidgetListViewParameter(ListViewParameter*, QtWidgetModel*);
QtWidgetListViewParameter(ListViewParameter*, QtWidgetModel*, QWidget*);
~QtWidgetListViewParameter() override;
std::vector<int> GetSelectedItems()
......
......@@ -40,7 +40,7 @@ class OTBQtWidget_EXPORT QtWidgetOutputFilenameParameter : public QtWidgetParame
{
Q_OBJECT
public:
QtWidgetOutputFilenameParameter(OutputFilenameParameter*, QtWidgetModel*);
QtWidgetOutputFilenameParameter(OutputFilenameParameter*, QtWidgetModel*, QWidget*);
~QtWidgetOutputFilenameParameter() override;
inline const QLineEdit* GetInput() const;
......
......@@ -40,7 +40,7 @@ class OTBQtWidget_EXPORT QtWidgetOutputImageParameter : public QtWidgetParameter
{
Q_OBJECT
public:
QtWidgetOutputImageParameter(OutputImageParameter*, QtWidgetModel*);
QtWidgetOutputImageParameter(OutputImageParameter*, QtWidgetModel*, QWidget*);
~QtWidgetOutputImageParameter() override;
inline const QLineEdit* GetInput() const;
......
......@@ -40,7 +40,7 @@ class OTBQtWidget_EXPORT QtWidgetOutputProcessXMLParameter : public QtWidgetPara
{
Q_OBJECT
public:
QtWidgetOutputProcessXMLParameter(OutputProcessXMLParameter*, QtWidgetModel*);
QtWidgetOutputProcessXMLParameter(OutputProcessXMLParameter*, QtWidgetModel*, QWidget*);
~QtWidgetOutputProcessXMLParameter() override;
inline const QLineEdit* GetInput() const;
......
......@@ -40,7 +40,7 @@ class OTBQtWidget_EXPORT QtWidgetOutputVectorDataParameter : public QtWidgetPara
{
Q_OBJECT
public:
QtWidgetOutputVectorDataParameter(OutputVectorDataParameter*, QtWidgetModel*);
QtWidgetOutputVectorDataParameter(OutputVectorDataParameter*, QtWidgetModel*, QWidget*);
~QtWidgetOutputVectorDataParameter() override;
inline const QLineEdit* GetInput() const;
......
......@@ -43,7 +43,7 @@ class OTBQtWidget_EXPORT QtWidgetParameterBase : public QWidget
Q_OBJECT
friend class QtWidgetParameterGroup;
public:
QtWidgetParameterBase( Parameter *, QtWidgetModel * );
QtWidgetParameterBase( Parameter *, QtWidgetModel * , QWidget * parent);
~QtWidgetParameterBase() override;
void CreateWidget();
......
......@@ -57,8 +57,8 @@ public:
/** Run-time type information (and related methods). */
itkTypeMacro(QtWidgetParameterFactory, Object);
/** Create the appropriate ImageIO depending on the particulars of the file. */
static QtWidgetParameterBase* CreateQtWidget( Parameter* param, QtWidgetModel* model );
/** Create the appropriate QtWidget depending on the particulars of the parameter */
static QtWidgetParameterBase* CreateQtWidget( Parameter* param, QtWidgetModel* model, QWidget * parent );
protected:
QtWidgetParameterFactory();
......
......@@ -43,7 +43,7 @@ class OTBQtWidget_EXPORT QtWidgetParameterGroup : public QtWidgetParameterBase
{
Q_OBJECT
public:
QtWidgetParameterGroup(ParameterGroup::Pointer, QtWidgetModel*);
QtWidgetParameterGroup(ParameterGroup::Pointer, QtWidgetModel*, QWidget*);
~QtWidgetParameterGroup() override;
public slots:
......
......@@ -40,7 +40,7 @@ class OTBQtWidget_EXPORT QtWidgetParameterLabel : public QWidget
{
Q_OBJECT
public:
QtWidgetParameterLabel(Parameter*);
QtWidgetParameterLabel(Parameter*, QWidget*);
~QtWidgetParameterLabel() override;
private:
......
......@@ -46,7 +46,7 @@ class OTBQtWidget_EXPORT QtWidgetParameterList : public QtWidgetParameterBase
//
// Public methods.
public:
QtWidgetParameterList( AbstractParameterList *, QtWidgetModel * );
QtWidgetParameterList( AbstractParameterList *, QtWidgetModel * , QWidget*);
~QtWidgetParameterList() override;
//
......
......@@ -42,7 +42,7 @@ class OTBQtWidget_EXPORT QtWidgetProgressReport : public QWidget
{
Q_OBJECT
public:
QtWidgetProgressReport(QtWidgetModel * model);
QtWidgetProgressReport(QtWidgetModel * model, QWidget * parent);
~QtWidgetProgressReport() override;
void SetApplication(Application::Pointer app);
......
......@@ -40,7 +40,7 @@ class OTBQtWidget_EXPORT QtWidgetRAMParameter : public QtWidgetParameterBase
{
Q_OBJECT
public:
QtWidgetRAMParameter(RAMParameter*, QtWidgetModel*);
QtWidgetRAMParameter(RAMParameter*, QtWidgetModel*, QWidget*);
~QtWidgetRAMParameter() override;
protected slots:
......
......@@ -42,7 +42,7 @@ class OTBQtWidget_EXPORT QtWidgetSimpleProgressReport : public QWidget
{
Q_OBJECT
public:
QtWidgetSimpleProgressReport(QtWidgetModel * model);
QtWidgetSimpleProgressReport(QtWidgetModel * model, QWidget * parent);
~QtWidgetSimpleProgressReport() override;
void SetApplication(Application::Pointer app);
......
......@@ -50,7 +50,7 @@ class OTBQtWidget_EXPORT QtWidgetStringListParameter :
//
// Public methods.
public:
QtWidgetStringListParameter( StringListParameter *, QtWidgetModel * );
QtWidgetStringListParameter( StringListParameter *, QtWidgetModel * , QWidget *);
~QtWidgetStringListParameter() override;
......
......@@ -39,7 +39,7 @@ class OTBQtWidget_EXPORT QtWidgetStringParameter : public QtWidgetParameterBase
{
Q_OBJECT
public:
QtWidgetStringParameter(StringParameter*, QtWidgetModel*);
QtWidgetStringParameter(StringParameter*, QtWidgetModel*, QWidget*);
~QtWidgetStringParameter() override;
protected slots:
......
......@@ -68,7 +68,7 @@ public:
/** \brief Constructor. */
QtWidgetView( const otb::Wrapper::Application::Pointer & otbApp,
QWidget* p =0,
QWidget* parent,
Qt::WindowFlags flags =0 );
/** \brief Destructor. */
......
......@@ -91,7 +91,7 @@ int main(int argc, char* argv[])
mainWindow->setWindowTitle(QString(app->GetDocName()).append(" - ").append(OTB_VERSION_STRING));
// Create GUI based on module
QtWidgetView* gui = new QtWidgetView(app);
QtWidgetView* gui = new QtWidgetView(app, mainWindow);
gui->CreateGui();
// Connect the View "Quit" signal, to the mainWindow close slot
......
......@@ -25,8 +25,8 @@ namespace otb
namespace Wrapper
{
QtWidgetBoolParameter::QtWidgetBoolParameter(BoolParameter* boolParam, QtWidgetModel* m)
: QtWidgetParameterBase(boolParam, m)
QtWidgetBoolParameter::QtWidgetBoolParameter(BoolParameter* boolParam, QtWidgetModel* m, QWidget * parent)
: QtWidgetParameterBase(boolParam, m, parent)
{
}
......@@ -64,11 +64,11 @@ void QtWidgetBoolParameter::DoUpdateGUI()
void QtWidgetBoolParameter::DoCreateWidget()
{
QHBoxLayout *hLayout = new QHBoxLayout;
QHBoxLayout *hLayout = new QHBoxLayout(this);
hLayout->setSpacing(0);
hLayout->setContentsMargins(0, 0, 0, 0);
m_Button = new QToolButton;
m_Button = new QToolButton(this);
m_Button->setCheckable(true);
BoolParameter* paramDown = dynamic_cast<BoolParameter*>(this->GetParam());
assert(paramDown && "Not a BoolParameter");
......
......@@ -29,8 +29,8 @@ namespace Wrapper
{
QtWidgetChoiceParameter::QtWidgetChoiceParameter( ChoiceParameter* param,
QtWidgetModel* m ) :
QtWidgetParameterBase(param, m),
QtWidgetModel* m , QWidget * parent) :
QtWidgetParameterBase(param, m, parent),
m_ChoiceParam(param),
m_ComboBox( nullptr ),
m_StackWidget( nullptr ),
......@@ -60,12 +60,12 @@ void QtWidgetChoiceParameter::DoUpdateGUI()
void QtWidgetChoiceParameter::DoCreateWidget()
{
m_ComboBox = new QComboBox;
m_ComboBox = new QComboBox(this);
m_ComboBox->setToolTip(
QString::fromStdString( m_ChoiceParam->GetDescription() )
);
m_StackWidget = new QStackedWidget;
m_StackWidget = new QStackedWidget(this);
for (unsigned int i = 0; i < m_ChoiceParam->GetNbChoices(); ++i)
{
......@@ -76,7 +76,7 @@ void QtWidgetChoiceParameter::DoCreateWidget()
if (param.IsNotNull())
{
QtWidgetParameterBase* widget =
QtWidgetParameterFactory::CreateQtWidget( param, GetModel() );
QtWidgetParameterFactory::CreateQtWidget( param, GetModel(), this);
m_StackWidget->addWidget(widget);
......@@ -88,7 +88,7 @@ void QtWidgetChoiceParameter::DoCreateWidget()
connect( m_ComboBox, SIGNAL(currentIndexChanged(int)), m_StackWidget, SLOT(setCurrentIndex(int)) );
connect( m_ComboBox, SIGNAL(currentIndexChanged(int)), GetModel(), SLOT(NotifyUpdate()) );
m_VLayout = new QVBoxLayout;
m_VLayout = new QVBoxLayout(this);
m_VLayout->addWidget(m_ComboBox);
if (!m_WidgetList.empty())
{
......
......@@ -27,8 +27,8 @@ namespace otb
namespace Wrapper
{
QtWidgetComplexInputImageParameter::QtWidgetComplexInputImageParameter(ComplexInputImageParameter* param, QtWidgetModel* m)
: QtWidgetParameterBase(param, m),
QtWidgetComplexInputImageParameter::QtWidgetComplexInputImageParameter(ComplexInputImageParameter* param, QtWidgetModel* m, QWidget * parent)
: QtWidgetParameterBase(param, m, parent),
m_ComplexInputImageParam(param)
{
}
......@@ -56,7 +56,7 @@ void QtWidgetComplexInputImageParameter::DoUpdateGUI()
void QtWidgetComplexInputImageParameter::DoCreateWidget()
{
// Set up input text edit
m_HLayout = new QHBoxLayout;
m_HLayout = new QHBoxLayout(this);
m_HLayout->setSpacing(0);
m_HLayout->setContentsMargins(0, 0, 0, 0);
m_Input = new QLineEdit;
......
......@@ -29,8 +29,8 @@ namespace otb
namespace Wrapper
{
QtWidgetComplexOutputImageParameter::QtWidgetComplexOutputImageParameter(ComplexOutputImageParameter* param, QtWidgetModel* m)
: QtWidgetParameterBase(param, m),
QtWidgetComplexOutputImageParameter::QtWidgetComplexOutputImageParameter(ComplexOutputImageParameter* param, QtWidgetModel* m, QWidget * parent)
: QtWidgetParameterBase(param, m, parent),
m_OutputImageParam(param)
{
}
......@@ -53,10 +53,10 @@ void QtWidgetComplexOutputImageParameter::DoUpdateGUI()
void QtWidgetComplexOutputImageParameter::DoCreateWidget()
{
// Set up input text edit
m_HLayout = new QHBoxLayout;
m_HLayout = new QHBoxLayout(this);
m_HLayout->setSpacing(0);
m_HLayout->setContentsMargins(0, 0, 0, 0);
m_Input = new QLineEdit;
m_Input = new QLineEdit(this);
m_Input->setToolTip(
QString::fromStdString( m_OutputImageParam->GetDescription() )
);
......@@ -65,7 +65,7 @@ void QtWidgetComplexOutputImageParameter::DoCreateWidget()
m_HLayout->addWidget(m_Input);
// Set the Output PixelType choice Combobox
m_ComboBox = new QComboBox;
m_ComboBox = new QComboBox(this);
m_ComboBox->setToolTip("Complex Output Pixel Type");
m_ComboBox->addItem( "cint16");
m_ComboBox->addItem( "cint32");
......@@ -77,7 +77,7 @@ void QtWidgetComplexOutputImageParameter::DoCreateWidget()
m_HLayout->addWidget(m_ComboBox);
// Set up input text edit
m_Button = new QPushButton;
m_Button = new QPushButton(this);
m_Button->setText("...");
m_Button->setToolTip("Select output filename...");
m_Button->setMaximumWidth(m_Button->width());
......
......@@ -27,8 +27,8 @@ namespace otb
namespace Wrapper
{
QtWidgetDirectoryParameter::QtWidgetDirectoryParameter(DirectoryParameter* param, QtWidgetModel* m)
: QtWidgetParameterBase(param, m),
QtWidgetDirectoryParameter::QtWidgetDirectoryParameter(DirectoryParameter* param, QtWidgetModel* m, QWidget * parent)
: QtWidgetParameterBase(param, m, parent),
m_DirectoryParam(param)
{
}
......@@ -52,10 +52,10 @@ void QtWidgetDirectoryParameter::DoUpdateGUI()
void QtWidgetDirectoryParameter::DoCreateWidget()
{
// Set up input text edit
m_HLayout = new QHBoxLayout;
m_HLayout = new QHBoxLayout(this);
m_HLayout->setSpacing(0);
m_HLayout->setContentsMargins(0, 0, 0, 0);
m_Input = new QLineEdit;
m_Input = new QLineEdit(this);
m_Input->setToolTip(
QString::fromStdString( m_DirectoryParam->GetDescription() )
);
......@@ -65,7 +65,7 @@ void QtWidgetDirectoryParameter::DoCreateWidget()
m_HLayout->addWidget(m_Input);
// Set up input text edit
m_Button = new QPushButton;
m_Button = new QPushButton(this);
m_Button->setText("...");
m_Button->setToolTip("Select d Directory...");
m_Button->setMaximumWidth(m_Button->width());
......
......@@ -25,8 +25,8 @@ namespace otb
namespace Wrapper
{
QtWidgetEmptyParameter::QtWidgetEmptyParameter(EmptyParameter* emptyParam, QtWidgetModel* m)
: QtWidgetParameterBase(emptyParam, m)
QtWidgetEmptyParameter::QtWidgetEmptyParameter(EmptyParameter* emptyParam, QtWidgetModel* m, QWidget * parent)
: QtWidgetParameterBase(emptyParam, m, parent)
{
}
......@@ -42,11 +42,11 @@ void QtWidgetEmptyParameter::DoUpdateGUI()
void QtWidgetEmptyParameter::DoCreateWidget()
{
// Set up input text edit
QHBoxLayout *hLayout = new QHBoxLayout;
QHBoxLayout *hLayout = new QHBoxLayout(this);
hLayout->setSpacing(0);
hLayout->setContentsMargins(0, 0, 0, 0);
//QCheckBox* checkbox = new QCheckBox;
//QCheckBox* checkbox = new QCheckBox(this);
//checkbox->setToolTip(emptyParam->GetDescription());
//QString optionID(emptyParam->GetName());
......
......@@ -27,8 +27,8 @@ namespace otb
namespace Wrapper
{
QtWidgetFloatParameter::QtWidgetFloatParameter(FloatParameter* floatParam, QtWidgetModel* m)
: QtWidgetParameterBase(floatParam, m),
QtWidgetFloatParameter::QtWidgetFloatParameter(FloatParameter* floatParam, QtWidgetModel* m, QWidget * parent)
: QtWidgetParameterBase(floatParam, m, parent),
m_FloatParam(floatParam)
{
}
......@@ -64,11 +64,11 @@ void QtWidgetFloatParameter::DoUpdateGUI()
void QtWidgetFloatParameter::DoCreateWidget()
{
m_QHBoxLayout = new QHBoxLayout;
m_QHBoxLayout = new QHBoxLayout(this);
m_QHBoxLayout->setSpacing(0);
m_QHBoxLayout->setContentsMargins(0, 0, 0, 0);
m_QDoubleSpinBox = new QtWidgetDoubleSpinBox;
m_QDoubleSpinBox = new QtWidgetDoubleSpinBox(this);
m_QDoubleSpinBox->setSingleStep(0.1);
m_QDoubleSpinBox->setDecimals(std::numeric_limits<float>::digits10); // max precision, this is 6 for IEEE float
m_QDoubleSpinBox->setRange(m_FloatParam->GetMinimumValue(), m_FloatParam->GetMaximumValue());
......
......@@ -31,8 +31,8 @@ namespace Wrapper
/*****************************************************************************/
QtWidgetInputFilenameListParameter
::QtWidgetInputFilenameListParameter( InputFilenameListParameter * param,
QtWidgetModel * m ) :
QtWidgetParameterList( param, m )
QtWidgetModel * m , QWidget * parent) :
QtWidgetParameterList( param, m , parent)
{
}
......
......@@ -28,8 +28,8 @@ namespace otb
namespace Wrapper
{
QtWidgetInputFilenameParameter::QtWidgetInputFilenameParameter(InputFilenameParameter* param, QtWidgetModel* m)
: QtWidgetParameterBase(param, m),
QtWidgetInputFilenameParameter::QtWidgetInputFilenameParameter(InputFilenameParameter* param, QtWidgetModel* m, QWidget * parent)
: QtWidgetParameterBase(param, m, parent),
m_FilenameParam(param),
m_HLayout( nullptr ),
m_Input( nullptr ),
......@@ -57,7 +57,7 @@ void QtWidgetInputFilenameParameter::DoUpdateGUI()
void QtWidgetInputFilenameParameter::DoCreateWidget()
{
// Set up input text edit
m_HLayout = new QHBoxLayout;
m_HLayout = new QHBoxLayout(this);
m_HLayout->setSpacing(0);
m_HLayout->setContentsMargins(0, 0, 0, 0);
m_Input = new QLineEdit;
......
......@@ -30,8 +30,8 @@ namespace Wrapper
/*****************************************************************************/
QtWidgetInputImageListParameter
::QtWidgetInputImageListParameter( InputImageListParameter * param,
QtWidgetModel * m ) :
QtWidgetParameterList( param, m )
QtWidgetModel * m , QWidget * parent) :
QtWidgetParameterList( param, m , parent)
{
}
......
......@@ -32,8 +32,8 @@ namespace otb
namespace Wrapper
{
QtWidgetInputImageParameter::QtWidgetInputImageParameter(InputImageParameter* param, QtWidgetModel* m)
: QtWidgetParameterBase(param, m),
QtWidgetInputImageParameter::QtWidgetInputImageParameter(InputImageParameter* param, QtWidgetModel* m, QWidget * parent)
: QtWidgetParameterBase(param, m, parent),
m_InputImageParam(param),
m_HLayout( nullptr ),
m_Input( nullptr ),
......@@ -64,10 +64,10 @@ void QtWidgetInputImageParameter::DoUpdateGUI()
void QtWidgetInputImageParameter::DoCreateWidget()
{
// Set up input text edit
m_HLayout = new QHBoxLayout;
m_HLayout = new QHBoxLayout(this);
m_HLayout->setSpacing(0);
m_HLayout->setContentsMargins(0, 0, 0, 0);
m_Input = new QLineEdit;
m_Input = new QLineEdit(this);
m_Input->setToolTip(
QString::fromStdString( m_InputImageParam->GetDescription() )
......@@ -79,7 +79,7 @@ void QtWidgetInputImageParameter::DoCreateWidget()
m_HLayout->addWidget(m_Input);
// Set up input text edit
m_Button = new QPushButton;
m_Button = new QPushButton(this);
m_Button->setText("...");
m_Button->setToolTip("Select file...");
m_Button->setMaximumWidth(m_Button->width());
......
......@@ -29,8 +29,8 @@ namespace otb
namespace Wrapper
{
QtWidgetInputProcessXMLParameter::QtWidgetInputProcessXMLParameter(InputProcessXMLParameter* param, QtWidgetModel* m)
: QtWidgetParameterBase(param, m),
QtWidgetInputProcessXMLParameter::QtWidgetInputProcessXMLParameter(InputProcessXMLParameter* param, QtWidgetModel* m, QWidget * parent)
: QtWidgetParameterBase(param, m, parent),
m_XMLParam(param)
{
}
......@@ -56,10 +56,10 @@ void QtWidgetInputProcessXMLParameter::DoUpdateGUI()
void QtWidgetInputProcessXMLParameter::DoCreateWidget()
{
// Set up input text edit
m_HLayout = new QHBoxLayout;
m_HLayout = new QHBoxLayout(this);
m_HLayout->setSpacing(0);
m_HLayout->setContentsMargins(0, 0, 0, 0);
m_Input = new QLineEdit;
m_Input = new QLineEdit(this);
m_Input->setToolTip(
QString::fromStdString( m_XMLParam->GetDescription() )
);
......@@ -69,7 +69,7 @@ void QtWidgetInputProcessXMLParameter::DoCreateWidget()
m_HLayout->addWidget(m_Input);
// Set up input text edit
m_Button = new QPushButton;
m_Button = new QPushButton(this);
m_Button->setText("...");
m_Button->setToolTip("Select file...");
m_Button->setMaximumWidth(m_Button->width());
......
......@@ -34,8 +34,8 @@ namespace Wrapper
/*****************************************************************************/
QtWidgetInputVectorDataListParameter
::QtWidgetInputVectorDataListParameter( InputVectorDataListParameter * param,
QtWidgetModel* m ) :
QtWidgetParameterList( param, m )
QtWidgetModel* m , QWidget * parent) :
QtWidgetParameterList( param, m , parent)
{
}
......