]> Creatis software - cpPlugins.git/blobdiff - appli/ImageMPR/ImageMPR.h
Tree data updated.
[cpPlugins.git] / appli / ImageMPR / ImageMPR.h
index b1d43fff0c560c1a6c20bd270855da25d2536bb2..c4d43e33d37b8aee02f8a092812ec7f78ea5e238 100644 (file)
@@ -1,9 +1,11 @@
 #ifndef __IMAGEMPR__H__
 #define __IMAGEMPR__H__
 
+#include <map>
 #include <vector>
 
 // Qt stuff
+#include <QApplication>
 #include <QMainWindow>
 
 // vtk stuff
 #include <cpExtensions/Visualization/MPRObjects.h>
 
 // Plugins interface
-#include <cpPlugins/Interface/Interface.h>
-#include <cpPlugins/Interface/ProcessObject.h>
-#include <cpPlugins/Interface/Image.h>
-#include <cpPlugins/Interface/ImplicitFunction.h>
-#include <cpPlugins/Interface/Mesh.h>
-#include <vtkMetaImageWriter.h>
-#include <vtkMetaImageReader.h>
-
+#include <cpPlugins/Interface/Plugins.h>
 
 // -------------------------------------------------------------------------
 namespace Ui
@@ -123,6 +118,7 @@ public:
   typedef QMainWindow Superclass;
 
   typedef cpExtensions::Visualization::MPRObjects TMPRObjects;
+  typedef cpPlugins::Interface::Plugins           TPlugins;
 
   // Plugins types
   /*
@@ -141,6 +137,18 @@ public:
   explicit ImageMPR( QWidget* parent = 0 );
   virtual ~ImageMPR( );
 
+protected:
+  inline void _Block( )
+    {
+      QApplication::setOverrideCursor( Qt::WaitCursor );
+      this->setEnabled( false );
+    }
+  inline void _Unblock( )
+    {
+      QApplication::restoreOverrideCursor( );
+      this->setEnabled( true );
+    }
+
   /*
     protected:
     bool _LoadPlugins( const std::string& filename );
@@ -165,10 +173,12 @@ private slots:
 
 private:
   Ui::ImageMPR* m_UI;
+  TPlugins*     m_Plugins;
 
-  // Some state flags
-  std::string m_ImageLoaded;
-  bool m_Flooding;
+  // Objects
+  typedef std::pair< std::string, TPlugins::TDataObject::Pointer > TTreeNode;
+  typedef std::map< std::string, TTreeNode > TTree;
+  TTree m_Objects;
 
   // Plugins objects
   /*