Public Slots | Signals | Public Member Functions | Protected Member Functions | Protected Attributes | Private Types | Private Attributes

QRootCanvas Class Reference

Graphic Qt Widget based Canvas. More...

#include <QRootCanvas.h>

List of all members.

Public Slots

void cd (Int_t subpadnumber=0)
virtual void Browse (TBrowser *b)
void Clear (Option_t *option="")
void Close (Option_t *option="")
virtual void Draw (Option_t *option="")
virtual TObject * DrawClone (Option_t *option="")
virtual TObject * DrawClonePad ()
virtual void EditorBar ()
void EnterLeave (TPad *prevSelPad, TObject *prevSelObj)
void FeedbackMode (Bool_t set)
void Flush ()
void UseCurrentStyle ()
void ForceUpdate ()
const char * GetDISPLAY ()
TContextMenu * GetContextMenu ()
Int_t GetDoubleBuffer ()
TControlBar * GetEditorBar ()
Int_t GetEvent ()
Int_t GetEventX ()
Int_t GetEventY ()
Color_t GetHighLightColor ()
TVirtualPad * GetPadSave ()
TObject * GetSelected ()
Option_t * GetSelectedOpt ()
TVirtualPad * GetSelectedPad ()
Bool_t GetShowEventStatus ()
Bool_t GetAutoExec ()
Size_t GetXsizeUser ()
Size_t GetYsizeUser ()
Size_t GetXsizeReal ()
Size_t GetYsizeReal ()
Int_t GetCanvasID ()
Int_t GetWindowTopX ()
Int_t GetWindowTopY ()
UInt_t GetWindowWidth ()
UInt_t GetWindowHeight ()
UInt_t GetWw ()
UInt_t GetWh ()
virtual void GetCanvasPar (Int_t &wtopx, Int_t &wtopy, UInt_t &ww, UInt_t &wh)
virtual void HandleInput (EEventType button, Int_t x, Int_t y)
Bool_t HasMenuBar ()
void Iconify ()
Bool_t IsBatch ()
Bool_t IsRetained ()
virtual void ls (Option_t *option="")
void Modified (Bool_t=1)
void MoveOpaque (Int_t set=1)
Bool_t OpaqueMoving ()
Bool_t OpaqueResizing ()
virtual void Paint (Option_t *option="")
virtual TPad * Pick (Int_t px, Int_t py, TObjLink *&pickobj)
virtual TPad * Pick (Int_t px, Int_t py, TObject *prevSelObj)
virtual void Resize (Option_t *option="")
void ResizeOpaque (Int_t set=1)
void SaveSource (const char *filename="", Option_t *option="")
virtual void SetCursor (ECursor cursor)
virtual void SetDoubleBuffer (Int_t mode=1)
void SetWindowPosition (Int_t x, Int_t y)
void SetWindowSize (UInt_t ww, UInt_t wh)
void SetCanvasSize (UInt_t ww, UInt_t wh)
void SetHighLightColor (Color_t col)
void SetSelected (TObject *obj)
void SetSelectedPad (TPad *pad)
void Show ()
virtual void Size (Float_t xsizeuser=0, Float_t ysizeuser=0)
void SetBatch (Bool_t batch=kTRUE)
void SetRetained (Bool_t retained=kTRUE)
void SetTitle (const char *title="")
virtual void ToggleEventStatus ()
virtual void ToggleAutoExec ()
virtual void Update ()
void executeMenu (int id)
void processRepaintTimer ()

Signals

void SelectedPadChanged (TPad *)
void PadClicked (TPad *)
void PadDoubleClicked (TPad *)
void MenuCommandExecuted (TObject *, const char *)
void CanvasStatusEvent (const char *)
void CanvasDropEvent (QDropEvent *, TPad *)
void CanvasLeaveEvent ()
void CanvasUpdated ()

Public Member Functions

 QRootCanvas (QWidget *parent=0)
virtual ~QRootCanvas ()
TCanvas * getCanvas ()
int getRootWid ()
void setMaskDoubleClick (bool on=true)
bool showEventStatus () const
void setShowEventStatus (bool s)

Protected Member Functions

virtual void dropEvent (QDropEvent *Event)
virtual void dragEnterEvent (QDragEnterEvent *e)
virtual void mousePressEvent (QMouseEvent *e)
virtual void mouseReleaseEvent (QMouseEvent *e)
virtual void resizeEvent (QResizeEvent *e)
virtual void paintEvent (QPaintEvent *e)
virtual void mouseDoubleClickEvent (QMouseEvent *e)
virtual void mouseMoveEvent (QMouseEvent *e)
virtual void leaveEvent (QEvent *e)
virtual void closeEvent (QCloseEvent *e)
virtual QPaintEngine * paintEngine () const
void methodDialog (TObject *object, TMethod *method)
QAction * addMenuAction (QMenu *menu, QSignalMapper *map, const QString &text, int id)
void actiavteRepaint (int act)

Protected Attributes

TCanvas * fCanvas
Int_t fRootWindowId
WId fQtWindowId
QTimer * fRepaintTimer
int fRepaintMode

Private Types

enum  { act_Update = 1, act_Resize = 2 }

Private Attributes

bool fMaskDoubleClick
double fMousePosX
double fMousePosY
TObject * fMenuObj
TList * fMenuMethods
bool fxShowEventStatus

Detailed Description

Graphic Qt Widget based Canvas.

This canvas uses Qt eventloop to handle user input

Authors:
Denis Bertini <d.bertini(at)gsi.de>
Version:
2.0

Definition at line 69 of file QRootCanvas.h.


Member Enumeration Documentation

anonymous enum [private]
Enumerator:
act_Update 
act_Resize 

Definition at line 73 of file QRootCanvas.h.


Constructor & Destructor Documentation

QRootCanvas::QRootCanvas ( QWidget *  parent = 0  ) 
QRootCanvas::~QRootCanvas (  )  [virtual]

Definition at line 106 of file QRootCanvas.cpp.

References fCanvas, fMenuMethods, and fRepaintTimer.


Member Function Documentation

void QRootCanvas::actiavteRepaint ( int  act  )  [protected]

Definition at line 286 of file QRootCanvas.cpp.

References fRepaintMode, and fRepaintTimer.

Referenced by paintEvent(), resizeEvent(), and Update().

QAction * QRootCanvas::addMenuAction ( QMenu *  menu,
QSignalMapper *  map,
const QString &  text,
int  id 
) [protected]

Definition at line 842 of file QRootCanvas.cpp.

References QRootApplication::IsRootCanvasMenuEnabled().

Referenced by mousePressEvent().

void QRootCanvas::Browse ( TBrowser *  b  )  [virtual, slot]

Definition at line 385 of file QRootCanvas.cpp.

References fCanvas.

void QRootCanvas::CanvasDropEvent ( QDropEvent *  ,
TPad *   
) [signal]

Referenced by dropEvent().

void QRootCanvas::CanvasLeaveEvent (  )  [signal]

Referenced by leaveEvent().

void QRootCanvas::CanvasStatusEvent ( const char *   )  [signal]

Referenced by mouseMoveEvent().

void QRootCanvas::CanvasUpdated (  )  [signal]

Referenced by processRepaintTimer().

void QRootCanvas::cd ( Int_t  subpadnumber = 0  )  [slot]

Definition at line 380 of file QRootCanvas.cpp.

References fCanvas.

void QRootCanvas::Clear ( Option_t *  option = ""  )  [slot]

Definition at line 390 of file QRootCanvas.cpp.

References fCanvas.

void QRootCanvas::Close ( Option_t *  option = ""  )  [slot]

Definition at line 394 of file QRootCanvas.cpp.

References fCanvas.

void QRootCanvas::closeEvent ( QCloseEvent *  e  )  [protected, virtual]

Definition at line 675 of file QRootCanvas.cpp.

References fCanvas.

void QRootCanvas::dragEnterEvent ( QDragEnterEvent *  e  )  [protected, virtual]

Definition at line 361 of file QRootCanvas.cpp.

void QRootCanvas::Draw ( Option_t *  option = ""  )  [virtual, slot]

Definition at line 398 of file QRootCanvas.cpp.

References fCanvas.

TObject * QRootCanvas::DrawClone ( Option_t *  option = ""  )  [virtual, slot]

Definition at line 402 of file QRootCanvas.cpp.

References fCanvas.

TObject * QRootCanvas::DrawClonePad (  )  [virtual, slot]

Definition at line 406 of file QRootCanvas.cpp.

References fCanvas.

void QRootCanvas::dropEvent ( QDropEvent *  Event  )  [protected, virtual]

Definition at line 367 of file QRootCanvas.cpp.

References CanvasDropEvent(), and Pick().

void QRootCanvas::EditorBar (  )  [virtual, slot]

Definition at line 410 of file QRootCanvas.cpp.

References fCanvas.

void QRootCanvas::EnterLeave ( TPad *  prevSelPad,
TObject *  prevSelObj 
) [slot]

Definition at line 414 of file QRootCanvas.cpp.

References fCanvas.

void QRootCanvas::executeMenu ( int  id  )  [slot]

test: do this in any case!

Definition at line 866 of file QRootCanvas.cpp.

References fCanvas, fMenuMethods, fMenuObj, fMousePosX, fMousePosY, MenuCommandExecuted(), and methodDialog().

Referenced by mousePressEvent().

void QRootCanvas::FeedbackMode ( Bool_t  set  )  [slot]

Definition at line 418 of file QRootCanvas.cpp.

References fCanvas.

void QRootCanvas::Flush (  )  [slot]

Definition at line 422 of file QRootCanvas.cpp.

References fCanvas.

void QRootCanvas::ForceUpdate (  )  [slot]

Definition at line 430 of file QRootCanvas.cpp.

References fCanvas.

Bool_t QRootCanvas::GetAutoExec (  )  [slot]

Definition at line 488 of file QRootCanvas.cpp.

References fCanvas.

TCanvas* QRootCanvas::getCanvas (  )  [inline]

Definition at line 79 of file QRootCanvas.h.

Int_t QRootCanvas::GetCanvasID (  )  [slot]

Definition at line 508 of file QRootCanvas.cpp.

References fCanvas.

void QRootCanvas::GetCanvasPar ( Int_t &  wtopx,
Int_t &  wtopy,
UInt_t &  ww,
UInt_t &  wh 
) [virtual, slot]

Definition at line 537 of file QRootCanvas.cpp.

References fCanvas.

TContextMenu * QRootCanvas::GetContextMenu (  )  [slot]

Definition at line 438 of file QRootCanvas.cpp.

References fCanvas.

const char * QRootCanvas::GetDISPLAY (  )  [slot]

Definition at line 434 of file QRootCanvas.cpp.

References fCanvas.

Int_t QRootCanvas::GetDoubleBuffer (  )  [slot]

Definition at line 442 of file QRootCanvas.cpp.

References fCanvas.

TControlBar * QRootCanvas::GetEditorBar (  )  [slot]

Definition at line 446 of file QRootCanvas.cpp.

Int_t QRootCanvas::GetEvent (  )  [slot]

Definition at line 451 of file QRootCanvas.cpp.

References fCanvas.

Int_t QRootCanvas::GetEventX (  )  [slot]

Definition at line 455 of file QRootCanvas.cpp.

References fCanvas.

Int_t QRootCanvas::GetEventY (  )  [slot]

Definition at line 459 of file QRootCanvas.cpp.

References fCanvas.

Color_t QRootCanvas::GetHighLightColor (  )  [slot]

Definition at line 463 of file QRootCanvas.cpp.

References fCanvas.

TVirtualPad * QRootCanvas::GetPadSave (  )  [slot]

Definition at line 468 of file QRootCanvas.cpp.

References fCanvas.

int QRootCanvas::getRootWid (  )  [inline]

Definition at line 80 of file QRootCanvas.h.

TObject * QRootCanvas::GetSelected (  )  [slot]

Definition at line 472 of file QRootCanvas.cpp.

References fCanvas.

Option_t * QRootCanvas::GetSelectedOpt (  )  [slot]

Definition at line 476 of file QRootCanvas.cpp.

References fCanvas.

TVirtualPad * QRootCanvas::GetSelectedPad (  )  [slot]

Definition at line 480 of file QRootCanvas.cpp.

References fCanvas.

Bool_t QRootCanvas::GetShowEventStatus (  )  [slot]

Definition at line 484 of file QRootCanvas.cpp.

References fCanvas.

UInt_t QRootCanvas::GetWh (  )  [slot]

Definition at line 533 of file QRootCanvas.cpp.

References fCanvas.

UInt_t QRootCanvas::GetWindowHeight (  )  [slot]

Definition at line 525 of file QRootCanvas.cpp.

References fCanvas.

Int_t QRootCanvas::GetWindowTopX (  )  [slot]

Definition at line 513 of file QRootCanvas.cpp.

References fCanvas.

Int_t QRootCanvas::GetWindowTopY (  )  [slot]

Definition at line 517 of file QRootCanvas.cpp.

References fCanvas.

UInt_t QRootCanvas::GetWindowWidth (  )  [slot]

Definition at line 521 of file QRootCanvas.cpp.

References fCanvas.

UInt_t QRootCanvas::GetWw (  )  [slot]

Definition at line 529 of file QRootCanvas.cpp.

References fCanvas.

Size_t QRootCanvas::GetXsizeReal (  )  [slot]

Definition at line 500 of file QRootCanvas.cpp.

References fCanvas.

Size_t QRootCanvas::GetXsizeUser (  )  [slot]

Definition at line 492 of file QRootCanvas.cpp.

References fCanvas.

Size_t QRootCanvas::GetYsizeReal (  )  [slot]

Definition at line 504 of file QRootCanvas.cpp.

References fCanvas.

Size_t QRootCanvas::GetYsizeUser (  )  [slot]

Definition at line 496 of file QRootCanvas.cpp.

References fCanvas.

void QRootCanvas::HandleInput ( EEventType  button,
Int_t  x,
Int_t  y 
) [virtual, slot]

Definition at line 541 of file QRootCanvas.cpp.

References fCanvas.

Bool_t QRootCanvas::HasMenuBar (  )  [slot]

Definition at line 545 of file QRootCanvas.cpp.

References fCanvas.

void QRootCanvas::Iconify (  )  [slot]

Definition at line 549 of file QRootCanvas.cpp.

References fCanvas.

Bool_t QRootCanvas::IsBatch (  )  [slot]

Definition at line 553 of file QRootCanvas.cpp.

References fCanvas.

Bool_t QRootCanvas::IsRetained (  )  [slot]

Definition at line 557 of file QRootCanvas.cpp.

References fCanvas.

void QRootCanvas::leaveEvent ( QEvent *  e  )  [protected, virtual]

Definition at line 337 of file QRootCanvas.cpp.

References CanvasLeaveEvent(), and fCanvas.

void QRootCanvas::ls ( Option_t *  option = ""  )  [virtual, slot]

Definition at line 561 of file QRootCanvas.cpp.

References fCanvas.

void QRootCanvas::MenuCommandExecuted ( TObject *  ,
const char *   
) [signal]

Referenced by executeMenu(), and methodDialog().

void QRootCanvas::methodDialog ( TObject *  object,
TMethod *  method 
) [protected]

Definition at line 686 of file QRootCanvas.cpp.

References QRootDialog::addArg(), fCanvas, QRootDialog::getArg(), and MenuCommandExecuted().

Referenced by executeMenu().

void QRootCanvas::Modified ( Bool_t  mod = 1  )  [slot]

Definition at line 566 of file QRootCanvas.cpp.

References fCanvas.

Referenced by TGo4ViewPanel::OptionsMenuItemActivated().

void QRootCanvas::mouseDoubleClickEvent ( QMouseEvent *  e  )  [protected, virtual]

Definition at line 258 of file QRootCanvas.cpp.

References fCanvas, fMaskDoubleClick, and PadDoubleClicked().

void QRootCanvas::mouseMoveEvent ( QMouseEvent *  e  )  [protected, virtual]

Definition at line 121 of file QRootCanvas.cpp.

References CanvasStatusEvent(), fCanvas, and fxShowEventStatus.

void QRootCanvas::mousePressEvent ( QMouseEvent *  e  )  [protected, virtual]
void QRootCanvas::mouseReleaseEvent ( QMouseEvent *  e  )  [protected, virtual]

Definition at line 238 of file QRootCanvas.cpp.

References fCanvas.

void QRootCanvas::MoveOpaque ( Int_t  set = 1  )  [slot]

Definition at line 571 of file QRootCanvas.cpp.

References fCanvas.

Bool_t QRootCanvas::OpaqueMoving (  )  [slot]

Definition at line 576 of file QRootCanvas.cpp.

References fCanvas.

Bool_t QRootCanvas::OpaqueResizing (  )  [slot]

Definition at line 580 of file QRootCanvas.cpp.

References fCanvas.

void QRootCanvas::PadClicked ( TPad *   )  [signal]

signal emitted when mouse clicks on pad

Referenced by mousePressEvent().

void QRootCanvas::PadDoubleClicked ( TPad *   )  [signal]

signal emitted when user produce left mouse doubleclick on pad

Referenced by mouseDoubleClickEvent().

void QRootCanvas::Paint ( Option_t *  option = ""  )  [virtual, slot]

Definition at line 584 of file QRootCanvas.cpp.

References fCanvas.

virtual QPaintEngine* QRootCanvas::paintEngine (  )  const [inline, protected, virtual]

Definition at line 197 of file QRootCanvas.h.

void QRootCanvas::paintEvent ( QPaintEvent *  e  )  [protected, virtual]

Definition at line 298 of file QRootCanvas.cpp.

References act_Update, actiavteRepaint(), and fRepaintMode.

TPad * QRootCanvas::Pick ( Int_t  px,
Int_t  py,
TObjLink *&  pickobj 
) [virtual, slot]

Definition at line 588 of file QRootCanvas.cpp.

References fCanvas.

Referenced by dropEvent().

TPad * QRootCanvas::Pick ( Int_t  px,
Int_t  py,
TObject *  prevSelObj 
) [virtual, slot]

Definition at line 592 of file QRootCanvas.cpp.

References fCanvas.

void QRootCanvas::processRepaintTimer (  )  [slot]

Definition at line 311 of file QRootCanvas.cpp.

References act_Resize, CanvasUpdated(), fCanvas, fQtWindowId, fRepaintMode, and fRootWindowId.

Referenced by QRootCanvas().

void QRootCanvas::Resize ( Option_t *  option = ""  )  [virtual, slot]

Definition at line 596 of file QRootCanvas.cpp.

References fCanvas.

Referenced by TGo4ViewPanel::CompleteInitialization().

void QRootCanvas::resizeEvent ( QResizeEvent *  e  )  [protected, virtual]

Definition at line 293 of file QRootCanvas.cpp.

References act_Resize, and actiavteRepaint().

void QRootCanvas::ResizeOpaque ( Int_t  set = 1  )  [slot]

Definition at line 600 of file QRootCanvas.cpp.

References fCanvas.

void QRootCanvas::SaveSource ( const char *  filename = "",
Option_t *  option = "" 
) [slot]

Definition at line 604 of file QRootCanvas.cpp.

References fCanvas.

void QRootCanvas::SelectedPadChanged ( TPad *   )  [signal]

signal which will be emitted when root selected pad is changed via clicking the mid-mouse button (M. al-Turany)

Referenced by mousePressEvent().

void QRootCanvas::SetBatch ( Bool_t  batch = kTRUE  )  [slot]

Definition at line 648 of file QRootCanvas.cpp.

References fCanvas.

void QRootCanvas::SetCanvasSize ( UInt_t  ww,
UInt_t  wh 
) [slot]

Definition at line 624 of file QRootCanvas.cpp.

References fCanvas.

void QRootCanvas::SetCursor ( ECursor  cursor  )  [virtual, slot]

Definition at line 608 of file QRootCanvas.cpp.

References fCanvas.

void QRootCanvas::SetDoubleBuffer ( Int_t  mode = 1  )  [virtual, slot]

Definition at line 612 of file QRootCanvas.cpp.

References fCanvas.

void QRootCanvas::SetHighLightColor ( Color_t  col  )  [slot]

Definition at line 628 of file QRootCanvas.cpp.

References fCanvas.

void QRootCanvas::setMaskDoubleClick ( bool  on = true  )  [inline]

Definition at line 81 of file QRootCanvas.h.

void QRootCanvas::SetRetained ( Bool_t  retained = kTRUE  )  [slot]

Definition at line 652 of file QRootCanvas.cpp.

References fCanvas.

void QRootCanvas::SetSelected ( TObject *  obj  )  [slot]

Definition at line 632 of file QRootCanvas.cpp.

References fCanvas.

void QRootCanvas::SetSelectedPad ( TPad *  pad  )  [slot]

Definition at line 636 of file QRootCanvas.cpp.

References fCanvas.

void QRootCanvas::setShowEventStatus ( bool  s  ) 

Definition at line 348 of file QRootCanvas.cpp.

References fxShowEventStatus.

void QRootCanvas::SetTitle ( const char *  title = ""  )  [slot]

Definition at line 656 of file QRootCanvas.cpp.

References fCanvas.

void QRootCanvas::SetWindowPosition ( Int_t  x,
Int_t  y 
) [slot]

Definition at line 616 of file QRootCanvas.cpp.

References fCanvas.

void QRootCanvas::SetWindowSize ( UInt_t  ww,
UInt_t  wh 
) [slot]

Definition at line 620 of file QRootCanvas.cpp.

References fCanvas.

void QRootCanvas::Show (  )  [slot]

Definition at line 640 of file QRootCanvas.cpp.

References fCanvas.

bool QRootCanvas::showEventStatus (  )  const

Definition at line 353 of file QRootCanvas.cpp.

References fxShowEventStatus.

void QRootCanvas::Size ( Float_t  xsizeuser = 0,
Float_t  ysizeuser = 0 
) [virtual, slot]

Definition at line 644 of file QRootCanvas.cpp.

References fCanvas.

void QRootCanvas::ToggleAutoExec (  )  [virtual, slot]

Definition at line 664 of file QRootCanvas.cpp.

References fCanvas.

void QRootCanvas::ToggleEventStatus (  )  [virtual, slot]

Definition at line 660 of file QRootCanvas.cpp.

References fCanvas.

void QRootCanvas::Update (  )  [virtual, slot]
void QRootCanvas::UseCurrentStyle (  )  [slot]

Definition at line 426 of file QRootCanvas.cpp.

References fCanvas.


Member Data Documentation

TCanvas* QRootCanvas::fCanvas [protected]

Definition at line 210 of file QRootCanvas.h.

Referenced by mouseDoubleClickEvent().

TList* QRootCanvas::fMenuMethods [private]

Definition at line 215 of file QRootCanvas.h.

Referenced by executeMenu(), mousePressEvent(), QRootCanvas(), and ~QRootCanvas().

TObject* QRootCanvas::fMenuObj [private]

Definition at line 214 of file QRootCanvas.h.

Referenced by executeMenu(), mousePressEvent(), and QRootCanvas().

double QRootCanvas::fMousePosX [private]

Definition at line 211 of file QRootCanvas.h.

Referenced by executeMenu(), mousePressEvent(), and QRootCanvas().

double QRootCanvas::fMousePosY [private]

Definition at line 212 of file QRootCanvas.h.

Referenced by executeMenu(), mousePressEvent(), and QRootCanvas().

WId QRootCanvas::fQtWindowId [protected]

Definition at line 206 of file QRootCanvas.h.

Referenced by processRepaintTimer(), and QRootCanvas().

int QRootCanvas::fRepaintMode [protected]

Definition at line 208 of file QRootCanvas.h.

Referenced by actiavteRepaint(), paintEvent(), processRepaintTimer(), and QRootCanvas().

QTimer* QRootCanvas::fRepaintTimer [protected]

Definition at line 207 of file QRootCanvas.h.

Referenced by actiavteRepaint(), QRootCanvas(), and ~QRootCanvas().

Int_t QRootCanvas::fRootWindowId [protected]

Definition at line 205 of file QRootCanvas.h.

Referenced by processRepaintTimer(), and QRootCanvas().

Definition at line 216 of file QRootCanvas.h.

Referenced by mouseMoveEvent(), setShowEventStatus(), and showEventStatus().


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines