Commit ad5907a8 authored by Julien Michel's avatar Julien Michel

Merge branch 'develop' into 1649-WrapperParameter-move-bodies-to-src

parents 90737f2f 9558e454
......@@ -49,36 +49,17 @@ public:
QtStringSelectionWidget();
~QtStringSelectionWidget() override;
bool IsChecked()
{
return m_Checkbox->isChecked();
}
void SetChecked( bool val )
{
return m_Checkbox->setChecked( val );
}
inline const QString GetText() const
{
return m_Input->text();
}
inline void SetText( const QString& qString)
{
m_Input->setText(qString);
}
std::string ToStdString()
{
return m_Input->text().toLatin1().constData();
}
void ClearText()
{
m_Input->clear();
}
bool IsChecked() const;
void SetChecked( bool val );
const QString GetText() const;
void SetText( const QString& qString);
std::string ToStdString();
void ClearText();
protected slots:
void OnEditionFinished();
......
......@@ -43,8 +43,8 @@ public:
QtWidgetComplexInputImageParameter(ComplexInputImageParameter*, QtWidgetModel*, QWidget*);
~QtWidgetComplexInputImageParameter() override;
inline const QLineEdit* GetInput() const;
inline QLineEdit* GetInput();
const QLineEdit* GetInput() const;
QLineEdit* GetInput();
protected slots:
bool SetFileName( const QString& value );
......@@ -66,22 +66,6 @@ private:
QPushButton * m_Button;
};
inline
const QLineEdit*
QtWidgetComplexInputImageParameter
::GetInput() const
{
return m_Input;
}
inline
QLineEdit*
QtWidgetComplexInputImageParameter
::GetInput()
{
return m_Input;
}
}
}
......
......@@ -43,8 +43,8 @@ public:
QtWidgetComplexOutputImageParameter(ComplexOutputImageParameter*, QtWidgetModel*, QWidget*);
~QtWidgetComplexOutputImageParameter() override;
inline const QLineEdit* GetInput() const;
inline QLineEdit* GetInput();
const QLineEdit* GetInput() const;
QLineEdit* GetInput();
/** Get the PixelType*/
//itkGetMacro(PixelType, int);
......@@ -75,22 +75,6 @@ private:
};
inline
const QLineEdit*
QtWidgetComplexOutputImageParameter
::GetInput() const
{
return m_Input;
}
inline
QLineEdit*
QtWidgetComplexOutputImageParameter
::GetInput()
{
return m_Input;
}
}
}
......
......@@ -43,8 +43,8 @@ public:
QtWidgetInputFilenameParameter(InputFilenameParameter*, QtWidgetModel*, QWidget*);
~QtWidgetInputFilenameParameter() override;
inline const QLineEdit* GetInput() const;
inline QLineEdit* GetInput();
const QLineEdit* GetInput() const;
QLineEdit* GetInput();
protected slots:
void SetFileName( const QString& value );
......@@ -66,23 +66,6 @@ private:
QPushButton * m_Button;
};
inline
const QLineEdit*
QtWidgetInputFilenameParameter
::GetInput() const
{
return m_Input;
}
inline
QLineEdit*
QtWidgetInputFilenameParameter
::GetInput()
{
return m_Input;
}
} // Wrapper
} // otb
......
......@@ -43,8 +43,8 @@ public:
QtWidgetInputImageParameter(InputImageParameter*, QtWidgetModel*, QWidget*);
~QtWidgetInputImageParameter() override;
inline const QLineEdit* GetInput() const;
inline QLineEdit* GetInput();
const QLineEdit* GetInput() const;
QLineEdit* GetInput();
signals:
void FileNameIsSet();
......@@ -72,21 +72,6 @@ private:
QPushButton * m_Button;
};
inline
const QLineEdit*
QtWidgetInputImageParameter
::GetInput() const
{
return m_Input;
}
inline
QLineEdit*
QtWidgetInputImageParameter
::GetInput()
{
return m_Input;
}
} // Wrapper
......
......@@ -43,8 +43,8 @@ public:
QtWidgetInputProcessXMLParameter(InputProcessXMLParameter*, QtWidgetModel*, QWidget*);
~QtWidgetInputProcessXMLParameter() override;
inline const QLineEdit* GetInput() const;
inline QLineEdit* GetInput();
const QLineEdit* GetInput() const;
QLineEdit* GetInput();
protected slots:
void SetFileName( const QString& value );
......@@ -67,22 +67,6 @@ private:
};
inline
const QLineEdit*
QtWidgetInputProcessXMLParameter
::GetInput() const
{
return m_Input;
}
inline
QLineEdit*
QtWidgetInputProcessXMLParameter
::GetInput()
{
return m_Input;
}
}
}
......
......@@ -43,8 +43,8 @@ public:
QtWidgetInputVectorDataParameter(InputVectorDataParameter*, QtWidgetModel*, QWidget*);
~QtWidgetInputVectorDataParameter() override;
inline const QLineEdit* GetInput() const;
inline QLineEdit* GetInput();
const QLineEdit* GetInput() const;
QLineEdit* GetInput();
protected slots:
bool SetFileName( const QString& value );
......@@ -67,22 +67,6 @@ private:
};
inline
const QLineEdit*
QtWidgetInputVectorDataParameter
::GetInput() const
{
return m_Input;
}
inline
QLineEdit*
QtWidgetInputVectorDataParameter
::GetInput()
{
return m_Input;
}
} // Wrapper
} // otb
......
......@@ -21,58 +21,19 @@
#ifndef otbListEditItemModel_h
#define otbListEditItemModel_h
//
// Configuration include.
//// Included at first position before any other ones.
#include "otbMacro.h"
#include "OTBQtWidgetExport.h"
/*****************************************************************************/
/* INCLUDE SECTION */
//
// Qt includes (sorted by alphabetic order)
//// Must be included before system/custom includes.
#include <QtCore>
//
// System includes (sorted by alphabetic order)
//
// ITK includes (sorted by alphabetic order)
//
// OTB includes (sorted by alphabetic order)
//
// Monteverdi includes (sorted by alphabetic order)
/*****************************************************************************/
/* PRE-DECLARATION SECTION */
//
// External classes pre-declaration.
namespace
{
}
namespace otb
{
namespace Wrapper
{
//
// Internal classes pre-declaration.
// Internal classes forward declarations
class StringListInterface;
/*****************************************************************************/
/* CLASS DEFINITION SECTION */
/**
* \class ListEditItemModel
*
......@@ -84,14 +45,9 @@ class OTBQtWidget_EXPORT ListEditItemModel :
public QAbstractItemModel
{
/*-[ QOBJECT SECTION ]-----------------------------------------------------*/
Q_OBJECT;
/*-[ PUBLIC SECTION ]------------------------------------------------------*/
//
// Public types.
// Public types
public:
enum Columns
......@@ -111,8 +67,7 @@ public:
USER_ROLE_FILTER,
};
//
// Public methods.
// Public methods
public:
/** \brief Constructor. */
......@@ -122,7 +77,6 @@ public:
/** \brief Destructor. */
~ListEditItemModel() override;
//
// QAbstractItemModel overloads.
/**
......@@ -202,85 +156,22 @@ public:
const QVariant & value,
int role = Qt::EditRole ) override;
/** */
virtual bool Swap( int, int );
/** */
virtual bool IsInput() const;
/** */
virtual QString GetFilter() const;
/** */
virtual bool IsBrowsable() const;
/*-[ PUBLIC SLOTS SECTION ]------------------------------------------------*/
//
// Public SLOTS.
public slots:
/*-[ SIGNALS SECTION ]-----------------------------------------------------*/
//
// Signals.
signals:
/*-[ PROTECTED SECTION ]---------------------------------------------------*/
//
// Protected methods.
protected:
//
// Protected attributes.
protected:
/*-[ PRIVATE SECTION ]-----------------------------------------------------*/
//
// Private methods.
// Private attributes
private:
//
// Private attributes.
private:
/** */
StringListInterface * m_StringList;
/*-[ PRIVATE SLOTS SECTION ]-----------------------------------------------*/
//
// Slots.
private slots:
};
} // end namespace 'Wrapper'.
} // end namespace 'otb'.
/*****************************************************************************/
/* INLINE SECTION */
//
// Qt includes (sorted by alphabetic order)
//// Must be included before system/custom includes.
//
// System includes (sorted by alphabetic order)
//
// ITK includes (sorted by alphabetic order)
//
// OTB includes (sorted by alphabetic order)
//
// Monteverdi includes (sorted by alphabetic order)
namespace otb
{
} // end namespace 'otb'
#endif // otbListEditItemModel_h
......@@ -21,48 +21,17 @@
#ifndef otbWrapperQtWidgetListEditWidget_h
#define otbWrapperQtWidgetListEditWidget_h
//
// Configuration include.
//// Included at first position before any other ones.
#include "otbConfigure.h"
/*****************************************************************************/
/* INCLUDE SECTION */
//
// Qt includes (sorted by alphabetic order)
//// Must be included before system/custom includes.
#include <QtWidgets>
//
// System includes (sorted by alphabetic order)
//
// ITK includes (sorted by alphabetic order)
//
// OTB includes (sorted by alphabetic order)
#include "OTBQtWidgetExport.h"
/*****************************************************************************/
/* PRE-DECLARATION SECTION */
//
// External classes pre-declaration.
namespace
{
}
namespace otb
{
namespace Wrapper
{
//
// Internal classes pre-declaration.
// Internal classes forward declarations
class ListEditItemModel;
class StringListInterface;
......@@ -71,10 +40,6 @@ namespace Ui
class ListEditWidget;
};
/*****************************************************************************/
/* CLASS DEFINITION SECTION */
/**
* \class ListEditWidget
*
......@@ -86,14 +51,8 @@ class OTBQtWidget_EXPORT ListEditWidget :
public QWidget
{
/*-[ QOBJECT SECTION ]-----------------------------------------------------*/
Q_OBJECT;
/*-[ PUBLIC SECTION ]------------------------------------------------------*/
//
// Public methods.
public:
/** \brief Constructor. */
......@@ -104,52 +63,18 @@ public:
/** \brief Destructor. */
virtual ~ListEditWidget();
/**
*/
const ListEditItemModel * GetItemModel() const;
/**
*/
ListEditItemModel * GetItemModel();
#if 0
/** */
void SetBrowseEnabled( bool );
/** */
bool IsBrowseEnabled() const;
#endif
/*-[ PUBLIC SLOTS SECTION ]------------------------------------------------*/
//
// Public SLOTS.
public slots:
void OnFilenameDropped(const QString &);
/*-[ SIGNALS SECTION ]-----------------------------------------------------*/
//
// Signals.
signals:
/** */
void Updated();
void ValueChanged();
/*-[ PROTECTED SECTION ]---------------------------------------------------*/
//
// Protected methods.
protected:
/*-[ PRIVATE SECTION ]-----------------------------------------------------*/
//
// Protected attributes.
protected:
//
// Private types.
private:
enum SwapSelection
{
......@@ -158,8 +83,6 @@ private:
RIGHT = +1,
};
//
// Private methods.
private:
void Swap( int, int, SwapSelection = NONE );
......@@ -167,18 +90,12 @@ private:
QString browseFilename( const QModelIndex & );
//
// Private attributes.
private:
/**
* \brief uic generated.
*/
Ui::ListEditWidget * m_UI;
/*-[ PRIVATE SLOTS SECTION ]-----------------------------------------------*/
//
// Slots.
private slots:
void on_addButton_clicked();
void on_browseButton_clicked();
......@@ -198,11 +115,4 @@ private slots:
} // end namespace 'otb'
/*****************************************************************************/
/* INLINE SECTION */
namespace Wrapper
{
} // end namespace 'Wrapper'
#endif // otbWrappersQtWidgetListEditWidget_h
......@@ -37,14 +37,14 @@ class OTBQtWidget_EXPORT AppliThread : public QThread
Q_OBJECT
public:
inline AppliThread(Application* app)
AppliThread(Application* app)
{
m_Application = app;
}
~AppliThread() override;
inline void Execute()
void Execute()
{
// Call the signal start to begin running the program
start();
......@@ -146,16 +146,6 @@ signals:
void Stop();
protected slots:
/**
* \brief Slot called when execution is requested (e.g. by
* otb::Wrapper::QtWidgetView).
*
* This slot is protected so it can only be called via Qt
* signal/slot mechanism and not directly by extern caller.
*/
void ExecuteAndWriteOutputSlot();
public slots:
/**
* \brief Slots called every time one of the widget needs to be
......@@ -164,6 +154,12 @@ public slots:
*/
void NotifyUpdate();
/**
* \brief Slot called when execution is requested (e.g. by
* otb::Wrapper::QtWidgetView).
*/
void ExecuteAndWriteOutputSlot();
private slots:
/**
* \brief
......
......@@ -43,8 +43,8 @@ public:
QtWidgetOutputFilenameParameter(OutputFilenameParameter*, QtWidgetModel*, QWidget*);
~QtWidgetOutputFilenameParameter() override;
inline const QLineEdit* GetInput() const;
inline QLineEdit* GetInput();
const QLineEdit* GetInput() const;
QLineEdit* GetInput();
public slots:
void SetFileName( const QString& value );
......@@ -68,24 +68,6 @@ private:
QPushButton * m_Button;
};
inline
const QLineEdit*
QtWidgetOutputFilenameParameter
::GetInput() const
{
return m_Input;
}
inline
QLineEdit*
QtWidgetOutputFilenameParameter
::GetInput()
{
return m_Input;
}
}
}
......
......@@ -43,8 +43,8 @@ public:
QtWidgetOutputImageParameter(OutputImageParameter*, QtWidgetModel*, QWidget*);
~QtWidgetOutputImageParameter() override;
inline const QLineEdit* GetInput() const;
inline QLineEdit* GetInput();
const QLineEdit* GetInput() const;
QLineEdit* GetInput();
/** Get the PixelType*/
//itkGetMacro(PixelType, int);
......@@ -76,22 +76,6 @@ private:
};