GSI Object Oriented Online Offline (Go4) GO4-6.4.0
Loading...
Searching...
No Matches
TGo4MainWindow.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 TGO4MAINWINDOW_H
15#define TGO4MAINWINDOW_H
16
17#include <QMainWindow>
18
19class QGo4Widget;
20class TGo4FitPanel;
21class TGo4ParaEdit;
25class TGo4EventInfo;
31
32class TGo4MdiArea;
33class TGo4ViewPanel;
34class TPad;
35class TGo4Slot;
37class TGo4Style;
40class TGo4WidgetProxy;
41class TGo4ServerProxy;
42
43class QAction;
44class QMenu;
45class QSpinBox;
46class QPushButton;
47class QCloseEvent;
48class QApplication;
49
54
55class TGo4MainWindow : public QMainWindow {
56 Q_OBJECT
57
58 public:
59 TGo4MainWindow(QApplication*);
60 virtual ~TGo4MainWindow();
61
62 void HotStart(const char *fname);
63 void ProcessQtEvents();
64 void StatusMessage(const QString& mess);
65 const char *LastTypedPassword() const;
66 TGo4ViewPanel *FindViewPanel(const char *name);
67 TGo4ViewPanel *DisplayBrowserItem(const char *itemname, TGo4ViewPanel *panel, TPad *pad, bool activate, int updatelevel, const char *drawopt);
68
69 TGo4ServerProxy *ConnectHttpServer(const char *addr = nullptr, const char *user = nullptr, const char *pass = nullptr, bool with_qt_process = false, bool get_analysis_config = false);
70 void ConnectServer(bool interactive = true, const char *password = "");
71 void PrepareForClientConnection(bool interactive = true);
72 void LaunchClient(bool interactive = true);
73 void DisconnectAnalysis(bool interactive = true);
74 void ShutdownAnalysis(bool interactive = true);
75
76 TGo4AnalysisWindow* EstablishAnalysisWindow(bool needoutput, bool withkillbnt = false, bool force_recreate = false);
80
81 // starting editors
82 TGo4ViewPanel *MakeNewPanel(int div = 0);
84 TGo4ParaEdit* StartParaEdit(const char *itemname = nullptr);
90
91 void CreateNewHist(int isremote = -1);
92 void CreateNewCondition(bool forothereditor = false);
93 void CreateNewDynEntry(bool forothereditor = false);
94
97
98 public slots:
99
100 void about();
101 void aboutQt();
102 void aboutROOT();
103 void aboutDABC();
105 void UserPanelSlot();
106 void LoadLibrarySlot();
107 void CloseAllFilesSlot();
108 void OpenFileSlot();
109 void OpenRemoteFileSlot();
110 void ConnectDabcSlot();
111 void ConnectHttpSlot();
112 void ConnectHServerSlot();
113 void ImportObjectSlot();
114 void SaveFileSlot();
115 void CascadeSubWindows();
116
118 void LogSettingsSlot();
119
120 void IntroHelpSlot();
121 void RefHelpSlot();
122 void FitHelpSlot();
123 void MinAllWindows();
125 void SaveSettingsSlot();
126 void ChangeFontSlot();
128 void SetStyleSlot(const QString&);
129 void ForseCloseSlot();
130
131 void ChangeFetchWhenDrawSlot(bool);
132 void ChangeFetchWhenCopySlot(bool);
133 void ChangeFetchWhenSaveSlot(bool);
134 void ChangeHideEventElement(bool);
135 void ChangeDrawOnceSlot(bool);
137 void ChangeNativeMenuBarSlot(bool);
138
139 void CanvasColorSlot();
140 void SuperimposeSlot(bool);
141 void CrosshairSlot(bool);
142 void EventStatusSlot(bool);
143 void MarkerSettingsSlot();
144 void OptStatsSlot();
145 void ChangeCloneFlagSlot(bool);
146 void ChangeDrawTimeFlagSlot(bool);
147 void ChangeDrawDateFlagSlot(bool);
148 void ChangeDrawItemFlagSlot(bool);
150
153
154 void DrawLineWidthSlot();
155 void DrawFillColorSlot();
156 void DrawFillStyleSlot();
157
158 void TH1DrawOptSlot();
159 void TH2DrawOptSlot();
160 void TH3DrawOptSlot();
161 void TGraphDrawOptSlot();
163 void PaletteSettingsSlot();
164
167 void CloseAnalysisWindow();
168
171 void StartAnalysisSlot();
172 void StopAnalysisSlot();
173
174 // modify default high-dpi scaling
175 void ScaleFactorSlot();
176
177 // slots connected to editors
178 void editorServiceSlot(QGo4Widget* editor, int serviceid, const char *str, void *par);
179
180 void ProcessHotStart();
181 void StopGUIScriptSlot();
182 void CreateGUIScriptSlot();
185
186 protected:
187
188 void ShowAboudDialog(const QString &title, const QString &text, const QString &icon);
189
190 void AddAnalysisBar();
191 void AddAnalysisMenu();
192 void AddFileMenu();
193 void AddFileToolBar();
194 void AddSettingMenu();
195 void AddToolsBar();
196 void AddToolsMenu();
197
199
200 void closeEvent(QCloseEvent *ce) override;
201
202 void ConnectGo4Widget(QGo4Widget *editor);
203
204 void CascadeMdiPosition(QWidget *sub);
205
206 void WindowActivated(int id);
207
209
210 bool startUserGUI(const char *);
211 TGo4AnalysisProxy *AddAnalysisProxy(bool isserver, bool needoutput);
212 bool RemoveAnalysisProxy(int waittime = 30, bool servershutdown = false);
215
216 QGo4Widget *FindGo4Widget(const char *name, bool activate);
217 TGo4Slot *GetWidgetTopSlot(QGo4Widget *widget, bool force);
218
219 bool SaveBrowserItemToFile(const char *itemname, const char *subfolder);
220
222 void TerminateAnalysis(bool interactive = true);
223
224 void ToggleMbsMonitor(const char *nodename);
226
227 void SavePanelCanvas(TGo4ViewPanel *panel);
228
229 void HelpWindow(const char *filename, const char *msg = nullptr);
230
231 void UpdateBrowser();
232
233 QApplication* fApp{nullptr};
234
235 QMenu* windowsMenu{nullptr};
239 QString fOMDataPath;
242
244
247
249 int fConnectingCounter{0}; // counter to establish connection
250 bool fbGetAnalysisConfig{false}; // flag to decide if we want to have analysis config after connect
251 QString fConnectingHttp; // http address (set when doing connection to http)
254
256 bool fbFullScreen{false};
257
258 QAction* faWebCanvas{nullptr};
259 QAction* faSuperimpose{nullptr};
260 QAction* faCrosshair{nullptr};
261 QAction* faEventstatus{nullptr};
262 QAction* faDrawTime{nullptr};
263 QAction* faDrawDate{nullptr};
264 QAction* faDrawItem{nullptr};
265
266 QAction* faLaunchAnal{nullptr};
267 QAction* faConnectAnal{nullptr};
268 QAction* faPrepareAnal{nullptr};
269 QAction* faDisconnectAnal{nullptr};
270 QAction* faShutdownAnal{nullptr};
271 QAction* faSumbStartAnal{nullptr};
272 QAction* faStartAnal{nullptr};
273 QAction* faStopAnal{nullptr};
274 QAction* faAnalConfig{nullptr};
275 QAction* faAnalTermin{nullptr};
276};
277
278#endif
TGo4AnalysisWindow * EstablishAnalysisWindow(bool needoutput, bool withkillbnt=false, bool force_recreate=false)
TGo4BrowserProxy * Browser()
void CheckConnectingCounterSlot()
TGo4AnalysisConfiguration * FindAnalysisConfiguration()
void HotStart(const char *fname)
QAction * faDrawTime
QAction * faWebCanvas
bool RemoveAnalysisProxy(int waittime=30, bool servershutdown=false)
void SetStyleSlot(const QString &)
TGo4Style * fxStyle
TGo4FitPanel * StartFitPanel()
void StatusMessage(const QString &mess)
void ShowAboudDialog(const QString &title, const QString &text, const QString &icon)
void PrepareForClientConnection(bool interactive=true)
void ChangeDrawItemFlagSlot(bool)
QAction * faSuperimpose
TGo4EventInfo * StartEventInfo()
void ChangeNativeMenuBarSlot(bool)
void LaunchClient(bool interactive=true)
void TerminateAnalysis(bool interactive=true)
void CreateNewHist(int isremote=-1)
TGo4EditDynEntry * StartEditDynEntry()
QAction * faAnalTermin
void ChangeCloneFlagSlot(bool)
QAction * faDrawDate
virtual ~TGo4MainWindow()
TGo4ObjectManager * fxOM
TGo4MdiArea * fxMdiArea
QAction * faCrosshair
QAction * faConnectAnal
QGo4Widget * FindGo4Widget(const char *name, bool activate)
TGo4ViewPanel * FindViewPanel(const char *name)
QAction * faAnalConfig
TGo4HistogramInfo * StartHistogramInfo()
void DisconnectAnalysis(bool interactive=true)
TGo4AnalysisConfiguration * EstablishAnalysisConfiguration(int level)
void EstablishAnalysisWindowForHttp()
void ChangeFetchWhenSaveSlot(bool)
TGo4ParaEdit * StartParaEdit(const char *itemname=nullptr)
TGo4AnalysisStatusMonitor * EstablishRatemeter(int level)
QApplication * fApp
QAction * faPrepareAnal
void windowsMenuAboutToShow()
QAction * faEventstatus
void ChangeDrawDateFlagSlot(bool)
void ChangeWindowRubberBandSlot(bool)
void CreateNewDynEntry(bool forothereditor=false)
const char * LastTypedPassword() const
void CascadeMdiPosition(QWidget *sub)
void ChangeSaveWhiteBackgroundSlot(bool)
TGo4ConditionEditor * StartConditionEditor()
void ChangeDrawTimeFlagSlot(bool)
void CreateNewCondition(bool forothereditor=false)
void EventStatusSlot(bool)
void ChangeDrawOnceSlot(bool)
QAction * faStopAnal
QAction * faSumbStartAnal
void ConnectGo4Widget(QGo4Widget *editor)
TGo4ViewPanel * DisplayBrowserItem(const char *itemname, TGo4ViewPanel *panel, TPad *pad, bool activate, int updatelevel, const char *drawopt)
void ChangeFetchWhenCopySlot(bool)
void InputTerminalParametersSlot()
bool startUserGUI(const char *)
void UpdateDockAnalysisWindow()
QAction * faLaunchAnal
void HelpWindow(const char *filename, const char *msg=nullptr)
void SavePanelCanvas(TGo4ViewPanel *panel)
QAction * faShutdownAnal
TGo4Slot * GetWidgetTopSlot(QGo4Widget *widget, bool force)
TGo4ConditionInfo * StartConditionInfo()
void closeEvent(QCloseEvent *ce) override
QAction * faStartAnal
void SuperimposeSlot(bool)
void ChangeTerminalTimeStampSlot(bool)
TGo4ViewPanel * MakeNewPanel(int div=0)
TGo4MainWindow(QApplication *)
void WindowActivated(int id)
void ConnectServer(bool interactive=true, const char *password="")
bool SaveBrowserItemToFile(const char *itemname, const char *subfolder)
TGo4AnalysisProxy * AddAnalysisProxy(bool isserver, bool needoutput)
void ToggleMbsMonitor(const char *nodename)
void ChangeTerminalTimeStampFormatSlot()
TGo4ServerProxy * ConnectHttpServer(const char *addr=nullptr, const char *user=nullptr, const char *pass=nullptr, bool with_qt_process=false, bool get_analysis_config=false)
void ChangeFetchWhenDrawSlot(bool)
TGo4SetScaleValues * ToggleScaleValues()
QAction * faDisconnectAnal
void ShutdownAnalysis(bool interactive=true)
void editorServiceSlot(QGo4Widget *editor, int serviceid, const char *str, void *par)
QString fConnectingHttp
TGo4ObjectManager * OM()
TGo4AnalysisWindow * FindAnalysisWindow()
QAction * faDrawItem
void ChangeHideEventElement(bool)
void CrosshairSlot(bool)
void ToggleAnalysisConfiguration()
special base class for remote data servers like DABC, HTTP, hist server