Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

tqrootcanvas.h

Go to the documentation of this file.
00001 //-------------------------------------------------------------
00002 //        Go4 Release Package v3.04-01 (build 30401)
00003 //                      28-November-2008
00004 //---------------------------------------------------------------
00005 //   The GSI Online Offline Object Oriented (Go4) Project
00006 //   Experiment Data Processing at EE 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 TQROOTCANVAS_H
00017 #define TQROOTCANVAS_H
00018 
00019 #include "qwidget.h"
00020 #include "Rtypes.h"
00021 #include "Gtypes.h"
00022 #include "Buttons.h"
00023 #include "TVirtualX.h"
00024 
00025 class TObject;
00026 class TObjLink;
00027 class TVirtualPad;
00028 class TPad;
00029 class TCanvas;
00030 class TBrowser;
00031 class TContextMenu;
00032 class TControlBar;
00033 class TQCanvasMenu;
00034 
00042 class TQRootCanvas : public QWidget {
00043    Q_OBJECT
00044 
00045    public:
00046       TQRootCanvas( QWidget *parent = 0, const char *name = 0 ,TCanvas *c=0);
00047       TQRootCanvas( QWidget *parent = 0, QWidget* tabWin = 0 , const char *name = 0 ,TCanvas *c=0);
00048       virtual ~TQRootCanvas();
00049 
00050       TCanvas*          getCanvas() { return fCanvas;}
00051       int               getRootWid() { return wid;}
00052       bool              getCanvasOwner(){ return isCanvasOwned; }
00053       QWidget*          getParent() { return fParent;}
00054       QWidget*          getTabWin() { return fTabWin;}
00055       void              setResizeFlag(int level = 1);
00056       bool              checkResizeFlag(int level = 1);
00057       TQCanvasMenu*     getContextMenu() { return fContextMenu; }
00058       void              setMaskDoubleClick(bool on=true) { fMaskDoubleClick = on; }
00059 
00060    signals:
00063       void              SelectedPadChanged(TPad*);
00064 
00066       void              PadClicked(TPad*);
00067 
00069       void              PadDoubleClicked(TPad*);
00070 
00071    public slots:
00072 
00073       void              cd(Int_t subpadnumber=0);
00074       virtual void      Browse(TBrowser *b);
00075       void              Clear(Option_t *option="");
00076       void              Close(Option_t *option="");
00077       virtual void      Draw(Option_t *option="");
00078       virtual TObject  *DrawClone(Option_t *option="");
00079       virtual TObject  *DrawClonePad();
00080       virtual void      EditorBar();
00081       void              EnterLeave(TPad *prevSelPad, TObject *prevSelObj);
00082       void              FeedbackMode(Bool_t set);
00083       void              Flush();
00084       void              UseCurrentStyle();
00085       void              ForceUpdate() ;
00086       const char       *GetDISPLAY();
00087       TContextMenu     *GetContextMenu() ;
00088       Int_t             GetDoubleBuffer() ;
00089       TControlBar      *GetEditorBar()  ;
00090       Int_t             GetEvent()  ;
00091       Int_t             GetEventX() ;
00092       Int_t             GetEventY() ;
00093       Color_t           GetHighLightColor() ;
00094       virtual void      GetPadDivision(Int_t xdivision=1, Int_t ydivision=1);
00095       TVirtualPad      *GetPadSave() ;
00096       TObject          *GetSelected() ;
00097       Option_t         *GetSelectedOpt() ;
00098       TVirtualPad      *GetSelectedPad()  ;
00099       Bool_t            GetShowEventStatus() ;
00100       Bool_t            GetAutoExec() ;
00101       Size_t            GetXsizeUser()  ;
00102       Size_t            GetYsizeUser()  ;
00103       Size_t            GetXsizeReal()  ;
00104       Size_t            GetYsizeReal()  ;
00105       Int_t             GetCanvasID()  ;
00106       Int_t             GetWindowTopX();
00107       Int_t             GetWindowTopY();
00108       UInt_t            GetWindowWidth() ;
00109       UInt_t            GetWindowHeight()  ;
00110       UInt_t            GetWw() ;
00111       UInt_t            GetWh() ;
00112       virtual void      GetCanvasPar(Int_t &wtopx, Int_t &wtopy, UInt_t &ww, UInt_t &wh);
00113       virtual void      HandleInput(EEventType button, Int_t x, Int_t y);
00114       Bool_t            HasMenuBar()  ;
00115       void              Iconify() ;
00116       Bool_t            IsBatch() ;
00117       Bool_t            IsRetained() ;
00118       virtual void      ls(Option_t *option="") ;
00119       void              MoveOpaque(Int_t set=1);
00120       Bool_t            OpaqueMoving() ;
00121       Bool_t            OpaqueResizing() ;
00122       virtual void      Paint(Option_t *option="");
00123       virtual TPad     *Pick(Int_t px, Int_t py, TObjLink *&pickobj) ;
00124       virtual TPad     *Pick(Int_t px, Int_t py, TObject *prevSelObj);
00125       virtual void      Resize(Option_t *option="");
00126       void              ResizeOpaque(Int_t set=1) ;
00127       void              SaveSource(const char *filename="", Option_t *option="");
00128       virtual void      SetCursor(ECursor cursor);
00129       virtual void      SetDoubleBuffer(Int_t mode=1);
00130       void              SetWindowPosition(Int_t x, Int_t y) ;
00131       void              SetWindowSize(UInt_t ww, UInt_t wh) ;
00132       void              SetCanvasSize(UInt_t ww, UInt_t wh);
00133       void              SetHighLightColor(Color_t col);
00134       void              SetSelected(TObject *obj) ;
00135       void              SetSelectedPad(TPad *pad) ;
00136       void              Show() ;
00137       virtual void      Size(Float_t xsizeuser=0, Float_t ysizeuser=0);
00138       void              SetBatch(Bool_t batch=kTRUE);
00139       void              SetRetained(Bool_t retained=kTRUE);
00140       void              SetTitle(const char *title="");
00141       virtual void      ToggleEventStatus();
00142       virtual void      ToggleAutoExec();
00143       virtual void      Update();
00144 
00145    protected:
00146       virtual void      performResize();
00147       virtual void      dropEvent( QDropEvent *Event );
00148       virtual void      dragEnterEvent( QDragEnterEvent *e );
00149       virtual bool      eventFilter( QObject *, QEvent * );
00150       virtual void      mousePressEvent( QMouseEvent *e );
00151       virtual void      mouseReleaseEvent( QMouseEvent *e );
00152       virtual void      resizeEvent( QResizeEvent *e );
00153       virtual void      paintEvent( QPaintEvent *e );
00154       virtual void      mouseDoubleClickEvent(QMouseEvent* e );
00155       virtual void      mouseMoveEvent(QMouseEvent *e);
00156       virtual void      leaveEvent(QEvent *e);
00157       virtual void      closeEvent( QCloseEvent * e);
00158 
00159       TQCanvasMenu*     fContextMenu;
00160       TCanvas*          fCanvas;
00161       Int_t             wid;
00162       bool              isCanvasOwned;
00163       QWidget*          fParent;
00164       QWidget*          fTabWin;
00165    private:
00166       int               fResizeFlag;
00167       bool              fMaskDoubleClick;
00168 };
00169 
00170 #endif
00171 
00172 
00173 
00174 
00175 
00176 
00177 
00178 //----------------------------END OF GO4 SOURCE FILE ---------------------

Generated on Fri Nov 28 12:59:33 2008 for Go4-v3.04-1 by  doxygen 1.4.2