Commit 8a50d511 authored by Victor Poughon's avatar Victor Poughon

REFAC: clean inline functions in WrapperQtWidgetView

parent 25cb7aeb
......@@ -63,22 +63,9 @@ public:
void CreateGui();
/** \brief Model Accessor */
inline otb::Wrapper::QtWidgetModel* GetModel()
{
return m_Model;
}
/**
* \return The OTB-application pointer of this view.
*/
//~ otb::Wrapper::Application::ConstPointer GetApplication() const
//~ {
//~ return otb::ConstCast< otb::Wrapper::Application >(
//~ m_Application
//~ );
//~ }
inline bool IsClosable() const;
QtWidgetModel* GetModel() const;
bool IsClosable() const;
public slots:
......@@ -91,7 +78,7 @@ signals:
protected:
bool IsRunning();
bool IsRunning() const;
virtual QWidget* CreateInputWidgets();
......@@ -122,7 +109,6 @@ private:
QWidget* CreateDoc();
// Private attributes.
private:
......@@ -136,24 +122,15 @@ private:
QTabWidget *m_TabWidget;
bool m_IsClosable : 1;
bool m_IsRunning;
private slots:
void UpdateMessageAfterExecution(int status);
void UpdateMessageAfterApplicationReady(bool val);
/**
*/
inline void OnProgressReportBegin();
/**
*/
inline void OnProgressReportEnd( int status );
/**
*/
inline void SetClosable( bool );
void OnProgressReportBegin();
void OnProgressReportEnd( int status );
void SetClosable( bool );
};
......@@ -161,58 +138,4 @@ private slots:
} // end namespace 'otb'
/*****************************************************************************/
/* INLINE SECTION */
namespace otb
{
namespace Wrapper
{
/*****************************************************************************/
inline
bool
QtWidgetView
::IsClosable() const
{
return m_IsClosable;
}
/*****************************************************************************/
inline
void
QtWidgetView
::SetClosable( bool enabled )
{
m_IsClosable = enabled;
setEnabled( true );
if( m_QuitButton!=NULL )
m_QuitButton->setEnabled( m_IsClosable );
}
/*******************************************************************************/
inline
void
QtWidgetView
::OnProgressReportBegin()
{
SetClosable( false );
}
/*******************************************************************************/
inline
void
QtWidgetView
::OnProgressReportEnd( int )
{
SetClosable( true );
}
} // end namespace 'Wrapper'
} // end namespace 'otb'
#endif
......@@ -285,11 +285,41 @@ void QtWidgetView::OnExceptionRaised( QString /*message*/)
m_TabWidget->setCurrentIndex(1);
}
bool QtWidgetView::IsRunning()
bool QtWidgetView::IsRunning() const
{
return m_IsRunning;
}
QtWidgetModel* QtWidgetView::GetModel() const
{
return m_Model;
}
bool QtWidgetView::IsClosable() const
{
return m_IsClosable;
}
void QtWidgetView::SetClosable( bool enabled )
{
m_IsClosable = enabled;
setEnabled( true );
if( m_QuitButton!=NULL )
m_QuitButton->setEnabled( m_IsClosable );
}
void QtWidgetView::OnProgressReportBegin()
{
SetClosable( false );
}
void QtWidgetView::OnProgressReportEnd( int )
{
SetClosable( true );
}
} // end of namespace Wrapper
} // end of namespace otb
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