Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

/Go4GUIRegistry/TGo4GUIRegistry.h

Go to the documentation of this file.
00001 //---------------------------------------------------------------
00002 //        Go4 Release Package v2.10-5 (build 21005) 
00003 //                      03-Nov-2005
00004 //---------------------------------------------------------------
00005 //       The GSI Online Offline Object Oriented (Go4) Project
00006 //       Experiment Data Processing at DVEE department, GSI
00007 //---------------------------------------------------------------
00008 //
00009 //Copyright (C) 2000- Gesellschaft f. Schwerionenforschung, GSI
00010 //                    Planckstr. 1, 64291 Darmstadt, Germany
00011 //Contact:            http://go4.gsi.de
00012 //----------------------------------------------------------------
00013 //This software can be used under the license agreements as stated
00014 //in Go4License.txt file which is part of the distribution.
00015 //----------------------------------------------------------------
00016 #ifndef TGO4GUIREGISTERY_H
00017 #define TGO4GUIREGISTERY_H
00018 
00019 #include "TNamed.h"
00020 #include "TObjArray.h"
00021 
00022 class TGo4Command;
00023 class TGo4Display;
00024 class TQRootCanvas;
00025 class QWidget;
00026 class TPad;
00027 class TGo4SubmittedCommandsEntry;
00028 class TGo4Status;
00029 class TGo4SlotsBaseClass;
00030 
00039 class TGo4GUIRegistry {
00040     
00041   protected:
00042   
00043     TGo4GUIRegistry();
00044 
00045   public:
00046 
00047     static TGo4GUIRegistry * Instance();
00048 
00049     virtual ~TGo4GUIRegistry();
00050     void DisplayData(TNamed*);
00051     void SetLogInfo(TGo4SlotsBaseClass*);
00052 
00053     void SetMemoryBrowser(TGo4SlotsBaseClass* browser);
00054     void SetDisplayStatusMonitor(TGo4SlotsBaseClass* );
00055     void DisplayLog(TGo4Status *);
00056 
00057     void RegisterDependentClass(TGo4SlotsBaseClass* , const char*);
00058 
00062     void SubmitCommand(const char* name);
00063 
00068     TGo4Command* MakeCommand(const char* name);
00069 
00085     void SubmitCommand(TGo4Command* com, 
00086                        const char* ObjectName=0, 
00087                        TGo4SlotsBaseClass *p=0,
00088                        Bool_t Monitor=kFALSE, 
00089                        TQRootCanvas *c=0, 
00090                        TPad *pad=0); 
00091 
00092     void SubmitCommand(const char* name, TGo4SlotsBaseClass *p);
00093 
00094     void SubmitEmergencyCommand(Int_t val);
00095 
00106     void ReDirectObject(const char* ObjectName, TGo4SlotsBaseClass *p=0, bool Monitor=kTRUE, TQRootCanvas *c=0, TPad *pad=0);
00107 
00108     void RegisterSlotClass(TGo4SlotsBaseClass *p, TGo4Status *s, QWidget *GUI=0) ;
00109 
00110     TGo4SlotsBaseClass* GetSlotClass(const char * name);
00111 
00112     TGo4SlotsBaseClass* GetSlotClass(TGo4SlotsBaseClass *SlotClass);
00113 
00114     TGo4Status* GetStatus(const char * name);
00115 
00116     QWidget *GetGUIClass(TGo4SlotsBaseClass *SlotClass);
00117 
00118     void SetMainWindow(QWidget * widget);
00119 
00120     QWidget *GetMainWindow();
00121 
00122     void SetCentralWindow(QWidget * widget);
00123 
00124     QWidget *GetCentralWindow();
00125 
00126     void GuiIsChanged(TGo4SlotsBaseClass * SlotClass, QWidget * GUI);
00127 
00128     void UnRegisterDependentClass(TGo4SlotsBaseClass *p, const char* name);
00129 
00130     void UpdateDependents(TGo4Status* s);
00131 
00132     void SetDisplay(TGo4Display *);
00133 
00134     TGo4Display *GetDisplay() const { return fxTGo4Display; }
00135 
00136     void SetDisplayAnalysisConfig(TGo4SlotsBaseClass * p);
00137 
00139     void RemoveFromSubmittedList(const char* Name);
00140 
00144     void RemoveFromSubmittedList(const char* Name, TGo4SlotsBaseClass *p);
00145 
00149     void RemoveFromSubmittedList(const char* Name, TQRootCanvas *c);
00150 
00152     void RemoveRedirectEntry(const char* Name);
00153 
00155     void RemoveRedirectEntry(const char* Name, TGo4SlotsBaseClass *p);
00156 
00158     void RemoveRedirectEntry(const char* Name, TQRootCanvas *c);
00159 
00160     void UnRegisterClass(TGo4SlotsBaseClass * p, TGo4Status* s);
00161 
00162     void StartAnalysisWindow(const char* text);
00163 
00165     void SetMasterMode(Int_t role);
00166 
00169     void StopMonitoring();
00170 
00171 
00172     Bool_t IsAnalysisReady() const { return fbAnalysisReady; }
00173     void SetAnalysisReady(Bool_t on=kTRUE) { fbAnalysisReady=on; }
00174 
00175     Bool_t IsAnaSettingsReady() const { return fbAnaSettingsReady; }
00176     void SetAnaSettingsReady(Bool_t on=kTRUE) { fbAnaSettingsReady=on; }
00177 
00178     void SetClientNode(const char* host) { fxClientHost = host; }
00179     const char* GetClientNode() { return fxClientHost.Data(); }
00180 
00181     void SetClientShell(const Text_t* txt) { fxClientShell = txt; }
00182     const char* GetClientShell() { return fxClientShell.Data(); }
00183 
00184     void SetClientProgram(const Text_t* exec) { fxClientProgram=exec; }
00185     const char* GetClientProgram() { return fxClientProgram.Data(); }
00186 
00187     void SetClientPassword(const Text_t* passwd) { fxClientPassword=passwd; }
00188     const char* GetClientPassword() { return fxClientPassword.Data(); }
00189 
00190     void SetClientRole(Int_t role){fiClientRole=role;}
00191     Int_t GetClientRole(){return fiClientRole;}
00192 
00193   private:
00194 
00195     TGo4SubmittedCommandsEntry* FindCmdEntry(const char* name, Bool_t force = kFALSE);
00196 
00197     void RemoveFromSubmittedList(TGo4SubmittedCommandsEntry *Entry);
00198 
00205     /*# TGo4GUIRegistry _go4GUISingleton; */
00206     static TGo4GUIRegistry * fxInstance;          
00207 
00208     TObjArray SlotClassList;                      
00209 
00210     TObjArray DependenceList;                     
00211     
00212     TObjArray SubmittedCommandsList;              
00213 
00214     TGo4SlotsBaseClass * fxDisplayStatusMonitor;  
00215     TGo4SlotsBaseClass * fxDisplayAnalysisConfig; 
00216     TGo4SlotsBaseClass * fxLogInfo;               
00217     TGo4SlotsBaseClass * fxMemBrowser;            
00218 
00219     TGo4Display* fxTGo4Display;                   
00220 
00221     QWidget *fxMainWindow;                        
00222     QWidget *fxCentralWindow;                     
00223 
00225     Bool_t fbAnalysisReady;                       
00226 
00228     Bool_t fbAnaSettingsReady;                    
00229 
00231     TString fxClientHost;                         
00232 
00234     TString fxClientShell;                        
00235 
00237     TString fxClientProgram;                      
00238     
00240     TString fxClientPassword;                      
00241     
00243     Int_t fiClientRole; 
00244     
00245 };
00246 
00247 #endif //TGO4GUIREGISTERY_H
00248 
00249 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Tue Nov 8 10:56:03 2005 for Go4-v2.10-5 by doxygen1.2.15