GSI Object Oriented Online Offline (Go4)  GO4-5.3.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
QRootWindow.h
Go to the documentation of this file.
1 // $Id: QRootWindow.h 1950 2016-09-12 12:43:45Z adamczew $
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 für 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 QROOTWINDOW_H
15 #define QROOTWINDOW_H
16 
17 #include <QWidget>
18 
19 #include "Rtypes.h"
20 
21 class QMouseEvent;
22 class QPaintEvent;
23 class TGLayoutHints;
24 class Event_t;
25 class TQRootFrame;
26 class TGFrame;
27 class TGCompositeFrame;
28 
32 class QRootWindow : public QWidget {
33  Q_OBJECT
34 
35  public:
37  QRootWindow( QWidget *parent = 0, const char *name = 0, bool designermode=false);
38 
39  virtual ~QRootWindow();
40 
41  TGCompositeFrame* GetRootFrame();
42  int GetRootWid() const { return fiWinid; }
43 
45  void AddSubFrame(TGFrame* f, TGLayoutHints* l=0);
46 
48  void SetEditable(bool on=true);
49 
52  void SetResizeOnPaint(bool on=true) { fbResizeOnPaint=on; }
53 
55  double ScaledWidth();
56 
58  double ScaledHeight();
59 
60  protected:
61 
66  virtual bool eventFilter( QObject *, QEvent * );
67  virtual void paintEvent( QPaintEvent *e );
68  virtual void closeEvent( QCloseEvent * e);
69 
70  //virtual QPaintEngine * paintEngine () const {return 0;}
71 
73  Bool_t MapQMouseEvent(QMouseEvent *e, Event_t* rev);
74 
78 
80  Int_t fiWinid;
82  WId fQtWinId;
83 
88 
90 };
91 
92 #endif
virtual void closeEvent(QCloseEvent *e)
double ScaledHeight()
void AddSubFrame(TGFrame *f, TGLayoutHints *l=0)
Definition: QRootWindow.cpp:92
Int_t fiWinid
Definition: QRootWindow.h:80
double ScaledWidth()
virtual ~QRootWindow()
void SetEditable(bool on=true)
int l
Definition: f_mbs_status.c:34
Bool_t fbResizeOnPaint
Definition: QRootWindow.h:87
virtual void paintEvent(QPaintEvent *e)
void SetResizeOnPaint(bool on=true)
Definition: QRootWindow.h:52
virtual bool eventFilter(QObject *, QEvent *)
double fQtScalingfactor
Definition: QRootWindow.h:89
TGCompositeFrame * GetRootFrame()
TQRootFrame * fxRootwindow
Definition: QRootWindow.h:77
int GetRootWid() const
Definition: QRootWindow.h:42
QRootWindow(QWidget *parent=0, const char *name=0, bool designermode=false)
Definition: QRootWindow.cpp:62
Bool_t MapQMouseEvent(QMouseEvent *e, Event_t *rev)