00001 // $Id: QRootWindow.h 1134 2014-01-22 14:53:40Z linev $ 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 QROOTWINDOW_H 00015 #define QROOTWINDOW_H 00016 00017 #include <QWidget> 00018 00019 #include "Rtypes.h" 00020 00021 class QMouseEvent; 00022 class QPaintEvent; 00023 class TGLayoutHints; 00024 class Event_t; 00025 class TQRootFrame; 00026 class TGFrame; 00027 class TGCompositeFrame; 00028 00032 class QRootWindow : public QWidget { 00033 Q_OBJECT 00034 00035 public: 00037 QRootWindow( QWidget *parent = 0, const char *name = 0, bool designermode=false); 00038 00039 virtual ~QRootWindow(); 00040 00041 TGCompositeFrame* GetRootFrame(); 00042 int GetRootWid() { return fiWinid;} 00043 00045 void AddSubFrame(TGFrame* f, TGLayoutHints* l=0); 00046 00048 void SetEditable(bool on=true); 00049 00052 void SetResizeOnPaint(bool on=true){fbResizeOnPaint=on;} 00053 00054 protected: 00055 00060 virtual bool eventFilter( QObject *, QEvent * ); 00061 virtual void paintEvent( QPaintEvent *e ); 00062 virtual void closeEvent( QCloseEvent * e); 00063 00064 //virtual QPaintEngine * paintEngine () const {return 0;} 00065 00067 Bool_t MapQMouseEvent(QMouseEvent *e, Event_t* rev); 00068 00071 TQRootFrame *fxRootwindow; 00072 00074 Int_t fiWinid; 00076 WId fQtWinId; 00077 00081 Bool_t fbResizeOnPaint; 00082 }; 00083 00084 #endif