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