GSI Object Oriented Online Offline (Go4)  GO4-6.3.0
TGo4MdiArea.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 TGO4MDIAREA_H
15 #define TGO4MDIAREA_H
16 
17 #include <QMdiArea>
18 
19 #include <QtCore/QEvent>
20 
21 class TPad;
22 class TGo4ViewPanel;
23 
27 class TGo4MdiArea : public QMdiArea {
28  Q_OBJECT
29 
30  public:
31 
32  TGo4MdiArea(QWidget *parent = nullptr);
33  virtual ~TGo4MdiArea();
34 
36 
38 
39  TPad *GetSelectedPad();
40  void SetSelectedPad(TPad *pad);
41 
43  QMdiSubWindow* AddGo4SubWindow(QWidget *widget, Qt::WindowFlags flags = Qt::Widget);
44 
45  void ResponseOnPanelEvent(int funcid, TGo4ViewPanel *panel, TPad *pad);
46 
47  static TGo4MdiArea* Instance();
48 
49  signals:
50  void panelSignal(TGo4ViewPanel *, TPad *, int);
51 
52  protected slots:
53  void subWindowActivatedSlot(QMdiSubWindow *window);
54 
55  private:
57  TPad *fxActivePad{nullptr};
58  TPad *fxSelectedPad{nullptr};
59 
61 };
62 
63 #endif
TPad * fxSelectedPad
Definition: TGo4MdiArea.h:58
QMdiSubWindow * AddGo4SubWindow(QWidget *widget, Qt::WindowFlags flags=Qt::Widget)
Definition: TGo4MdiArea.cpp:65
TPad * GetSelectedPad()
Definition: TGo4MdiArea.cpp:48
TGo4ViewPanel * FindOtherPanel(TGo4ViewPanel *not_this)
Definition: TGo4MdiArea.cpp:84
static TGo4MdiArea * Instance()
Definition: TGo4MdiArea.cpp:26
TPad * fxActivePad
Definition: TGo4MdiArea.h:57
TGo4MdiArea(QWidget *parent=nullptr)
Definition: TGo4MdiArea.cpp:31
void ResponseOnPanelEvent(int funcid, TGo4ViewPanel *panel, TPad *pad)
Definition: TGo4MdiArea.cpp:95
TGo4ViewPanel * GetActivePanel()
Definition: TGo4MdiArea.cpp:60
void subWindowActivatedSlot(QMdiSubWindow *window)
Definition: TGo4MdiArea.cpp:76
static TGo4MdiArea * gInstance
Definition: TGo4MdiArea.h:60
virtual ~TGo4MdiArea()
Definition: TGo4MdiArea.cpp:42
TGo4ViewPanel * fxActivePanel
Definition: TGo4MdiArea.h:56
void SetSelectedPad(TPad *pad)
Definition: TGo4MdiArea.cpp:53
void panelSignal(TGo4ViewPanel *, TPad *, int)