]> Creatis software - creaImageIO.git/blob - src/creaImageIOTreeView.h
bf1298a6b10279cb734c1fb5a48e76f8b01673eb
[creaImageIO.git] / src / 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(std::string &i_save )
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           ///Sets the non visible attributes and refreshes the GUI
61           virtual void SetNonVisibleAttributes(const std::vector<std::string>& notShown, int level){ GimmickError("INTERNAL ERROR : TreeView::SetNonVisibleAttributes not overloaded"); }
62
63           ///Creates a new listctrl
64           virtual void CreateCtrl(std::vector<std::string>& notShown, int nlevel){ GimmickError("INTERNAL ERROR : TreeView::CreateCtrl not overloaded"); }
65
66     protected:
67       TreeHandler* GetTreeHandler() { return mTreeHandler; }
68           GimmickView* GetGimmickView() { return mGimmickView; }
69          
70     private:
71       /// The TreeHandler with which it corresponds
72       TreeHandler* mTreeHandler;
73           /// The GimmickView which holds the TreeView
74       GimmickView* mGimmickView;  
75
76   };
77     // EO class TreeView
78     //=====================================================================
79   
80   
81 } // EO namespace creaImageIO
82
83 // EOF
84 #endif