]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Interface/Workspace.h
...
[cpPlugins.git] / lib / cpPlugins / Interface / Workspace.h
index 92315d71fb8c0116b45d1c4199584fbccc425f01..b4c464124765668b64e0508fdc10dd45c679cdf3 100644 (file)
 
 // Some forward declarations
 class QWidget;
+class vtkRenderWindowInteractor;
 
 namespace cpPlugins
 {
   namespace Interface
   {
+    // Some forward declarations
+#ifdef cpPlugins_Interface_QT4
+    class SimpleMPRWidget;
+#else // cpPlugins_Interface_QT4
+    typedef char SimpleMPRWidget;
+#endif // cpPlugins_Interface_QT4
+
     /** \brief A complex pipeline
      */
     class cpPlugins_Interface_EXPORT Workspace
@@ -62,18 +70,31 @@ namespace cpPlugins
       TFilter* GetFilter( const std::string& name );
       const TFilter* GetFilter( const std::string& name ) const;
       bool HasFilter( const std::string& name ) const;
-      bool CreateFilter( const std::string& filter, const std::string& name );
+      TFilter* CreateFilter(
+        const std::string& filter, const std::string& name
+        );
       bool RenameFilter(
         const std::string& old_name, const std::string& new_name
         );
       void RemoveFilter( const std::string& name );
 
+      // Widgets management
+      vtkRenderWindowInteractor* GetSingleInteractor( );
+      const vtkRenderWindowInteractor* GetSingleInteractor( ) const;
+      void SetSingleInteractor( vtkRenderWindowInteractor* interactor );
+
+      SimpleMPRWidget* GetMPRViewer( );
+      const SimpleMPRWidget* GetMPRViewer( ) const;
+      void SetMPRViewer( SimpleMPRWidget* wdg );
+
       // Connection management
       bool Connect(
         const std::string& orig_filter, const std::string& dest_filter,
         const std::string& output_name, const std::string& input_name
         );
-      bool Connect( TData* input_object, const std::string& exposed_port );
+      bool Connect(
+        TData::Pointer* input_object, const std::string& exposed_port
+        );
       void RemoveConnection(
         const std::string& dest_filter, const std::string& input_name
         );
@@ -111,17 +132,20 @@ namespace cpPlugins
       const TData* GetExposedOutput( const std::string& name ) const;
 
       // Pipeline execution
-      std::string Execute( QWidget* p = NULL );
-      std::string Execute( const std::string& name, QWidget* p = NULL );
+      std::string Execute( );
+      std::string Execute( const std::string& name );
 
     protected:
       // Plugins interface
       TPlugins* m_Plugins;
 
       // Processing graph
-      typename TGraph::Pointer m_Graph;
+      TGraph::Pointer m_Graph;
       TExposedPorts m_ExposedInputPorts;
       TExposedPorts m_ExposedOutputPorts;
+
+      vtkSmartPointer< vtkRenderWindowInteractor > m_SingleInteractor;
+      SimpleMPRWidget*                             m_MPRViewer;
     };
 
   } // ecapseman