GSI Object Oriented Online Offline (Go4)  GO4-6.2.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
TGo4AnalysisWindow.h
Go to the documentation of this file.
1 // $Id: TGo4AnalysisWindow.h 3138 2021-03-30 12:25:16Z linev $
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 fuer 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  static void ExtractProgArgs(QString &prog, QStringList &args);
49 
50  public slots:
51  void readFromStdout();
52  void readFromStderr();
53  void RequestTerminate();
54  void ClearAnalysisOutput();
56  void SaveAnalysisOutput();
57  void FileDialog_Macro();
58  void PrintHistograms();
59  void PrintConditions();
60  void PrintEvent();
61  void CommandSlot();
62 
63  void updateTerminalOutput();
64 
65  protected:
66 
67  virtual void linkedObjectUpdated(const char* linkname, TObject* obj);
68  virtual void linkedObjectRemoved(const char* linkname);
69 
70  virtual void resizeEvent(QResizeEvent *);
71  virtual void closeEvent(QCloseEvent* e);
72  void CreateButtons(QHBoxLayout*, bool);
73  void CreateCmdLine(QHBoxLayout*);
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
static void ExtractProgArgs(QString &prog, QStringList &args)
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)