00001 //--------------------------------------------------------------- 00002 // Go4 Release Package v2.10-5 (build 21005) 00003 // 03-Nov-2005 00004 //--------------------------------------------------------------- 00005 // The GSI Online Offline Object Oriented (Go4) Project 00006 // Experiment Data Processing at DVEE department, GSI 00007 //--------------------------------------------------------------- 00008 // 00009 //Copyright (C) 2000- Gesellschaft f. Schwerionenforschung, GSI 00010 // Planckstr. 1, 64291 Darmstadt, Germany 00011 //Contact: http://go4.gsi.de 00012 //---------------------------------------------------------------- 00013 //This software can be used under the license agreements as stated 00014 //in Go4License.txt file which is part of the distribution. 00015 //---------------------------------------------------------------- 00016 #ifndef TGO4MAINWINDOW_H 00017 #define TGO4MAINWINDOW_H 00018 #include "qmainwindow.h" 00019 00020 class TGo4FitPanel; 00021 class TGo4DockBrowsers; 00022 class QPopupMenu; 00023 class TGo4WorkSpace; 00024 class TGo4GUIRegistry; 00025 class TGo4HisDrawOptions; 00026 class TGo4ScaleOptions; 00027 class TGo4DividePad; 00028 class TGo4PreviewPanel; 00029 class TGo4Style; 00030 class TGo4QDockWindow; 00031 class TGo4AnalysisWindow; 00032 class TGo4AnalysisStatusMonitor; 00033 class TGo4LogInfo; 00034 class TGo4TreeViewer; 00035 class TGo4WindowEditSlots; 00036 class TGo4HistogramInfo; 00037 class TGo4ConditionInfo; 00038 class TPad; 00039 class TList; 00040 class TIterator; 00041 class TH1; 00042 00049 class TGo4MainWindow : public QMainWindow { 00050 Q_OBJECT 00051 00052 public: 00053 TGo4MainWindow( QWidget* parent = 0, const char* name = 0, WFlags fl = WType_TopLevel, bool local=false ); 00054 virtual ~TGo4MainWindow(); 00055 00056 void init(); 00057 void HotStart(const char* fname); 00058 00059 TGo4DockBrowsers* DockBrowsers() const { return fxTGo4DockBrowsers; } 00060 TGo4AnalysisWindow* AnalysisShell() const { return fxAnalysisShell; } 00061 00063 bool CheckHistogram(const char* name, TH1* hist); 00064 00066 bool CheckViewpanel(TGo4PreviewPanel* pan); 00067 00068 void RememberViewpanelSize(TGo4PreviewPanel *fxView); 00069 void StatusMessage(const QString& mess); 00070 00071 void CloseFitPanel() { fxTGo4FitPanel=0; } 00072 00073 void RegisterWindowEditSlots(TGo4WindowEditSlots* slot); 00074 void UnregisterWindowEditSlots(TGo4WindowEditSlots* slot); 00075 00076 void ShowAnylsisOutput(const char* commandline); 00077 00078 static QPixmap uic_load_pixmap( const QString &name ); 00079 00080 public slots: 00081 00082 void about(); 00083 void aboutQt(); 00084 void aboutROOT(); 00085 void windowsMenuAboutToShow(); 00086 void ActivePadChanged(TGo4PreviewPanel *fxView, TPad *Pad); 00087 void MouseClick(TGo4PreviewPanel* view, TPad* pad); 00088 void AddAnalysisBar(); 00089 void AddAnalysisMenu(); 00090 void AddDrawBar(); 00091 void AddFileMenu(); 00092 void AddFileToolBar(); 00093 void AddScriptToolBar(); 00094 void AddSettingMenu(); 00095 void AddToolsBar(); 00096 void AddToolsMenu(); 00097 void CloseBrowsers(); 00098 void Go4TreeViewerSlot(); 00099 void RemoveClientSlot(); 00100 void ShutdownSlaveSlot(); 00101 void StopMonitoring(); 00102 void launchClientSlot(); 00103 void Go4BrowsersSlot(); 00104 void AnalysisConfigAppearance(int mode); 00105 void AnalysisConfigSlot(); 00106 TGo4AnalysisStatusMonitor * AnalysisStatusSlot(); 00107 void KillAnalysisSlot(); 00108 void RestartAnalysisSlot(); 00109 void StartAnalysisSlot(); 00110 void StopAnalysisSlot(); 00111 void SubmitStartAnalysisSlot(); 00112 void LogPanelSlot(); 00113 void UserPanelSlot(); 00114 TGo4PreviewPanel *ViewPanelSlot(int div=0); 00115 void closeEvent( QCloseEvent * ce ); 00116 void LoadLibrarySlot(); 00117 void RemoteInfoSlot(); 00118 TGo4HistogramInfo* HistogramInfoSlot(const char* hisname=0); 00119 TGo4ConditionInfo* ConditionInfoSlot(const char* condname=0); 00120 void ConditionEditSlot(const char* condname=0, TGo4PreviewPanel* pan=0); 00121 void EventInfoSlot(const char* evename=0); 00122 void CloseFileSlot(); 00123 void CloseAllFilesSlot(); 00124 void OpenFileSlot(); 00125 void OpenRemoteFileSlot(); 00126 void SaveFileSlot(); 00127 void ExportSelectedObjectsSlot(); 00128 00129 void StartGUIScriptSlot(); 00130 void StopGUIScriptSlot(); 00131 void CreateGUIScriptSlot(); 00132 00133 void InputTerminalParametersSlot(); 00134 00135 void ExitSlot(); 00136 void SaveLogSlot(); 00137 void EditCopySlot(); 00138 void DrawOptionsSlot(); 00139 void ScaleOptionsSlot(); 00140 void DivideCanvasSlot(); 00141 void LogSettingsSlot(); 00142 void WorkSpaceRemovedChild(TGo4PreviewPanel *Obj); 00143 void WorkSpaceNewChild(TGo4PreviewPanel *Obj); 00144 void WindowActivatedSlot(QWidget * w); 00145 00146 void IntroHelpSlot(); 00147 void RefHelpSlot(); 00148 void FitHelpSlot(); 00149 void StyleSlot(); 00150 void StartAnalysisWin(bool force = false); 00151 TGo4FitPanel *FitPanelSlot(); 00152 void CloseAllWindows(); 00153 void MinAllWindows(); 00154 void saveOptions(); 00155 void setFonts(); 00156 void makeStyle( const QString& ); 00157 void clearAnalysis(); 00158 void clearLog(); 00159 void SaveAnalysisWindow(); 00160 00161 void CreateNewHist(); 00162 void StartParaEdit(); 00163 void StartDynEditor(); 00164 00165 void windowsMenuActivated( int id ); 00166 00167 void CanvasColorSlot(); 00168 void CrosshairSlot(); 00169 00172 void SetMasterMode(int mode); 00173 00174 protected: 00175 00179 int AssignRootColors(); 00180 00181 bool startUserGUI(const char*); 00182 00184 void SetMainCaption(int mode); 00185 00186 QPopupMenu* windowsMenu; 00187 QPopupMenu* SettingMenu; 00188 TGo4WorkSpace* fxTGo4WorkSpace; 00189 TGo4GUIRegistry* fxTGo4GUIRegistry; 00190 TGo4HisDrawOptions* fxTGo4HisDrawOptions; 00191 TGo4ScaleOptions* fxTGo4ScaleOptions; 00192 TGo4DividePad* fxTGo4DividePad; 00193 TGo4Style* fxTGo4Style; 00194 TGo4QDockWindow* LogInfoPanel; 00195 TGo4AnalysisWindow* fxAnalysisShell; 00196 TGo4AnalysisStatusMonitor *fxTGo4AnalysisStatusMonitor; 00197 TGo4DockBrowsers*fxTGo4DockBrowsers; 00198 TGo4LogInfo* fxTGo4LogInfo; 00199 TGo4TreeViewer* fxTGo4TreeViewer; 00200 TGo4FitPanel* fxTGo4FitPanel; 00201 QWidget* fxTGo4MainUserPanel; 00202 TList* fxWinConSlotList; 00203 TIterator* fxWinConIterator; 00204 QFont m_font; 00205 QSize fxViewpanelSize; 00206 int fiPadcolorR; 00207 int fiPadcolorB; 00208 int fiPadcolorG; 00209 bool fbCrosshairMode; 00210 int fiCrosshairId; 00211 bool fbLocalMode; 00212 int fiMasterMode; 00213 QString fxToolsfile; 00214 QString fxSettingsfolder; 00215 }; 00216 00217 #endif // TGO4MAINWINDOW_H 00218 00219 00220 //----------------------------END OF GO4 SOURCE FILE ---------------------