GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4AnalysisWindow.h
Go to the documentation of this file.
1 // $Id: TGo4AnalysisWindow.h 1989 2017-02-24 11:45:30Z adamczew $
2 //-----------------------------------------------------------------------
3 // The GSI Online Offline Object Oriented (Go4) Project
4 // Experiment Data Processing at EE department, GSI
5 //-----------------------------------------------------------------------
6 // Copyright (C) 2000- GSI Helmholtzzentrum für Schwerionenforschung GmbH
7 // Planckstr. 1, 64291 Darmstadt, Germany
8 // Contact: http://go4.gsi.de
9 //-----------------------------------------------------------------------
10 // This software can be used under the license agreements as stated
11 // in Go4License.txt file which is part of the distribution.
12 //-----------------------------------------------------------------------
13 
14 #ifndef TGO4ANALYSISWINDOW_H
15 #define TGO4ANALYSISWINDOW_H
16 
21 #include "QGo4Widget.h"
22 
23 class QProcess;
25 class QTextEdit;
26 class QHBoxLayout;
27 
29  Q_OBJECT
30 
31  public:
32  TGo4AnalysisWindow( QWidget* parent = 0, const char* name = 0, bool needoutput = false, bool needkillbtn = true);
33  virtual ~TGo4AnalysisWindow();
34 
35  void SetHistorySize(int sz);
36  void StartAnalysisShell(const char* cmd, const char* workdir = 0, bool aschildprocess = false);
38  void AppendOutputBuffer(const QString& value, int prio=0);
39  void UpdateTimeStampFormat();
41  void WorkWithDebugOutput(TGo4Slot* slot);
42  void WaitForNewObject(bool isobjectforeditor);
43 
44  bool HasOutput();
45  bool HasLink() const { return fHasLink; }
46  bool TerminateOnClose() const { return fTerminateOnClose; }
47 
48  public slots:
49  void readFromStdout();
50  void readFromStderr();
51  void RequestTerminate();
52  void ClearAnalysisOutput();
54  void SaveAnalysisOutput();
55  void FileDialog_Macro();
56  void PrintHistograms();
57  void PrintConditions();
58  void PrintEvent();
59  void CommandSlot();
60 
61  void updateTerminalOutput();
62 
63  protected:
64 
65  virtual void linkedObjectUpdated(const char* linkname, TObject* obj);
66  virtual void linkedObjectRemoved(const char* linkname);
67 
68  virtual void resizeEvent(QResizeEvent *);
69  virtual void closeEvent(QCloseEvent* e);
70  void CreateButtons(QHBoxLayout*, bool);
71  void CreateCmdLine(QHBoxLayout*);
72 
73 
74 
77  void AddTimeStamp(QString& buf, int prio=0);
78 
79  QProcess *fAnalysisProcess;
81  QString outputBuffer;
82  QTextEdit* fxOutput;
83  unsigned int fiMaxOuputSize;
85  QString fxTimeFormat;
87  bool fHasLink;
89 };
90 
91 #endif // TGO4ANALYSISWINDOW_H
void CreateCmdLine(QHBoxLayout *)
void AddTimeStamp(QString &buf, int prio=0)
QGo4CommandsHistory * fxCmdHist
virtual void resizeEvent(QResizeEvent *)
void StartAnalysisShell(const char *cmd, const char *workdir=0, bool aschildprocess=false)
virtual void closeEvent(QCloseEvent *e)
TGo4AnalysisWindow(QWidget *parent=0, const char *name=0, bool needoutput=false, bool needkillbtn=true)
void WorkWithDebugOutput(TGo4Slot *slot)
bool TerminateOnClose() const
void WorkWithUpdateObjectCmd(TGo4Slot *slot)
virtual void linkedObjectUpdated(const char *linkname, TObject *obj)
virtual void linkedObjectRemoved(const char *linkname)
unsigned int fiMaxOuputSize
void AppendOutputBuffer(const QString &value, int prio=0)
void CreateButtons(QHBoxLayout *, bool)
void WaitForNewObject(bool isobjectforeditor)