Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014 #ifndef TGO4MAINWINDOW_H
00015 #define TGO4MAINWINDOW_H
00016
00017 #include <QMainWindow>
00018
00019 #include <QCloseEvent>
00020
00021 class QApplication;
00022
00023 class QGo4Widget;
00024 class TGo4FitPanel;
00025 class TGo4ParaEdit;
00026 class TGo4HistogramInfo;
00027 class TGo4ConditionInfo;
00028 class TGo4EditDynEntry;
00029 class TGo4EventInfo;
00030 class TGo4ConditionEditor;
00031 class TGo4AnalysisConfiguration;
00032 class TGo4AnalysisWindow;
00033 class TGo4AnalysisStatusMonitor;
00034 class TGo4SetScaleValues;
00035
00036 class TGo4MdiArea;
00037 class TGo4ViewPanel;
00038 class TPad;
00039 class TGo4Slot;
00040 class TGo4ObjectManager;
00041 class TGo4AnalysisProxy;
00042 class TGo4BrowserProxy;
00043 class TGo4WidgetProxy;
00044
00045 class QAction;
00046 class QSignalMapper;
00047 class QMenu;
00048
00054 class TGo4MainWindow : public QMainWindow {
00055 Q_OBJECT
00056
00057 public:
00058 TGo4MainWindow(QApplication*);
00059 virtual ~TGo4MainWindow();
00060
00061 void HotStart(const char* fname);
00062 void ProcessQtEvents();
00063 void StatusMessage(const QString& mess);
00064 const char* LastTypedPassword() const;
00065 TGo4ViewPanel* FindViewPanel(const char* name);
00066 TGo4ViewPanel* DisplayBrowserItem(const char* itemname, TGo4ViewPanel* panel, TPad* pad, bool activate, int updatelevel, const char* drawopt);
00067
00068 TGo4ObjectManager* OM();
00069 TGo4BrowserProxy* Browser();
00070
00071 public slots:
00072
00073 void about();
00074 void aboutQt();
00075 void aboutROOT();
00076 void aboutDABC();
00077 void windowsMenuAboutToShow();
00078 void UserPanelSlot();
00079 TGo4ViewPanel* MakeNewPanel(int div = 0);
00080 void LoadLibrarySlot();
00081 void CloseAllFilesSlot();
00082 void OpenFileSlot();
00083 void OpenRemoteFileSlot();
00084 void ConnectDabcSlot();
00085 void ConnectHServerSlot();
00086 void SaveFileSlot();
00087 void CascadeSubWindows();
00088
00089 void InputTerminalParametersSlot();
00090 void LogSettingsSlot();
00091
00092 void IntroHelpSlot();
00093 void RefHelpSlot();
00094 void FitHelpSlot();
00095 void MinAllWindows();
00096 void ToggleFullScreenSlot();
00097 void SaveSettingsSlot();
00098 void ChangeFontSlot();
00099 void ChangeTerminalFontSlot();
00100 void SetStyleSlot(const QString&);
00101 void windowsMenuActivated( int id );
00102 void ForseCloseSlot();
00103
00104 void ChangeFetchWhenDrawSlot();
00105 void ChangeFetchWhenCopySlot();
00106 void ChangeFetchWhenSaveSlot();
00107 void ChangeHideEventElement();
00108 void ChangeDrawOnceSlot();
00109
00110 void CanvasColorSlot();
00111 void CrosshairSlot();
00112 void EventStatusSlot();
00113 void MarkerSettingsSlot();
00114 void OptStatsSlot();
00115 void ChangeCloneFlagSlot();
00116 void ChangeDrawTimeFlagSlot();
00117 void ChangeDrawDateFlagSlot();
00118 void ChangeDrawItemFlagSlot();
00119
00120 void TH1DrawOptSlot();
00121 void TH2DrawOptSlot();
00122 void TH3DrawOptSlot();
00123 void TGraphDrawOptSlot();
00124 void GStyleStatFormatSlot();
00125
00126 void PrepareForClientConnectionSlot(bool interactive = true);
00127 void LaunchClientSlot(bool interactive = true);
00128 void ConnectServerSlot(bool interactive = true, const char* password = "");
00129 void DisconnectAnalysisSlot(bool interactive = true);
00130 void ShutdownAnalysisSlot(bool interactive = true);
00131 void ToggleAnalysisConfiguration();
00132 void ToggleAnalysisWindow();
00133 void CloseAnalysisWindow();
00134
00135 void SubmitAnalysisSettings();
00136 void SubmitStartAnalysisSlot();
00137 void StartAnalysisSlot();
00138 void StopAnalysisSlot();
00139
00140 void CreateNewHistSlot(int isremote = -1);
00141 void CreateNewConditionSlot(bool forothereditor = false);
00142 void CreateNewDynEntrySlot(bool forothereditor = false);
00143
00144
00145 TGo4FitPanel* StartFitPanel();
00146 TGo4ParaEdit* StartParaEdit(const char* itemname = 0);
00147 TGo4HistogramInfo* StartHistogramInfo();
00148 TGo4ConditionInfo* StartConditionInfo();
00149 TGo4EditDynEntry* StartEditDynEntry();
00150 TGo4EventInfo* StartEventInfo();
00151 TGo4ConditionEditor* StartConditionEditor();
00152
00153 TGo4AnalysisConfiguration* FindAnalysisConfiguration();
00154 TGo4AnalysisWindow* FindAnalysisWindow();
00155
00156
00157 void editorServiceSlot(QGo4Widget* editor, int serviceid, const char* str, void* par);
00158
00159 void ProcessHotStart();
00160 void StopGUIScriptSlot();
00161 void CreateGUIScriptSlot();
00162 void CheckConnectingCounterSlot();
00163 void checkPanelRepaintSlot();
00164
00165 protected:
00166
00167 void AddAnalysisBar();
00168 void AddAnalysisMenu();
00169 void AddFileMenu();
00170 void AddFileToolBar();
00171 void AddSettingMenu();
00172 void AddToolsBar();
00173 void AddToolsMenu();
00174
00175 virtual void closeEvent( QCloseEvent * ce );
00176
00177 void ConnectGo4Widget(QGo4Widget* editor);
00178
00179 void CascadeMdiPosition(QWidget* sub);
00180
00181 void UpdateCaptionButtons();
00182
00183 bool startUserGUI(const char*);
00184 TGo4AnalysisProxy* AddAnalysisProxy(bool isserver, bool needoutput);
00185 bool RemoveAnalysisProxy(int waittime = 30, bool servershutdown = false);
00186 TGo4AnalysisStatusMonitor* EstablishRatemeter(int level);
00187 TGo4AnalysisConfiguration* EstablishAnalysisConfiguration(int level);
00188
00189 QGo4Widget* FindGo4Widget(const char* name, bool activate);
00190 TGo4Slot* GetWidgetTopSlot(QGo4Widget* widget, bool force);
00191
00192 bool SaveBrowserItemToFile(const char* itemname, const char* subfolder);
00193
00194 void UpdateDockAnalysisWindow();
00195 void TerminateAnalysis(bool interactive = true);
00196
00197 void ToggleMbsMonitor(const char* nodename);
00198 TGo4SetScaleValues* ToggleScaleValues();
00199
00200 void SavePanelCanvas(TGo4ViewPanel* panel);
00201
00202 void HelpWindow(const char* filename, const char* msg = 0);
00203
00204 void UpdateBrowser();
00205
00206 QApplication* fApp;
00207
00208 QMenu* windowsMenu;
00209 QSignalMapper* winMapper;
00210 TGo4MdiArea* fxMdiArea;
00211
00212 TGo4ObjectManager* fxOM;
00213 QString fOMDataPath;
00214 QString fOMBrowserPath;
00215 QString fOMEditorsPath;
00216
00217 QString fKillCommand;
00218
00219 int fNewWidgetX;
00220 int fNewWidgetY;
00221
00222 int fCloseCounter;
00223 int fConnectingCounter;
00224 QString fLastPassword;
00225 QString fLastFileDir;
00226
00227 bool fbPanelTimerActive;
00228 bool fbFullScreen;
00229
00230 QAction* faFetchWhenDraw;
00231 QAction* faFetchWhenCopy;
00232 QAction* faFetchWhenSave;
00233 QAction* faHideEventElement;
00234 QAction* faDrawOnce;
00235
00236 QAction* faCrosshair;
00237 QAction* faEventstatus;
00238 QAction* faClone;
00239 QAction* faDrawTime;
00240 QAction* faDrawDate;
00241 QAction* faDrawItem;
00242
00243 QAction* faLaunchAnal;
00244 QAction* faConnectAnal;
00245 QAction* faPrepareAnal;
00246 QAction* faDisconnectAnal;
00247 QAction* faShutdownAnal;
00248 QAction* faSumbStartAnal;
00249 QAction* faStartAnal;
00250 QAction* faStopAnal;
00251 QAction* faAnalConfig;
00252 QAction* faAnalTermin;
00253 };
00254
00255 #endif