]> Creatis software - cpPlugins.git/blobdiff - lib/cpPlugins/Interface/Workspace.h
...
[cpPlugins.git] / lib / cpPlugins / Interface / Workspace.h
index 3d78f0246d834563406427f420425f174f33fa99..b4c464124765668b64e0508fdc10dd45c679cdf3 100644 (file)
@@ -17,6 +17,13 @@ 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
@@ -32,7 +39,6 @@ namespace cpPlugins
       typedef std::set< std::string >               TStringContainer;
       typedef std::pair< std::string, std::string > TExposedPort;
       typedef std::map< std::string, TExposedPort > TExposedPorts;
-      typedef std::set< vtkRenderWindowInteractor* > TInteractors;
 
       // Graph type
       typedef std::pair< std::string, std::string > TConnection;
@@ -64,22 +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
-      virtual const TInteractors& GetInteractors( ) const;
-      virtual void AddInteractor( vtkRenderWindowInteractor* interactor );
+      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
         );
@@ -125,11 +140,12 @@ namespace cpPlugins
       TPlugins* m_Plugins;
 
       // Processing graph
-      typename TGraph::Pointer m_Graph;
+      TGraph::Pointer m_Graph;
       TExposedPorts m_ExposedInputPorts;
       TExposedPorts m_ExposedOutputPorts;
 
-      TInteractors m_Interactors;
+      vtkSmartPointer< vtkRenderWindowInteractor > m_SingleInteractor;
+      SimpleMPRWidget*                             m_MPRViewer;
     };
 
   } // ecapseman