]> Creatis software - cpPlugins.git/commitdiff
...
authorLeonardo Florez-Valencia <florez-l@javeriana.edu.co>
Tue, 28 Jun 2016 21:01:25 +0000 (16:01 -0500)
committerLeonardo Florez-Valencia <florez-l@javeriana.edu.co>
Tue, 28 Jun 2016 21:01:25 +0000 (16:01 -0500)
appli/PipelineEditor/PipelineEditorMainWindow.cxx
cmake/cpPlugins_Functions.cmake
lib/cpExtensions/QT/SimpleMPRWidget.cxx
lib/cpExtensions/QT/SimpleMPRWidget.h

index 5057790fe059d97730a76deeeedaedbf761a40f1..2884c3640b69a2c32748b4bda1e7a5057390fc47 100644 (file)
@@ -1,15 +1,6 @@
 #include <appli/PipelineEditor/PipelineEditorMainWindow.h>
 #include <appli/PipelineEditor/ui_PipelineEditorMainWindow.h>
 
-#include <QMessageBox>
-
-// -------------------------------------------------------------------------
-#define _QT_CONNECT_ACTION( ACTION )                    \
-  this->connect(                                        \
-    this->m_UI->Action##ACTION, SIGNAL( triggered( ) ), \
-    this, SLOT( _Action##ACTION( ) )                    \
-    )
-
 // -------------------------------------------------------------------------
 PipelineEditorMainWindow::
 PipelineEditorMainWindow(
index 45d75528add1ed2bd4fff0184bf41fc780dde292..db0215edf7da60e9eecd44d00d484cf374b5e724 100644 (file)
@@ -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})
index d8c68223c8c6f6b7f109ffca07b2ae619d2a75aa..5ea88d0f6b71ddb2191ee331ebeb23e100e97d95 100644 (file)
@@ -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 )
index 4b1ceb7d2434d46b4c4a4a4328e5383a1cd63b4f..f04362fc939e43039ac8b42c08c0cce352cf33e4 100644 (file)
@@ -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 );