TSessionDialogs.h

Go to the documentation of this file.
00001 // @(#)root/sessionviewer:$Id: TSessionDialogs.h 20882 2007-11-19 11:31:26Z rdm $
00002 // Author: Marek Biskup, Jakub Madejczyk, Bertrand Bellenot 10/08/2005
00003 
00004 /*************************************************************************
00005  * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers.               *
00006  * All rights reserved.                                                  *
00007  *                                                                       *
00008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
00009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
00010  *************************************************************************/
00011 
00012 #ifndef ROOT_TSessionDialogs
00013 #define ROOT_TSessionDialogs
00014 
00015 //////////////////////////////////////////////////////////////////////////
00016 //                                                                      //
00017 // TSessionDialogs                                                      //
00018 //                                                                      //
00019 // This file defines several dialogs that are used by TSessionViewer.   //
00020 // The following dialogs are available: TNewChainDlg and TNewQueryDlg.  //
00021 //                                                                      //
00022 //////////////////////////////////////////////////////////////////////////
00023 
00024 
00025 #ifndef ROOT_TSessionViewer
00026 #include "TSessionViewer.h"
00027 #endif
00028 
00029 class TList;
00030 class TSeqCollection;
00031 class TChain;
00032 class TDSet;
00033 class TGTextEntry;
00034 class TGTextButton;
00035 class TGTextBuffer;
00036 class TGCheckButton;
00037 class TGLabel;
00038 class TGListView;
00039 class TGPicture;
00040 class TGFileContainer;
00041 
00042 //////////////////////////////////////////////////////////////////////////
00043 // New Chain Dialog
00044 //////////////////////////////////////////////////////////////////////////
00045 
00046 class TNewChainDlg : public TGTransientFrame {
00047 
00048 private:
00049    TGFileContainer      *fContents;       // macro files container
00050    TGListView           *fListView;       // memory objects list view
00051    TGLVContainer        *fLVContainer;    // and its container
00052    TGTextBuffer         *fNameBuf;        // buffer for dataset name
00053    TGTextEntry          *fName;           // dataset name text entry
00054    TGTextButton         *fOkButton;       // ok button
00055    TGTextButton         *fCancelButton;   // cancel button
00056    TSeqCollection       *fChains;         // collection of datasets
00057    TObject              *fChain;          // actual TDSet or TChain
00058 
00059 public:
00060    TNewChainDlg(const TGWindow *p=0, const TGWindow *main=0);
00061    virtual ~TNewChainDlg();
00062 
00063    void         UpdateList();
00064    virtual void OnDoubleClick(TGLVEntry*,Int_t);
00065    virtual void DisplayDirectory(const TString &fname);
00066    void         OnElementClicked(TGLVEntry* entry, Int_t btn);
00067    void         OnElementSelected(TObject *obj); //*SIGNAL*
00068 
00069    virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
00070    virtual void CloseWindow();
00071 
00072    ClassDef(TNewChainDlg, 0) // New chain dialog
00073 };
00074 
00075 //////////////////////////////////////////////////////////////////////////
00076 // New Query Dialog
00077 //////////////////////////////////////////////////////////////////////////
00078 
00079 class TNewQueryDlg : public TGTransientFrame {
00080 
00081 private:
00082    Bool_t             fEditMode;       // kTRUE if used to edit existing query
00083    Bool_t             fModified;       // kTRUE if settings have changed
00084    TGCompositeFrame  *fFrmNewQuery;    // top (main) frame
00085    TGCompositeFrame  *fFrmMore;        // options frame
00086    TGTextButton      *fBtnMore;        // "more >>" / "less <<" button
00087    TGTextButton      *fBtnClose;       // close button
00088    TGTextButton      *fBtnSave;        // save button
00089    TGTextButton      *fBtnSubmit;      // save & submit button
00090 
00091    TGTextEntry       *fTxtQueryName;   // query name text entry
00092    TGTextEntry       *fTxtChain;       // chain name text entry
00093    TGTextEntry       *fTxtSelector;    // selector name text entry
00094    TGTextEntry       *fTxtOptions;     // options text entry
00095    TGNumberEntry     *fNumEntries;     // number of entries selector
00096    TGNumberEntry     *fNumFirstEntry;  // first entry selector
00097    TGTextEntry       *fTxtEventList;   // event list text entry
00098    TSessionViewer    *fViewer;         // pointer on main viewer
00099    TQueryDescription *fQuery;          // query description class
00100    TObject           *fChain;          // actual TChain
00101 
00102 public:
00103    TNewQueryDlg(TSessionViewer *gui, Int_t Width, Int_t Height,
00104                    TQueryDescription *query = 0, Bool_t editmode = kFALSE);
00105    virtual ~TNewQueryDlg();
00106    void     Build(TSessionViewer *gui);
00107    void     OnNewQueryMore();
00108    void     OnBrowseChain();
00109    void     OnBrowseSelector();
00110    void     OnBrowseEventList();
00111    void     OnBtnSaveClicked();
00112    void     OnBtnCloseClicked();
00113    void     OnBtnSubmitClicked();
00114    void     OnElementSelected(TObject *obj);
00115    void     CloseWindow();
00116    void     Popup();
00117    void     SettingsChanged();
00118    void     UpdateFields(TQueryDescription *desc);
00119    virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
00120 
00121    ClassDef(TNewQueryDlg, 0) // New query dialog
00122 };
00123 
00124 //////////////////////////////////////////////////////////////////////////
00125 // Upload DataSet Dialog
00126 //////////////////////////////////////////////////////////////////////////
00127 
00128 class TUploadDataSetDlg : public TGTransientFrame {
00129 
00130 private:
00131    Bool_t                fUploading;
00132    TList                *fSkippedFiles;   // List of skipped files
00133    TGTextEntry          *fDSetName;       // dataset name text entry
00134    TGTextEntry          *fDestinationURL; // destination URL text entry
00135    TGTextEntry          *fLocationURL;    // location URL text entry
00136    TGListView           *fListView;       // dataset files list view
00137    TGLVContainer        *fLVContainer;    // and its container
00138    TGTextButton         *fAddButton;      // Add >> button
00139    TGTextButton         *fBrowseButton;   // Browse... button
00140    TGTextButton         *fRemoveButton;   // Remove button
00141    TGTextButton         *fClearButton;    // Clear button
00142    TGCheckButton        *fOverwriteDSet;  // overwrite DataSet
00143    TGCheckButton        *fOverwriteFiles; // overwrite All Files
00144    TGCheckButton        *fAppendFiles;    // append files
00145    TGTextButton         *fUploadButton;   // Upload button
00146    TGTextButton         *fCloseDlgButton; // Close Dialog button
00147    TSessionViewer       *fViewer;         // pointer on main viewer
00148 
00149 public:
00150    TUploadDataSetDlg(TSessionViewer *gui, Int_t w, Int_t h);
00151    virtual ~TUploadDataSetDlg();
00152 
00153    virtual void   CloseWindow();
00154    virtual Bool_t ProcessMessage(Long_t msg, Long_t parm1, Long_t parm2);
00155    void           AddFiles(const char *fileName);
00156    void           AddFiles(TList *fileList);
00157    void           BrowseFiles();
00158    void           ClearFiles();
00159    void           RemoveFile();
00160    void           UploadDataSet();
00161    void           OnOverwriteDataset(Bool_t on);
00162    void           OnOverwriteFiles(Bool_t on);
00163    void           OnAppendFiles(Bool_t on);
00164 
00165    ClassDef(TUploadDataSetDlg, 0) // New query dialog
00166 };
00167 
00168 #endif

Generated on Tue Jul 5 14:22:29 2011 for ROOT_528-00b_version by  doxygen 1.5.1