]> Creatis software - creaImageIO.git/blobdiff - src2/creaImageIOTreeView.h
No newline at end of file
[creaImageIO.git] / src2 / creaImageIOTreeView.h
index 4f61518eda7e672922402dd7f3a241c22c469a1b..a1cb4b2e4cfac5f0ff75df1e651703aa2bf17cdd 100644 (file)
@@ -2,24 +2,28 @@
 #define __creaImageIOTreeView_h_INCLUDED__
 
 #include <creaImageIOTreeHandler.h>
+#include <creaImageIOTimestampDatabaseHandler.h>
 #include <creaImageIOSystem.h>
 #include <vtkImageData.h>
 
 namespace creaImageIO
 {
+
+  class GimmickView;
+
   /**
    * \ingroup View
    */
        
   //=====================================================================
-  
+
   //=====================================================================
   /// Abstract class that handles the view of a Tree through its TreeHandler
   class TreeView
     {
     public:
       /// Ctor
-      TreeView(TreeHandler*);
+      TreeView(TreeHandler*,GimmickView*);
       /// Virtual destructor
       virtual ~TreeView();
 
@@ -28,40 +32,48 @@ namespace creaImageIO
       virtual void UpdateLevel( int ) 
       { GimmickError("INTERNAL ERROR : TreeView::UpdateLevel not overloaded");}
 
-         ///Removes selected nodes on given level
-         virtual void RemoveSelected( int )
+         ///Removes selected nodes
+         virtual void RemoveSelected( )
          { GimmickError("INTERNAL ERROR : TreeView::RemoveSelected not overloaded");}
 
          ///Validates the selected images
       virtual void ValidateSelectedImages()
          { GimmickError("INTERNAL ERROR : TreeView::ValidateSelected not overloaded");}
-         ///Returns the selected data as vtkImageData
-         vtkImageData* GetSelectedImage(int dim)
-         { GimmickError("INTERNAL ERROR : TreeView::GetSelectedImage not overloaded");}
-    ///Returns the selected data as a vector of vtkImageData (4D)
-         virtual void GetSelectedImages(std::vector<vtkImageData*>& s, int dim)
-         { GimmickError("INTERNAL ERROR : TreeView::GetSelectedImages not overloaded");}
-
-         ///Sets the maximum dimension allowed for selections
-         void SetMaxDimension(int maxdim){ mSelectionMaxDimension=maxdim; }
-         ///Sets the minimum dimension allowed for selections
-         void SetMinDimension(int mindim){ mSelectionMinDimension=mindim; }
          
+         ///Returns the last selected level
+         virtual unsigned int GetLastSelectedLevel(){GimmickError("INTERNAL ERROR : TreeView::GetLastSelectedLevel not overloaded");}
+
+         ///Returns the maximum number of levels
+         virtual int GetNumberOfLevels(){ GimmickError("INTERNAL ERROR : TreeView::GetLevels not overloaded"); }
+         ///Gets the current selections filenames
+         virtual void GetSelectedAsString(std::vector<std::string>&s){ GimmickError("INTERNAL ERROR : TreeView::GetSelectedAsString not overloaded"); }
+
+         /// Gets the user selected data from the level passed as a parameter
+      virtual const std::vector<tree::Node*>& GetSelected(int level){ GimmickError("INTERNAL ERROR : TreeView::GetSelected not overloaded"); }
+
+         /// Gets the next nodes on the list, be it up(true) or down(false).
+      virtual void GetNodes(std::vector<tree::Node*>& nodes, bool direction){ GimmickError("INTERNAL ERROR : TreeView::GetNodes not overloaded"); }
+
+         /// Gets the attributes that are being shown and the ones that have been blocked on a specific level
+         virtual void GetAttributes(std::vector<std::string>& areShown, std::vector<std::string>& notShown, int level){ GimmickError("INTERNAL ERROR : TreeView::GetAttributes not overloaded"); }
+         
+         ///Sets the non visible attributes and refreshes the GUI
+         virtual void SetNonVisibleAttributes(const std::vector<std::string>& notShown, int level){ GimmickError("INTERNAL ERROR : TreeView::SetNonVisibleAttributes not overloaded"); }
+
+         ///Creates a new listctrl
+         virtual void CreateCtrl(std::vector<std::string>& notShown, int nlevel){ GimmickError("INTERNAL ERROR : TreeView::CreateCtrl not overloaded"); }
+
     protected:
       TreeHandler* GetTreeHandler() { return mTreeHandler; }
-         ///Gets the maximum dimension allowed for selections
-         int GetMaxDimension(){ return mSelectionMaxDimension; }
-         ///Gets the minimum dimension allowed for selections
-         int GetMinDimension(){ return mSelectionMinDimension; }
+         GimmickView* GetGimmickView() { return mGimmickView; }
         
     private:
       /// The TreeHandler with which it corresponds
       TreeHandler* mTreeHandler;
-         //The selection's maximum dimension
-         int mSelectionMaxDimension;
-         //The selection's minimum dimension
-         int mSelectionMinDimension;
-         };
+         /// The GimmickView which holds the TreeView
+      GimmickView* mGimmickView;  
+
+  };
     // EO class TreeView
     //=====================================================================