From: Leonardo Florez-Valencia Date: Tue, 28 Jun 2016 21:01:25 +0000 (-0500) Subject: ... X-Git-Tag: v0.1~126 X-Git-Url: https://git.creatis.insa-lyon.fr/pubgit/?a=commitdiff_plain;h=d33ca0ef613a3037614d9729bbea065124b07cce;p=cpPlugins.git ... --- diff --git a/appli/PipelineEditor/PipelineEditorMainWindow.cxx b/appli/PipelineEditor/PipelineEditorMainWindow.cxx index 5057790..2884c36 100644 --- a/appli/PipelineEditor/PipelineEditorMainWindow.cxx +++ b/appli/PipelineEditor/PipelineEditorMainWindow.cxx @@ -1,15 +1,6 @@ #include #include -#include - -// ------------------------------------------------------------------------- -#define _QT_CONNECT_ACTION( ACTION ) \ - this->connect( \ - this->m_UI->Action##ACTION, SIGNAL( triggered( ) ), \ - this, SLOT( _Action##ACTION( ) ) \ - ) - // ------------------------------------------------------------------------- PipelineEditorMainWindow:: PipelineEditorMainWindow( diff --git a/cmake/cpPlugins_Functions.cmake b/cmake/cpPlugins_Functions.cmake index 45d7552..db0215e 100644 --- a/cmake/cpPlugins_Functions.cmake +++ b/cmake/cpPlugins_Functions.cmake @@ -347,11 +347,23 @@ cpPlugins_NormalizePaths(_global_binary_dir ${PROJECT_BINARY_DIR}) cpPlugins_NormalizePaths(_source_dir ${source_dir}) STRING(REPLACE "${_global_source_dir}" "" _local_source_dir ${_source_dir}) SET(_binary_dir ${_global_binary_dir}${_local_source_dir}) -GET_FILENAME_COMPONENT(_app_name ${_source_dir} NAME_WE) -OPTION(BUILD_${_app_name} "Build \"${_app_name}\" application" OFF) +IF(${output_app}) + SET(_app_name ${${output_app}}) +ELSE(${output_app}) + GET_FILENAME_COMPONENT(_app_name ${_source_dir} NAME_WE) +ENDIF(${output_app}) +SET(_app_name_option OFF) +IF(ARGN) + LIST(GET ARGN 0 _app_name_option) +ENDIF(ARGN) +OPTION( + BUILD_${_app_name} + "Build \"${_app_name}\" application" + ${_app_name_option} + ) +## -- Real build commands IF(BUILD_${_app_name}) - ## -- Some useful variables SET(_sources_extensions .c .cpp .cxx) SET(_headers_extensions .h .hpp .hxx) @@ -425,7 +437,6 @@ IF(BUILD_${_app_name}) IF(_qt_moc_sources) SET(_sources ${_sources} ${_qt_moc_sources}) ENDIF(_qt_moc_sources) - ## -- Guess what qt-ui's sould be qt-uic'ed ## -- Wrap qt-ui headers: this is equivalent to QT4_WRAP_UI except to ## -- change the output file @@ -441,6 +452,7 @@ IF(BUILD_${_app_name}) ADD_EXECUTABLE(${_app_name} ${_sources}) SET(${output_app} ${_app_name} PARENT_SCOPE) ELSE(_sources) + SET(${output_app} "" PARENT_SCOPE) MESSAGE(FATAL_ERROR "No source code found to build \"${_app_name}\"") ENDIF(_sources) ENDIF(BUILD_${_app_name}) diff --git a/lib/cpExtensions/QT/SimpleMPRWidget.cxx b/lib/cpExtensions/QT/SimpleMPRWidget.cxx index d8c6822..5ea88d0 100644 --- a/lib/cpExtensions/QT/SimpleMPRWidget.cxx +++ b/lib/cpExtensions/QT/SimpleMPRWidget.cxx @@ -287,6 +287,34 @@ GetActors( const std::string& name ) const return( empty ); } +// ------------------------------------------------------------------------- +void cpExtensions::QT::SimpleMPRWidget:: +SetWindowLevel( double win, double lev ) +{ + for( unsigned int i = 0; i < 3; ++i ) + { + if( this->m_2DSlices[ i ].GetPointer( ) != NULL ) + { + this->m_2DSlices[ i ]->SetWindowLevel( win, lev ); + this->m_2DSlices[ i ]->Render( ); + + } // fi + if( this->m_3DSlices[ i ].GetPointer( ) != NULL ) + { + this->m_3DSlices[ i ]->SetWindowLevel( win, lev ); + this->m_3DSlices[ i ]->Render( ); + + } // fi + + } // rof +} + +// ------------------------------------------------------------------------- +void cpExtensions::QT::SimpleMPRWidget:: +ResetWindowLevel( ) +{ +} + // ------------------------------------------------------------------------- vtkRenderWindowInteractor* cpExtensions::QT::SimpleMPRWidget:: GetInteractor( unsigned int i ) diff --git a/lib/cpExtensions/QT/SimpleMPRWidget.h b/lib/cpExtensions/QT/SimpleMPRWidget.h index 4b1ceb7..f04362f 100644 --- a/lib/cpExtensions/QT/SimpleMPRWidget.h +++ b/lib/cpExtensions/QT/SimpleMPRWidget.h @@ -87,6 +87,9 @@ namespace cpExtensions void AddActor( vtkProp* actor, const std::string& name ); const TActors& GetActors( const std::string& name ) const; + void SetWindowLevel( double win, double lev ); + void ResetWindowLevel( ); + // Visual objects vtkRenderWindowInteractor* GetInteractor( unsigned int i ); vtkRenderer* GetRenderer( unsigned int i );