]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/EveBase/AliEveFileDialog.h
fa27f9d161a51fe67e3129ee3e426cd6cf632849
[u/mrichter/AliRoot.git] / EVE / EveBase / AliEveFileDialog.h
1 // Author: Mihai Niculescu 2013
2
3 /**************************************************************************
4  * Copyright(c) 1998-2009, ALICE Experiment at CERN, all rights reserved. *
5  * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
6  * full copyright notice.                                                 *
7  **************************************************************************/
8
9 #ifndef AliEveFileDialog_H
10 #define AliEveFileDialog_H
11
12 #include <TString.h>
13 #include <TGFrame.h>
14
15 class TGLabel;
16 class TGFileInfo;
17 class TGTextButton;
18 class TGTextEntry;
19 class TGComboBox;
20
21 //______________________________________________________________________________
22 // AliEveMainWindow
23 //
24 enum EAliEveFileDialogMode
25 {
26     kAliEveFDLocal,
27     kAliEveFDRemote
28 };
29
30 class AliEveFileDialog : public TGTransientFrame
31 {
32 public:
33     AliEveFileDialog(const TGWindow* p = 0, const TGWindow* main = 0, EAliEveFileDialogMode mode= kAliEveFDLocal);
34     ~AliEveFileDialog();
35
36     //const TString GetDirectory(); // directory where the ESD resides
37     const TString GetPathESD() const;
38     const TString GetPathAOD() const;
39     const TString GetPathAODfriend() const;
40     const TString GetPathRaw() const;
41     const TString GetUrl() const;
42     UInt_t GetMode() const { return fMode; }
43
44     const TString GetCDBStoragePath() const;
45
46     void onBrowseESDFile();
47     void onBrowseAODFile();
48     void onBrowseAODfriendFile();
49     void onBrowseRawFile();
50
51     Bool_t accepted() const { return fIsAccepted; } // true if clicked the OK button, false otherwise
52
53     void onAccept();// ok button was clicked
54     void onReject();// cancel button was clicked
55
56     void setMode(EAliEveFileDialogMode mode);
57     void showAdvancedOpts(Bool_t shown=kTRUE);
58
59     void CloseWindow();
60     void MapWindow();
61     void UnmapWindow();
62     void MapSubwindows();
63 private:
64     AliEveFileDialog(const AliEveFileDialog&);              // not implemented
65     AliEveFileDialog& operator=(const AliEveFileDialog&);   // not implemented
66
67     TGHorizontalFrame* fESDFilesFrame;
68     TGHorizontalFrame* fAdvancedOptsFrame;
69     TGCheckButton* fAdvancedOptsButton;
70     TGHorizontalFrame* fAODFilesFrame;
71     TGHorizontalFrame* fAODfriendFilesFrame;
72     TGHorizontalFrame* fRawFilesFrame;
73     TGHorizontalFrame* fUrlFrame;
74     TGHorizontalFrame* fCDBFrame;
75     TGHorizontalFrame* fDialogButtonsFrame;
76     TGTextEntry* fPathEntryESD;
77     TGTextEntry* fPathEntryAOD;
78     TGTextEntry* fPathEntryAODfriend;
79     TGTextEntry* fPathEntryRawFile;
80     TGTextEntry* fPathEntryUrl; // remote file
81     TGComboBox* fCDBPathCB;
82
83     Bool_t fIsAccepted; // true if clicked OK, false otherwise
84     EAliEveFileDialogMode fMode;
85
86 public:
87
88     ClassDef(AliEveFileDialog, 0)
89 };
90
91 #endif
92