GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
TGo4AnalysisWindow.h
Go to the documentation of this file.
1// $Id$
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
20
21#include "QGo4Widget.h"
22
23class QProcess;
25class QTextEdit;
26class QHBoxLayout;
27
29 Q_OBJECT
30
31 public:
32 TGo4AnalysisWindow(QWidget *parent = nullptr, const char *name = nullptr, bool needoutput = false, bool needkillbtn = true);
33 virtual ~TGo4AnalysisWindow();
34
35 void SetHistorySize(int sz);
36 void StartAnalysisShell(const char *cmd, const char *workdir = nullptr, bool aschildprocess = false);
38 void AppendOutputBuffer(const QString& value, int prio = 0);
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();
56 void SaveAnalysisOutput();
57 void FileDialog_Macro();
58 void PrintHistograms();
59 void PrintConditions();
60 void PrintEvent();
61 void CommandSlot();
62
64
65 protected:
66
67 void linkedObjectUpdated(const char *linkname, TObject *obj) override;
68 void linkedObjectRemoved(const char *linkname) override;
69
70 void resizeEvent(QResizeEvent *) override;
71 void closeEvent(QCloseEvent* e) override;
72 void CreateButtons(QHBoxLayout*, bool);
73 void CreateCmdLine(QHBoxLayout*);
74
77 void AddTimeStamp(QString& buf, int prio = 0);
78
79 QProcess *fAnalysisProcess{nullptr};
81 QString outputBuffer;
82 QTextEdit* fxOutput{nullptr};
83 unsigned int fiMaxOuputSize{0};
84 bool fbShowTimestamps{false};
85 QString fxTimeFormat;
87 bool fHasLink{false};
88 bool fTerminateOnClose{false};
89};
90
91#endif // TGO4ANALYSISWINDOW_H
QGo4Widget(QWidget *parent=nullptr, const char *name=nullptr, Qt::WindowFlags f=Qt::Widget)
void closeEvent(QCloseEvent *e) override
static void ExtractProgArgs(QString &prog, QStringList &args)
bool TerminateOnClose() const
void AppendOutputBuffer(const QString &value, int prio=0)
void resizeEvent(QResizeEvent *) override
void CreateCmdLine(QHBoxLayout *)
unsigned int fiMaxOuputSize
void WorkWithUpdateObjectCmd(TGo4Slot *slot)
QGo4CommandsHistory * fxCmdHist
void linkedObjectUpdated(const char *linkname, TObject *obj) override
void linkedObjectRemoved(const char *linkname) override
void WaitForNewObject(bool isobjectforeditor)
void AddTimeStamp(QString &buf, int prio=0)
prepend timestamp in front of next terminal buffer.
void CreateButtons(QHBoxLayout *, bool)
void WorkWithDebugOutput(TGo4Slot *slot)
void StartAnalysisShell(const char *cmd, const char *workdir=nullptr, bool aschildprocess=false)
TGo4AnalysisWindow(QWidget *parent=nullptr, const char *name=nullptr, bool needoutput=false, bool needkillbtn=true)