]> Creatis software - creaImageIO.git/blob - src2/creaImageIOTreeView.h
611c7d0cbe87e06f464cfece867821fde9c866be
[creaImageIO.git] / src2 / creaImageIOTreeView.h
1 #ifndef __creaImageIOTreeView_h_INCLUDED__
2 #define __creaImageIOTreeView_h_INCLUDED__
3
4 #include <creaImageIOTreeHandler.h>
5 #include <creaImageIOTimestampDatabaseHandler.h>
6 #include <creaImageIOSystem.h>
7 #include <vtkImageData.h>
8
9 namespace creaImageIO
10 {
11
12   class GimmickView;
13
14   /**
15    * \ingroup View
16    */
17         
18   //=====================================================================
19
20   //=====================================================================
21   /// Abstract class that handles the view of a Tree through its TreeHandler
22   class TreeView
23     {
24     public:
25       /// Ctor
26       TreeView(TreeHandler*,GimmickView*);
27       /// Virtual destructor
28       virtual ~TreeView();
29
30       
31       /// Updates the view of a level given the selected items of upper level
32       virtual void UpdateLevel( int ) 
33       { GimmickError("INTERNAL ERROR : TreeView::UpdateLevel not overloaded");}
34
35           ///Removes selected nodes
36           virtual void RemoveSelected( )
37           { GimmickError("INTERNAL ERROR : TreeView::RemoveSelected not overloaded");}
38
39           ///Validates the selected images
40       virtual void ValidateSelectedImages()
41           { GimmickError("INTERNAL ERROR : TreeView::ValidateSelected not overloaded");}
42           
43           ///Returns the last selected level
44           virtual unsigned int GetLastSelectedLevel(){GimmickError("INTERNAL ERROR : TreeView::GetLastSelectedLevel not overloaded");}
45
46           ///Returns the maximum number of levels
47           virtual int GetNumberOfLevels(){ GimmickError("INTERNAL ERROR : TreeView::GetLevels not overloaded"); }
48           ///Gets the current selections filenames
49           virtual void GetSelectedAsString(std::vector<std::string>&s){ GimmickError("INTERNAL ERROR : TreeView::GetSelectedAsString not overloaded"); }
50
51           /// Gets the user selected data from the level passed as a parameter
52       virtual const std::vector<tree::Node*>& GetSelected(int level){ GimmickError("INTERNAL ERROR : TreeView::GetSelected not overloaded"); }
53
54           /// Gets the next nodes on the list, be it up(true) or down(false).
55       virtual void GetNodes(std::vector<tree::Node*>& nodes, bool direction){ GimmickError("INTERNAL ERROR : TreeView::GetNodes not overloaded"); }
56
57           /// Gets the attributes that are being shown and the ones that have been blocked on a specific level
58           virtual void GetAttributes(std::vector<std::string>& areShown, std::vector<std::string>& notShown, int level){ GimmickError("INTERNAL ERROR : TreeView::GetAttributes not overloaded"); }
59
60     protected:
61       TreeHandler* GetTreeHandler() { return mTreeHandler; }
62           GimmickView* GetGimmickView() { return mGimmickView; }
63          
64     private:
65       /// The TreeHandler with which it corresponds
66       TreeHandler* mTreeHandler;
67           /// The GimmickView which holds the TreeView
68       GimmickView* mGimmickView;  
69
70   };
71     // EO class TreeView
72     //=====================================================================
73   
74   
75 } // EO namespace creaImageIO
76
77 // EOF
78 #endif