Skip to content
Snippets Groups Projects
Commit cde2605b authored by Stéphane Albert's avatar Stéphane Albert
Browse files

ENH: Trivial implementation of ImageSettingsInterface

parent 64d59f17
No related branches found
No related tags found
No related merge requests found
......@@ -57,7 +57,6 @@ set( Common_Core_HEADERS_MOC
mvdImageImporter.h
mvdImagePlacenameLoader.h
# mvdImageProperties.h
mvdImageSettings.h
mvdImageSettingsInterface.h
# mvdMath.h
#mvdMyClass.h
......
......@@ -66,8 +66,7 @@ namespace
/*******************************************************************************/
ImageSettings
::ImageSettings( QObject* parent ) :
QObject( parent )
::ImageSettings()
{
}
......
......@@ -69,14 +69,9 @@ namespace mvd
*
* \brief WIP.
*/
class Monteverdi2_EXPORT ImageSettings :
public QObject
class Monteverdi2_EXPORT ImageSettings
{
/*-[ QOBJECT SECTION ]-----------------------------------------------------*/
Q_OBJECT;
/*-[ PUBLIC SECTION ]------------------------------------------------------*/
//
......@@ -84,23 +79,11 @@ class Monteverdi2_EXPORT ImageSettings :
public:
/** \brief Constructor. */
ImageSettings( QObject* parent =NULL );
ImageSettings();
/** \brief Destructor. */
virtual ~ImageSettings();
/*-[ PUBLIC SLOTS SECTION ]------------------------------------------------*/
//
// Public SLOTS.
// public slots:
/*-[ SIGNALS SECTION ]-----------------------------------------------------*/
//
// Signals.
signals:
/*-[ PROTECTED SECTION ]---------------------------------------------------*/
//
......@@ -121,12 +104,6 @@ private:
//
// Private attributes.
private:
/*-[ PRIVATE SLOTS SECTION ]-----------------------------------------------*/
//
// Slots.
private slots:
};
} // end namespace 'mvd'.
......
......@@ -37,6 +37,8 @@
//
// Monteverdi includes (sorted by alphabetic order)
#include "Core/mvdImageSettings.h"
namespace mvd
{
......@@ -66,8 +68,9 @@ namespace
/*******************************************************************************/
ImageSettingsInterface
::ImageSettingsInterface( QObject* parent ) :
QObject( parent )
::ImageSettingsInterface( ImageSettings * settings, QObject* parent ) :
QObject( parent ),
m_Settings( settings )
{
}
......@@ -75,6 +78,17 @@ ImageSettingsInterface
ImageSettingsInterface
::~ImageSettingsInterface()
{
delete m_Settings;
m_Settings = NULL;
}
/*******************************************************************************/
void
ImageSettingsInterface
::SetSettings( ImageSettings * settings )
{
delete m_Settings;
m_Settings = settings;
}
/*******************************************************************************/
......
......@@ -59,7 +59,7 @@ namespace mvd
{
//
// Internal classes pre-declaration.
class ImageSettings;
/*****************************************************************************/
/* CLASS DEFINITION SECTION */
......@@ -83,12 +83,24 @@ class Monteverdi2_EXPORT ImageSettingsInterface :
// Public methods.
public:
/** \brief Constructor. */
ImageSettingsInterface( QObject* parent =NULL );
/** \brief Destructor. */
virtual ~ImageSettingsInterface();
/** */
inline
const ImageSettings * GetSettings() const;
/** */
inline
ImageSettings * GetSettings();
/** */
#if 0
inline
template< typename T >
const T * GetSettings() const;
#endif
/*-[ PUBLIC SLOTS SECTION ]------------------------------------------------*/
//
......@@ -107,6 +119,9 @@ signals:
// Protected methods.
protected:
/** \brief Constructor. */
ImageSettingsInterface( ImageSettings *, QObject * parent =NULL );
//
// Protected attributes.
protected:
......@@ -116,12 +131,17 @@ protected:
//
// Private methods.
private:
/** */
void SetSettings( ImageSettings * );
//
// Private attributes.
private:
/** */
ImageSettings * m_Settings;
/*-[ PRIVATE SLOTS SECTION ]-----------------------------------------------*/
//
......@@ -152,6 +172,39 @@ private slots:
namespace mvd
{
/*****************************************************************************/
inline
const ImageSettings *
ImageSettingsInterface
::GetSettings() const
{
return m_Settings;
}
/*****************************************************************************/
inline
ImageSettings *
ImageSettingsInterface
::GetSettings()
{
return m_Settings;
}
/*****************************************************************************/
#if 0
template< typename T >
inline
const ImageSettings *
ImageSettingsInterface
::GetSettings() const
{
return dynamic_cast< T >( m_Settings );
}
#endif
} // end namespace 'mvd'
#endif // __mvdImageSettingsInterface_h
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment