diff --git a/GLViewer/CMakeLists.txt b/GLViewer/CMakeLists.txt
index 91ceacdd547cb09eb603f7f99887ca1a457f1d66..caf8bb33cfabd9874dcb4cdf97e5e3a2ce3c45c5 100644
--- a/GLViewer/CMakeLists.txt
+++ b/GLViewer/CMakeLists.txt
@@ -5,11 +5,14 @@ message( STATUS " - " ${CURRENT_TARGET} )
project( ${CURRENT_TARGET} LANGUAGES CXX )
set( CMAKE_AUTOMOC ON )
+set( CMAKE_AUTORCC ON )
file( GLOB LIB_HEADERS ${CMAKE_CURRENT_SOURCE_DIR}/*.h )
file( GLOB LIB_SOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.cpp )
+file( GLOB LIB_RESOURCES ${CMAKE_CURRENT_SOURCE_DIR}/*.qrc )
+generate_resource_solution_folders( ${LIB_RESOURCES} ALL_RESOURCE_FILES )
-add_library( ${PROJECT_NAME} SHARED ${LIB_HEADERS} ${LIB_SOURCES} )
+add_library( ${PROJECT_NAME} SHARED ${LIB_HEADERS} ${LIB_SOURCES} ${LIB_RESOURCES} ${ALL_RESOURCE_FILES} )
if( WIN32 )
target_link_libraries( ${CURRENT_TARGET}
diff --git a/GLViewer/GLViewer.cpp b/GLViewer/GLViewer.cpp
index 8d884e8593c04bd705ca7c6e6337deff69ab4879..7eb6c8cf47d49634a82b21c701f72ac854c3049a 100644
--- a/GLViewer/GLViewer.cpp
+++ b/GLViewer/GLViewer.cpp
@@ -40,6 +40,8 @@ float GLViewer::Shininess = 80.0f;
QString GLViewer::s_MetricGrid2DSuffix;
QString GLViewer::s_MetricGrid3DSuffix;
+QImage GLViewer::s_Logos[4];
+
@@ -839,6 +841,53 @@ void GLViewer::manageAnimations()
}
+void GLViewer::setDemoModeEnabled( bool enabled )
+{
+ if( m_IsDemoModeEnabled = enabled )
+ {
+ updateDemoModeLogos();
+ update();
+ }
+}
+
+
+void GLViewer::updateDemoModeLogos()
+{
+ if( m_IsDemoModeEnabled )
+ {
+ if( s_Logos[0].isNull() )
+ {
+ s_Logos[0] = QImage( ":/images/resources/unistra-logo.png" );
+ s_Logos[1] = QImage( ":/images/resources/igg-logo.png" );
+ s_Logos[2] = QImage( ":/images/resources/icube-logo.png" );
+ }
+
+ int h = int(0.075f * height());
+ if( h != m_CurrentLogos[0].height() )
+ for( int i=0; i<3; ++i )
+ {
+ h = int(((i == 1)? 0.09f : 0.075f) * height());
+ int w = int(float(h)*s_Logos[i].width()/s_Logos[i].height());
+ m_CurrentLogos[i] = s_Logos[i].scaled( QSize(w,h), Qt::KeepAspectRatio, Qt::SmoothTransformation );
+ }
+ }
+}
+
+
+void GLViewer::displayDemoModeLogos()
+{
+ if( m_IsDemoModeEnabled )
+ {
+ QPainter painter;
+ painter.begin( this );
+ painter.drawImage( 25, height()-m_CurrentLogos[0].height()-10, m_CurrentLogos[0] );
+ painter.drawImage( (width()-m_CurrentLogos[1].width())/2, height()-m_CurrentLogos[1].height()-10, m_CurrentLogos[1] );
+ painter.drawImage( width()-m_CurrentLogos[2].width()-25, height()-m_CurrentLogos[2].height()-10, m_CurrentLogos[2] );
+ painter.end();
+ }
+}
+
+
void GLViewer::paintGL()
{
manageAnimations();
@@ -1006,6 +1055,8 @@ void GLViewer::paintGL()
// Display the information bar.
m_InfoBarManager->display();
+
+ displayDemoModeLogos();
}
@@ -1154,6 +1205,8 @@ void GLViewer::resizeGL( int width, int height )
m_SelectionCurrentTool->onResize();
updateSelectionZBuffer();
+
+ updateDemoModeLogos();
}
diff --git a/GLViewer/GLViewer.h b/GLViewer/GLViewer.h
index dfd6d99742b6c2e69c0e92ce5d34ecb9f9785e12..8de6cb297695a214744ea1701d97e3cef4b9bc92 100644
--- a/GLViewer/GLViewer.h
+++ b/GLViewer/GLViewer.h
@@ -60,7 +60,7 @@ public:
class GLVIEWER_API NavigationControl
{
- GLViewer *m_Viewer;
+ GLViewer *m_Viewer;
public:
inline NavigationControl( GLViewer *viewer ) : m_Viewer(viewer) {}
@@ -130,6 +130,12 @@ protected:
static QString s_MetricGrid2DSuffix;
static QString s_MetricGrid3DSuffix;
+ static QImage s_Logos[4];
+ bool m_IsDemoModeEnabled = false;
+ QImage m_CurrentLogos[4];
+ void updateDemoModeLogos();
+ void displayDemoModeLogos();
+
public:
static QVector3D BgTopColor;
static QVector3D BgBottomColor;
@@ -458,6 +464,9 @@ public slots:
inline void setMetricGrid2DSuffix( const QString& suffix ) { s_MetricGrid2DSuffix = suffix; }
inline void setMetricGrid3DSuffix( const QString& suffix ) { s_MetricGrid3DSuffix = suffix; }
+
+ void setDemoModeEnabled( bool enabled );
+ inline void setDemoModeDisabled( bool disabled ) { setDemoModeEnabled( !disabled ); }
};
diff --git a/GLViewer/GLViewer.qrc b/GLViewer/GLViewer.qrc
new file mode 100644
index 0000000000000000000000000000000000000000..93fc1bcc44d82a5db5ef9aaf20a3721392c8fe45
--- /dev/null
+++ b/GLViewer/GLViewer.qrc
@@ -0,0 +1,7 @@
+
+
+ resources/icube-logo.png
+ resources/igg-logo.png
+ resources/unistra-logo.png
+
+
diff --git a/GLViewer/resources/icube-logo.png b/GLViewer/resources/icube-logo.png
new file mode 100644
index 0000000000000000000000000000000000000000..046dfb4a77a1acdecbf3581cc500a7b088bd45ef
Binary files /dev/null and b/GLViewer/resources/icube-logo.png differ
diff --git a/GLViewer/resources/igg-logo.png b/GLViewer/resources/igg-logo.png
new file mode 100644
index 0000000000000000000000000000000000000000..6f2d73ba55fff87265114e34b8600c2c5caf5635
Binary files /dev/null and b/GLViewer/resources/igg-logo.png differ
diff --git a/GLViewer/resources/unistra-logo.png b/GLViewer/resources/unistra-logo.png
new file mode 100644
index 0000000000000000000000000000000000000000..25dc077467c75576659cc1eefec07f65d16e1f1b
Binary files /dev/null and b/GLViewer/resources/unistra-logo.png differ
diff --git a/GUI_main/UIMainWindow.cpp b/GUI_main/UIMainWindow.cpp
index ad69041bff80fd69b112cbc8c4b41208b0df615b..05cb6e8608b5836f567963e4c6f6dbda097dd428 100644
--- a/GUI_main/UIMainWindow.cpp
+++ b/GUI_main/UIMainWindow.cpp
@@ -248,7 +248,8 @@ void UIMainWindow::init()
connect( ui->actionCloseProject, SIGNAL(triggered()), this, SLOT(closeCurrentProject()) );
connect( ui->comboTypeFilter, SIGNAL(currentIndexChanged(const QString&)), this, SLOT(updateCurrentProjectContent()) );
connect( ui->actionAbout, SIGNAL(triggered()), this, SLOT(showAboutDialog()) );
- connect( ui->actionDisplayPluginsList, SIGNAL(triggered()), this, SLOT(displayPluginsList()) );
+ connect( ui->actionShowLogos, SIGNAL(toggled(bool)), m_CurrentViewer, SLOT(setDemoModeEnabled(bool)) );
+ connect( ui->actionDisplayPluginsList, SIGNAL(triggered()), this, SLOT(displayPluginsList()) );
connect( ui->action2DViewer, SIGNAL(triggered()), this, SLOT(setDefault3DViewer()) );
connect( ui->action3DViewer, SIGNAL(triggered()), this, SLOT(setDefault2DViewer()) );
connect( ui->actionClone, SIGNAL(triggered()), this, SLOT(cloneSelectedManageables()) );
diff --git a/GUI_main/mainwindow.ui b/GUI_main/mainwindow.ui
index b77c8f7a2871f37cce4c3c9d454c44e8b7dd0469..c16a5372f331a34c13140e2acee49149a1426bbb 100644
--- a/GUI_main/mainwindow.ui
+++ b/GUI_main/mainwindow.ui
@@ -70,6 +70,7 @@
Help
+