Commit d378a4bd authored by Stéphane Albert's avatar Stéphane Albert
Browse files

MRG: Merged from origin/rfc-51-mvd_modules

parents 6fb98e4d 39f7da30
......@@ -94,6 +94,17 @@ set(OTB_VERSION_MINOR "7")
set(OTB_VERSION_PATCH "0")
set(OTB_VERSION_STRING "${OTB_VERSION_MAJOR}.${OTB_VERSION_MINOR}.${OTB_VERSION_PATCH}")
# Monteverdi version number (follows OTB)
set( Monteverdi_VERSION_MAJOR ${OTB_VERSION_MAJOR} )
set( Monteverdi_VERSION_MINOR ${OTB_VERSION_MINOR} )
set( Monteverdi_VERSION_PATCH ${OTB_VERSION_PATCH} )
set( Monteverdi_VERSION_SUFFIX "" )
set( Monteverdi_VERSION_STRING
"${Monteverdi_VERSION_MAJOR}.${Monteverdi_VERSION_MINOR}.${Monteverdi_VERSION_PATCH}${Monteverdi_VERSION_SUFFIX}"
)
#-----------------------------------------------------------------------------
string(TIMESTAMP OTB_BUILD_TIMESTAMP)
if(NOT OTB_INSTALL_RUNTIME_DIR)
......
#include "winver.h"
IDI_ICON1 ICON DISCARDABLE "@Mapla_WIN32_ICON@"
IDI_ICON1 ICON DISCARDABLE "@Mapla_App_WIN32_ICON@"
VS_VERSION_INFO VERSIONINFO
FILEVERSION @Monteverdi_VERSION_MAJOR@,@Monteverdi_VERSION_MINOR@,@Monteverdi_VERSION_PATCH@,0
......
......@@ -51,7 +51,7 @@ otb_module_target( OTBMonteverdi )
if (WIN32)
# Windows Resource file need to have the full path to icon
# if the .ico is not in the current dir
set( Monteverdi_App_WIN32_ICON ${Monteverdi_SOURCE_DIR}/Data/Icons/monteverdi.ico)
set( Monteverdi_App_WIN32_ICON ${OTB_SOURCE_DIR}/Utilities/Data/Icons/monteverdi.ico)
configure_file(
mvdWin32.rc.in
mvdWin32.rc
......
......@@ -32,7 +32,7 @@
#include <QPixmap>
#include <QSplashScreen>
#define USE_SPLASH_SCREEN 0
#define USE_SPLASH_SCREEN ( ( !defined( OTB_DEBUG ) && 0 ) || 0 )
//
// System includes (sorted by alphabetic order)
......@@ -72,7 +72,7 @@ main( int argc, char* argv[] )
//
// 0. Splash-screen.
#if !defined( OTB_DEBUG ) && USE_SPLASH_SCREEN
#if USE_SPLASH_SCREEN
QPixmap pixmap(QLatin1String( ":/images/application_splash" ));
QSplashScreen splash(pixmap);
splash.show();
......@@ -155,21 +155,12 @@ main( int argc, char* argv[] )
//
// 3. Show window.
#if defined( OTB_DEBUG )
// Usefull when developping/debugging to avoid overlapping other windows.
mainWindow.show();
#else // OTB_DEBUG
#if USE_SPLASH_SCREEN
splash.finish( &mainWindow );
#endif // USE_SPLASH_SCREEN
// TODO: Correctly manage main-window state via application settings.
mainWindow.showMaximized();
#endif // OTB_DEBUG
//
// 4. Check OpenGL capabilities
if( !mainWindow.CheckGLCapabilities() )
......
......@@ -795,8 +795,7 @@ MainWindow
< HistogramWidget, HistogramController, QDockWidget >
( "HISTOGRAM",
tr( "Histogram" ),
Qt::RightDockWidgetArea,
false
Qt::RightDockWidgetArea
);
tabifyDockWidget( m_QuicklookViewDock, m_HistogramDock );
......@@ -835,7 +834,8 @@ MainWindow
< ColorDynamicsWidget, ColorDynamicsController, QDockWidget >
( "COLOR_DYNAMICS",
tr( "Color dynamics" ),
Qt::RightDockWidgetArea
Qt::RightDockWidgetArea,
I18nMainWindow::DOCK_LAYOUT_SCROLLABLE
);
// Tabify dock-widgets.
......@@ -1189,19 +1189,19 @@ MainWindow
stackedLayerModel->SetCurrent( imageModel );
bool hasReference = stackedLayerModel->HasReference();
if( !hasReference && srt!=SRT_UNKNOWN )
stackedLayerModel->SetReference( imageModel );
if( gcs==0 )
{
if( unk==0 )
{
if( srt!=SRT_UNKNOWN )
stackedLayerModel->SetReference( imageModel );
else if( hasReference && srt==SRT_UNKNOWN )
UserZoomExtent();
}
}
else if( unk==0 && srt==SRT_UNKNOWN )
stackedLayerModel->SetReference( StackedLayerModel::NIL_INDEX );
//
// Set zoom-level which forces image-views refresh.
if( !hasReference )
UserZoomExtent();
//
// Re-activate rendering of image-views.
m_ImageView->SetBypassRenderingEnabled( bypassImageView );
......@@ -1558,7 +1558,7 @@ MainWindow
( "APPLICATIONS_BROWSER",
tr( "OTB-Applications browser" ),
Qt::RightDockWidgetArea,
true
I18nMainWindow::DOCK_LAYOUT_FLOATING
);
tabifyDockWidget( m_HistogramDock, m_OtbApplicationsBrowserDock );
......@@ -2039,7 +2039,7 @@ MainWindow
void
MainWindow
::OnApplicationToLaunchSelected( const QString & appName,
const QString & docName )
const QString & /**docName*/ )
{
assert( Application::ConstInstance()!=NULL );
assert( Application::ConstInstance()->GetOTBApplicationsModel()!=NULL );
......
......@@ -2,14 +2,6 @@
project( OTBMonteverdiCore )
#############################################################################
set( Monteverdi_VERSION_MAJOR "3" )
set( Monteverdi_VERSION_MINOR "5" )
set( Monteverdi_VERSION_PATCH "0" )
set( Monteverdi_VERSION_SUFFIX "" )
set( Monteverdi_VERSION_STRING
"${Monteverdi_VERSION_MAJOR}.${Monteverdi_VERSION_MINOR}.${Monteverdi_VERSION_PATCH}${Monteverdi_VERSION_SUFFIX}"
)
set( Monteverdi_FLOATING_TYPE
"float"
......
......@@ -97,6 +97,7 @@ public:
/**
* \class BuildContext
* \brief WIP.
* \ingroup OTBMonteverdiCore
*/
class BuildContext
{
......
......@@ -125,6 +125,7 @@ public:
/**
* \class BuildContext
* \brief WIP.
* \ingroup OTBMonteverdiCore
*/
class BuildContext
{
......
......@@ -247,7 +247,7 @@ StackedLayerModel
//
// Remember new current index.
SizeType current =
index>=m_Current
index>m_Current
? m_Current
: ( m_Current>0
? m_Current - 1
......@@ -281,9 +281,11 @@ StackedLayerModel
// Update reference pointer.
if( emitReferenceChanged )
SetReference(
index>=m_Reference
index>m_Reference
? m_Reference
: m_Reference - 1,
: ( m_Reference > 0
? m_Reference - 1
: StackedLayerModel::NIL_INDEX ),
true
);
......
......@@ -59,7 +59,7 @@ class AboutDialog;
/** \class AboutDialog
*
* \ingroup OTBMonteverdiGui
* \ingroup OTBMonteverdiGUI
*
*/
class ITK_EXPORT AboutDialog :
......
......@@ -68,7 +68,7 @@ namespace mvd
/**
* \class AbstractDragAndDropEventFilter
*
* \ingroup OTBMonteverdiGui
* \ingroup OTBMonteverdiGUI
*
* \brief Widget template skeleton to copy-paste when adding a new
* widget class.
......
......@@ -69,7 +69,7 @@ namespace mvd
/** \class AbstractImageViewManipulator
*
* \ingroup OTBMonteverdiGui
* \ingroup OTBMonteverdiGUI
*
* \brief Base class for QWidget manipulation
*/
......@@ -189,6 +189,10 @@ public:
*/
virtual void ResizeEvent( QResizeEvent* event ) =0;
/**
*/
virtual void ResetViewport() =0;
//
// Public SLOTS.
public slots:
......
......@@ -70,7 +70,7 @@ class StackedLayerModel;
/**
* \class AbstractImageViewRenderer
*
* \ingroup OTBMonteverdiGui
* \ingroup OTBMonteverdiGUI
*
* \brief TODO.
*/
......@@ -223,6 +223,9 @@ public:
/**
*/
inline bool IsGLSLEnabled() const;
/**
*/
virtual bool IsEffectsEnabled() const = 0;
/**
*/
inline bool ZoomToRegion( const PointType & origin,
......
......@@ -67,7 +67,7 @@ class AbstractModel;
/**
* \class AbstractModelController
*
* \ingroup OTBMonteverdiGui
* \ingroup OTBMonteverdiGUI
*/
class ITK_EXPORT AbstractModelController :
public QObject
......
......@@ -72,7 +72,7 @@ class QtWidgetView;
/**
* \class ApplicationLauncher
*
* \ingroup OTBMonteverdiGui
* \ingroup OTBMonteverdiGUI
*
* \brief WIP.
*/
......
......@@ -74,7 +74,7 @@ class ApplicationsToolBox;
/**
* \class ApplicationsToolBox
*
* \ingroup OTBMonteverdiGui
* \ingroup OTBMonteverdiGUI
*
* \brief Widget template skeleton to copy-paste when adding a new
* widget class.
......
......@@ -72,7 +72,7 @@ class ApplicationsToolBox;
/**
* \class ApplicationsToolBoxController
*
* \ingroup OTBMonteverdiGui
* \ingroup OTBMonteverdiGUI
*
* \brief Color-setup widget controller for VectorImageModel objects.
*/
......
......@@ -73,7 +73,7 @@ class ColorBandDynamicsWidget;
/**
* \class ColorBandDynamicsWidget
*
* \ingroup OTBMonteverdiGui
* \ingroup OTBMonteverdiGUI
*/
class ITK_EXPORT ColorBandDynamicsWidget :
public QWidget
......
......@@ -69,7 +69,7 @@ class ColorDynamicsWidget;
/**
* \class ColorDynamicsController
*
* \ingroup OTBMonteverdiGui
* \ingroup OTBMonteverdiGUI
*
* \brief Color-dynamics widget controller for VectorImageModel objects.
*/
......
......@@ -72,7 +72,7 @@ class ColorDynamicsWidget;
/**
* \class ColorDynamicsWidget
*
* \ingroup OTBMonteverdiGui
* \ingroup OTBMonteverdiGUI
*/
class ITK_EXPORT ColorDynamicsWidget :
public QWidget
......
......@@ -69,7 +69,7 @@ class ColorSetupWidget;
/**
* \class ColorSetupController
*
* \ingroup OTBMonteverdiGui
* \ingroup OTBMonteverdiGUI
*
* \brief Color-setup widget controller for VectorImageModel objects.
*/
......
......@@ -60,7 +60,7 @@ class ColorSetupWidget;
/**
* \class ColorSetupWidget
*
* \ingroup OTBMonteverdiGui
* \ingroup OTBMonteverdiGUI
*/
class ITK_EXPORT ColorSetupWidget :
public QWidget
......
......@@ -67,7 +67,7 @@ namespace mvd
/**
* \class DoubleValidator
*
* \ingroup OTBMonteverdiGui
* \ingroup OTBMonteverdiGUI
*
* \brief WIP.
*/
......
......@@ -72,7 +72,7 @@ namespace Ui
/**
* \class DropLineEdit
*
* \ingroup OTBMonteverdiGui
* \ingroup OTBMonteverdiGUI
*
* \brief Widget template skeleton to copy-paste when adding a new
* widget class.
......
......@@ -68,7 +68,7 @@ namespace mvd
/**
* \class FilenameDragAndDropEventFilter
*
* \ingroup OTBMonteverdiGui
* \ingroup OTBMonteverdiGUI
*
* \brief Widget template skeleton to copy-paste when adding a new
* widget class.
......
......@@ -69,7 +69,7 @@ class HistogramWidget;
/**
* \class HistogramController
*
* \ingroup OTBMonteverdiGui
* \ingroup OTBMonteverdiGUI
*
* \brief Color-setup widget controller for VectorImageModel objects.
*/
......
......@@ -76,7 +76,7 @@ namespace mvd
/**
* \class HistogramPlotPicker
*
* \ingroup OTBMonteverdiGui
* \ingroup OTBMonteverdiGUI
*
* \brief Widget template skeleton to copy-paste when adding a new
* widget class.
......
......@@ -87,7 +87,7 @@ class HistogramWidget;
/**
* \class HistogramWidget
*
* \ingroup OTBMonteverdiGui
* \ingroup OTBMonteverdiGUI
*
* \brief Widget template skeleton to copy-paste when adding a new
* widget class.
......
......@@ -69,7 +69,7 @@ namespace mvd
/** \class I18nApplication
*
* \ingroup OTBMonteverdiGui
* \ingroup OTBMonteverdiGUI
*
* \brief The MVD2 application (which is different from
* QApplication).
......
......@@ -72,7 +72,7 @@ class VectorImageModel;
/**
* \class I18nMainWindow
*
* \ingroup OTBMonteverdiGui
* \ingroup OTBMonteverdiGUI
*
* \brief Main-window widget base for the i18n application.
*/
......@@ -89,6 +89,14 @@ class ITK_EXPORT I18nMainWindow
//
// Public types.
public:
enum DockLayout
{
DOCK_LAYOUT_NONE = 0,
DOCK_LAYOUT_FLOATING = 1,
DOCK_LAYOUT_SCROLLABLE = 2,
};
typedef QFlags< DockLayout > DockLayoutFlags;
//
// Public methods.
......@@ -227,7 +235,7 @@ protected:
const QString& dockName,
const QString& dockTitle,
Qt::DockWidgetArea dockArea,
bool isFloating =false );
DockLayoutFlags flags = DOCK_LAYOUT_NONE );
/**
*/
......@@ -237,7 +245,7 @@ protected:
AddDockWidget( const QString& dockName,
const QString& dockTitle,
Qt::DockWidgetArea dockArea,
bool isFloating =false );
DockLayoutFlags flags = DOCK_LAYOUT_NONE );
/**
*/
......@@ -247,7 +255,7 @@ protected:
AddDockWidget( const QString& dockName,
const QString& dockTitle,
Qt::DockWidgetArea dockArea,
bool isFloating =false );
DockLayoutFlags flags = DOCK_LAYOUT_NONE );
/**
*/
const AbstractModelController *
......@@ -433,20 +441,20 @@ template< typename TWidget, typename TDockWidget >
inline
TDockWidget*
I18nMainWindow
::AddDockWidget( const QString& dockName,
const QString& dockTitle,
::AddDockWidget( const QString & dockName,
const QString & dockTitle,
Qt::DockWidgetArea dockArea,
bool isFloating )
DockLayoutFlags flags )
{
TWidget* widget = new TWidget( this );
TWidget * widget = new TWidget( this );
TDockWidget* dockWidget =
TDockWidget * dockWidget =
AddWidgetToDock(
widget,
dockName,
dockTitle,
dockArea,
isFloating
flags
);
return dockWidget;
......@@ -457,20 +465,34 @@ template< typename TWidget, typename TController, typename TDockWidget >
inline
TDockWidget*
I18nMainWindow
::AddDockWidget( const QString& dockName,
const QString& dockTitle,
::AddDockWidget( const QString & dockName,
const QString & dockTitle,
Qt::DockWidgetArea dockArea,
bool isFloating )
DockLayoutFlags flags )
{
TWidget* widget = new TWidget( this );
TWidget * widget = new TWidget( this );
QWidget * pannel = widget;
if( flags.testFlag( DOCK_LAYOUT_SCROLLABLE ) )
{
QScrollArea * scrollArea = new QScrollArea( this );
scrollArea->setWidgetResizable( true );
TDockWidget* dockWidget =
scrollArea->setWidget( widget );
pannel = scrollArea;
}
TDockWidget * dockWidget =
AddWidgetToDock(
widget,
pannel,
dockName,
dockTitle,
dockArea,
isFloating
flags
);
new TController(
......
......@@ -72,7 +72,7 @@ namespace mvd
/**
* \class ImageViewManipulator
*
* \ingroup OTBMonteverdiGui
* \ingroup OTBMonteverdiGUI
*
* \brief TODO.
*/
......@@ -168,6 +168,8 @@ public:
virtual const PointType& Transform( PointType&, const QPoint& ) const;
virtual void ResetViewport();
//
// Events.
......
......@@ -82,7 +82,7 @@ namespace mvd
/**
* \class ImageViewRenderer
*
* \ingroup OTBMonteverdiGui
* \ingroup OTBMonteverdiGUI
*/
class ITK_EXPORT ImageViewRenderer :
public AbstractImageViewRenderer
......@@ -196,6 +196,8 @@ public:
const PointType & vcenter,
const SpacingType & vspacing ) const;
virtual bool IsEffectsEnabled() const;
/*-[ PUBLIC SLOTS SECTION ]------------------------------------------------*/
// public slots
......@@ -212,6 +214,7 @@ signals:
void ClearProjectionRequired();
void SetProjectionRequired();
void UpdateProjectionRequired();
void ResetViewport();
/*-[ PROTECTED SECTION ]---------------------------------------------------*/
......
......@@ -70,7 +70,7 @@ class AbstractImageViewManipulator;