QGuiControlWindow.hh

Go to the documentation of this file.
00001 
00002 #ifndef _Q_GUI_CONTROL_WINDOW_HH_
00003 #define _Q_GUI_CONTROL_WINDOW_HH_
00004 
00005 #include <TGFrame.h>
00006 
00007 class TGTextButton;
00008 class TGTextView;
00009 class TTimer;
00010 class TGStatusBar;
00011 
00012 class QLogInfo;
00013 class QGUIDataCollector;
00014 class QGuiScope;
00015 class QGUIHistogramDisplay;
00016 
00017 #include <string>
00018 #include <fstream>
00019 
00020 #include "QMessageDefs.hh"
00021 
00027 class QGuiControlWindow: public TGMainFrame
00028 {
00029 public:
00031    QGuiControlWindow(const TGWindow* parent, Int_t w, Int_t h);
00032 
00034    virtual ~QGuiControlWindow();
00035 
00037    void HandleStartStop();
00038 
00040    void HandleQuit();
00041 
00043    void HandleMonitor();
00044 
00046    void HandleScope();
00047 
00049    void HandleScopeClosed();
00050 
00052    void HandleMonitorClosed();
00053 
00055    void Update();
00056 
00058    void CloseWindow(); /*SIGNAL*/
00059 
00061    void SetLogLevel(MsgLevel level) { fLogLevel = level; }
00062 
00064    void SetLogFile(std::ostream& os);
00065 
00066 private:
00067 
00073    enum GuiStatus {
00074       QGuiBlockedStatus, 
00075       QGuiIdleStatus,    
00076       QGuiRunningStatus, 
00077    };
00078 
00079    Int_t fRun; 
00080    Int_t fBasket; 
00081    std::string fRunType;  
00082    QGUIDataCollector *fCollector; 
00083    QGuiScope *fScope; 
00084    QGUIHistogramDisplay *fMonitor; 
00085    MsgLevel fLogLevel; 
00086    GuiStatus fGuiStatus; 
00088    std::ostream *fLogFile; 
00090    TTimer *fTimer; 
00093    std::pair<std::string, std::string> fAuthInfo;
00094 
00095    TGTextButton *fStartStopButton; 
00096    TGTextButton *fQuitButton;      
00097    TGTextButton *fMonitorButton;   
00098    TGTextButton *fScopeButton;     
00100    TGTextView *fLogger; 
00102    TGStatusBar *fStatusBar;        
00103    const Int_t kStatusBarHeight;   
00106    void CreateFrames();
00107 
00109    void MakeConnections();
00110 
00112    void UpdateDaqStatus();
00113 
00115    void SetFormattedMessage(const std::string& message,
00116                             MsgLevel level = InfoMsg);
00117    
00119    void SetFormattedMessage(const QLogInfo& info);
00120 
00122    void SetMessage(const std::string& message);
00123 
00125    void UpdateGuiStatus();
00126 
00128    void UpdateStatusBar();
00129 
00131    void StartUpdateTimer();
00132 
00134    Bool_t StartRun();
00135 
00137    Bool_t StopRun();
00138 
00140    void CheckAuth();
00141 
00143    void UpdateAuth();
00144 
00146    Bool_t Authenticate();
00147 
00148    ClassDef(QGuiControlWindow, 0)
00149 };
00150 #endif

Generated on Tue Nov 16 10:49:54 2010 for CUORE Software by  doxygen 1.5.6