00001 // $Id$ 00002 //----------------------------------------------------------------------- 00003 // The GSI Online Offline Object Oriented (Go4) Project 00004 // Experiment Data Processing at EE department, GSI 00005 //----------------------------------------------------------------------- 00006 // Copyright (C) 2000- GSI Helmholtzzentrum für Schwerionenforschung GmbH 00007 // Planckstr. 1, 64291 Darmstadt, Germany 00008 // Contact: http://go4.gsi.de 00009 //----------------------------------------------------------------------- 00010 // This software can be used under the license agreements as stated 00011 // in Go4License.txt file which is part of the distribution. 00012 //----------------------------------------------------------------------- 00013 00014 #ifndef TGO4MDIAREA_H 00015 #define TGO4MDIAREA_H 00016 00017 #include <QMdiArea> 00018 00019 #include <QtCore/QEvent> 00020 00021 class TPad; 00022 class TGo4ViewPanel; 00023 00024 00028 class TGo4MdiArea : public QMdiArea { 00029 Q_OBJECT 00030 00031 public: 00032 00033 TGo4MdiArea(QWidget *parent = 0); 00034 virtual ~TGo4MdiArea(); 00035 00036 TGo4ViewPanel* GetActivePanel(); 00037 00038 TPad* GetSelectedPad(); 00039 void SetSelectedPad(TPad* pad); 00040 00041 void ResponseOnPanelEvent(int funcid, TGo4ViewPanel* panel, TPad* pad); 00042 00043 static TGo4MdiArea* Instance(); 00044 00045 signals: 00046 void panelSignal(TGo4ViewPanel*, TPad*, int); 00047 00048 protected slots: 00049 void subWindowActivatedSlot(QMdiSubWindow * window); 00050 00051 private: 00052 TGo4ViewPanel* fxActivePanel; 00053 TPad* fxActivePad; 00054 TPad* fxSelectedPad; 00055 00056 static TGo4MdiArea* fInstance; 00057 }; 00058 00059 #endif