Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
TSessionDialogs.h
Go to the documentation of this file.
1 // @(#)root/sessionviewer:$Id$
2 // Author: Marek Biskup, Jakub Madejczyk, Bertrand Bellenot 10/08/2005
3 
4 /*************************************************************************
5  * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. *
6  * All rights reserved. *
7  * *
8  * For the licensing terms see $ROOTSYS/LICENSE. *
9  * For the list of contributors see $ROOTSYS/README/CREDITS. *
10  *************************************************************************/
11 
12 #ifndef ROOT_TSessionDialogs
13 #define ROOT_TSessionDialogs
14 
15 //////////////////////////////////////////////////////////////////////////
16 // //
17 // TSessionDialogs //
18 // //
19 // This file defines several dialogs that are used by TSessionViewer. //
20 // The following dialogs are available: TNewChainDlg and TNewQueryDlg. //
21 // //
22 //////////////////////////////////////////////////////////////////////////
23 
24 
25 #include "TSessionViewer.h"
26 
27 class TList;
28 class TSeqCollection;
29 class TChain;
30 class TDSet;
31 class TGTextEntry;
32 class TGTextButton;
33 class TGTextBuffer;
34 class TGCheckButton;
35 class TGLabel;
36 class TGListView;
37 class TGPicture;
38 class TGFileContainer;
39 
40 //////////////////////////////////////////////////////////////////////////
41 // New Chain Dialog
42 //////////////////////////////////////////////////////////////////////////
43 
44 class TNewChainDlg : public TGTransientFrame {
45 
46 private:
47  TGFileContainer *fContents; // macro files container
48  TGListView *fListView; // memory objects list view
49  TGLVContainer *fLVContainer; // and its container
50  TGTextBuffer *fNameBuf; // buffer for dataset name
51  TGTextEntry *fName; // dataset name text entry
52  TGTextButton *fOkButton; // ok button
53  TGTextButton *fCancelButton; // cancel button
54  TSeqCollection *fChains; // collection of datasets
55  TObject *fChain; // actual TDSet or TChain
56 
57 public:
58  TNewChainDlg(const TGWindow *p=0, const TGWindow *main=0);
59  virtual ~TNewChainDlg();
60 
61  void UpdateList();
62  virtual void OnDoubleClick(TGLVEntry*,Int_t);
63  virtual void DisplayDirectory(const TString &fname);
64  void OnElementClicked(TGLVEntry* entry, Int_t btn);
65  void OnElementSelected(TObject *obj); //*SIGNAL*
66 
67  virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
68  virtual void CloseWindow();
69 
70  ClassDef(TNewChainDlg, 0) // New chain dialog
71 };
72 
73 //////////////////////////////////////////////////////////////////////////
74 // New Query Dialog
75 //////////////////////////////////////////////////////////////////////////
76 
77 class TNewQueryDlg : public TGTransientFrame {
78 
79 private:
80  Bool_t fEditMode; // kTRUE if used to edit existing query
81  Bool_t fModified; // kTRUE if settings have changed
82  TGCompositeFrame *fFrmNewQuery; // top (main) frame
83  TGCompositeFrame *fFrmMore; // options frame
84  TGTextButton *fBtnMore; // "more >>" / "less <<" button
85  TGTextButton *fBtnClose; // close button
86  TGTextButton *fBtnSave; // save button
87  TGTextButton *fBtnSubmit; // save & submit button
88 
89  TGTextEntry *fTxtQueryName; // query name text entry
90  TGTextEntry *fTxtChain; // chain name text entry
91  TGTextEntry *fTxtSelector; // selector name text entry
92  TGTextEntry *fTxtOptions; // options text entry
93  TGNumberEntry *fNumEntries; // number of entries selector
94  TGNumberEntry *fNumFirstEntry; // first entry selector
95  TGTextEntry *fTxtEventList; // event list text entry
96  TSessionViewer *fViewer; // pointer on main viewer
97  TQueryDescription *fQuery; // query description class
98  TObject *fChain; // actual TChain
99 
100 public:
101  TNewQueryDlg(TSessionViewer *gui, Int_t Width, Int_t Height,
102  TQueryDescription *query = 0, Bool_t editmode = kFALSE);
103  virtual ~TNewQueryDlg();
104  void Build(TSessionViewer *gui);
105  void OnNewQueryMore();
106  void OnBrowseChain();
107  void OnBrowseSelector();
108  void OnBrowseEventList();
109  void OnBtnSaveClicked();
110  void OnBtnCloseClicked();
111  void OnBtnSubmitClicked();
112  void OnElementSelected(TObject *obj);
113  void CloseWindow();
114  void Popup();
115  void SettingsChanged();
116  void UpdateFields(TQueryDescription *desc);
117  virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
118 
119  ClassDef(TNewQueryDlg, 0) // New query dialog
120 };
121 
122 //////////////////////////////////////////////////////////////////////////
123 // Upload DataSet Dialog
124 //////////////////////////////////////////////////////////////////////////
125 
126 class TUploadDataSetDlg : public TGTransientFrame {
127 
128 private:
129  Bool_t fUploading;
130  TList *fSkippedFiles; // List of skipped files
131  TGTextEntry *fDSetName; // dataset name text entry
132  TGTextEntry *fDestinationURL; // destination URL text entry
133  TGTextEntry *fLocationURL; // location URL text entry
134  TGListView *fListView; // dataset files list view
135  TGLVContainer *fLVContainer; // and its container
136  TGTextButton *fAddButton; // Add >> button
137  TGTextButton *fBrowseButton; // Browse... button
138  TGTextButton *fRemoveButton; // Remove button
139  TGTextButton *fClearButton; // Clear button
140  TGCheckButton *fOverwriteDSet; // overwrite DataSet
141  TGCheckButton *fOverwriteFiles; // overwrite All Files
142  TGCheckButton *fAppendFiles; // append files
143  TGTextButton *fUploadButton; // Upload button
144  TGTextButton *fCloseDlgButton; // Close Dialog button
145  TSessionViewer *fViewer; // pointer on main viewer
146 
147 public:
148  TUploadDataSetDlg(TSessionViewer *gui, Int_t w, Int_t h);
149  virtual ~TUploadDataSetDlg();
150 
151  virtual void CloseWindow();
152  virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
153  void AddFiles(const char *fileName);
154  void AddFiles(TList *fileList);
155  void BrowseFiles();
156  void ClearFiles();
157  void RemoveFile();
158  void UploadDataSet();
159  void OnOverwriteDataset(Bool_t on);
160  void OnOverwriteFiles(Bool_t on);
161  void OnAppendFiles(Bool_t on);
162 
163  ClassDef(TUploadDataSetDlg, 0) // New query dialog
164 };
165 
166 #endif