00001 //------------------------------------------------------------- 00002 // Go4 Release Package v3.04-01 (build 30401) 00003 // 28-November-2008 00004 //--------------------------------------------------------------- 00005 // The GSI Online Offline Object Oriented (Go4) Project 00006 // Experiment Data Processing at EE 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 TGO4ANALYSISWINDOW_H 00017 #define TGO4ANALYSISWINDOW_H 00018 00023 #include "QGo4Widget.h" 00024 00025 class QProcess; 00026 class QGo4CommandsHistory; 00027 class QTextEdit; 00028 class QHBoxLayout; 00029 00030 class TGo4AnalysisWindow : public QGo4Widget { 00031 Q_OBJECT 00032 00033 public: 00034 TGo4AnalysisWindow( QWidget* parent = 0, const char* name = 0, bool needoutput = false, bool needkillbtn = true); 00035 virtual ~TGo4AnalysisWindow(); 00036 00037 void SetHistorySize(int sz); 00038 void StartAnalysisShell(const char* text); 00039 void TerminateAnalysisProcess(); 00040 void AppendOutputBuffer(const QString& value); 00041 void WorkWithUpdateObjectCmd(TGo4Slot* slot); 00042 void WaitForNewObject(bool isobjectforeditor); 00043 00044 bool HasOutput(); 00045 00046 public slots: 00047 void readFromStdout(); 00048 void readFromStderr(); 00049 void scrollToTop(); 00050 void RequestTerminate(); 00051 void ClearAnalysisOutput(); 00052 void SaveAnalysisOutput(); 00053 void HistActivated(const QString& str); 00054 void FileDialog_Macro(); 00055 void PrintHistograms(); 00056 void PrintConditions(); 00057 void PrintEvent(); 00058 00059 void updateTerminalOutput(); 00060 00061 protected: 00062 00063 virtual void linkedObjectUpdated(const char* linkname, TObject* obj); 00064 virtual void linkedObjectRemoved(const char* linkname); 00065 00066 void CreateButtons(QHBoxLayout*, bool); 00067 void CreateCmdLine(QHBoxLayout*); 00068 00069 QProcess *fAnalysisProcess; 00070 QGo4CommandsHistory *fxCmdHist; 00071 QString outputBuffer; 00072 QTextEdit* fxOutput; 00073 unsigned int fiMaxOuputSize; 00074 bool fNewObjectForEditor; 00075 }; 00076 00077 #endif // TGO4ANALYSISWINDOW_H 00078 00079 //----------------------------END OF GO4 SOURCE FILE ---------------------