00001 // $Id: TGo4AnalysisWindow.h 1148 2014-01-29 16:37:17Z linev $ 00002 //----------------------------------------------------------------------- 00003 // The GSI Online Offline Object Oriented (Go4) Project 00004 // Experiment Data Processing at EE department, GSI 00005 //----------------------------------------------------------------------- 00006 // Copyright (C) 2000- GSI Helmholtzzentrum für Schwerionenforschung GmbH 00007 // Planckstr. 1, 64291 Darmstadt, Germany 00008 // Contact: http://go4.gsi.de 00009 //----------------------------------------------------------------------- 00010 // This software can be used under the license agreements as stated 00011 // in Go4License.txt file which is part of the distribution. 00012 //----------------------------------------------------------------------- 00013 00014 #ifndef TGO4ANALYSISWINDOW_H 00015 #define TGO4ANALYSISWINDOW_H 00016 00021 #include "QGo4Widget.h" 00022 00023 class QProcess; 00024 class QGo4CommandsHistory; 00025 class QTextEdit; 00026 class QHBoxLayout; 00027 00028 class TGo4AnalysisWindow : public QGo4Widget { 00029 Q_OBJECT 00030 00031 public: 00032 TGo4AnalysisWindow( QWidget* parent = 0, const char* name = 0, bool needoutput = false, bool needkillbtn = true); 00033 virtual ~TGo4AnalysisWindow(); 00034 00035 void SetHistorySize(int sz); 00036 void StartAnalysisShell(const char* cmd, const char* workdir = 0); 00037 void TerminateAnalysisProcess(); 00038 void AppendOutputBuffer(const QString& value); 00039 void WorkWithUpdateObjectCmd(TGo4Slot* slot); 00040 void WaitForNewObject(bool isobjectforeditor); 00041 00042 bool HasOutput(); 00043 00044 public slots: 00045 void readFromStdout(); 00046 void readFromStderr(); 00047 void RequestTerminate(); 00048 void ClearAnalysisOutput(); 00049 void SaveAnalysisOutput(); 00050 void FileDialog_Macro(); 00051 void PrintHistograms(); 00052 void PrintConditions(); 00053 void PrintEvent(); 00054 void CommandSlot(); 00055 00056 void updateTerminalOutput(); 00057 00058 protected: 00059 00060 virtual void linkedObjectUpdated(const char* linkname, TObject* obj); 00061 virtual void linkedObjectRemoved(const char* linkname); 00062 00063 virtual void resizeEvent(QResizeEvent *); 00064 00065 void CreateButtons(QHBoxLayout*, bool); 00066 void CreateCmdLine(QHBoxLayout*); 00067 00068 QProcess *fAnalysisProcess; 00069 QGo4CommandsHistory *fxCmdHist; 00070 QString outputBuffer; 00071 QTextEdit* fxOutput; 00072 unsigned int fiMaxOuputSize; 00073 bool fNewObjectForEditor; 00074 }; 00075 00076 #endif // TGO4ANALYSISWINDOW_H