28 : QWidget(wparent), fNeedResize(
kTRUE)
30 setUpdatesEnabled(
kTRUE );
31 setMouseTracking(
kTRUE);
34 setFocusPolicy( TabFocus );
35 setCursor( Qt::CrossCursor );
55 wparent->installEventFilter(
this );
62 setAcceptDrops(
kTRUE);
69 : QWidget(tabWin), fNeedResize(
kTRUE)
71 setUpdatesEnabled(
kTRUE );
72 setMouseTracking(
kTRUE);
74 setFocusPolicy( TabFocus );
75 setCursor( Qt::CrossCursor );
94 wparent->installEventFilter(
this );
104 setAcceptDrops(
TRUE);
115 bool buttonDown =
e->buttons() & Qt::LeftButton;
130 switch (
e->button()) {
134 case Qt::RightButton:
151 gROOT->SetSelectedPrimitive(selected);
153 gPad->AbsPixeltoY(
gPad->GetEventY()),
e);
174 switch (
e->button()) {
197 switch (
e->button()) {
219 QWidget::resizeEvent(
e );
254 if (
e->type() == QEvent::Close) {
259 if (
e->type() == QEvent::ChildRemoved ) {
268 if (
e->type() == QEvent::Paint) {
271 if (
e->type() == QEvent::Move) {
276 return QWidget::eventFilter( o,
e );
286 if (
e->mimeData()->hasText())
287 e->acceptProposedAction();
295 if (
e->mimeData()->hasText()) {
296 const char *
name =
e->mimeData()->text().toAscii().data();
298 QPoint Pos =
e->pos();
301 if (dragedObject!=0) {
304 dragedObject->
Draw();
308 std::cout <<
"object " <<
name <<
" not found by ROOT" << std::endl;
311 e->acceptProposedAction();
include TDocParser_001 C image html pict1_TDocParser_001 png width
Using a TBrowser one can browse all ROOT objects.
Bool_t IsRetained() const
Is pad retained ?
void SetWindowSize(UInt_t ww, UInt_t wh)
UInt_t GetWindowHeight() const
virtual void EditorBar()
Get editor bar.
void EnterLeave(TPad *prevSelPad, TObject *prevSelObj)
Generate kMouseEnter and kMouseLeave events depending on the previously selected object and the curre...
UInt_t GetWh() const
Get Wh.
virtual void ToggleAutoExec()
Toggle pad auto execution of list of TExecs.
void SetCanvasSize(UInt_t ww, UInt_t wh)
Set Width and Height of canvas to ww and wh respectively.
void SetSelectedPad(TPad *pad)
Bool_t OpaqueResizing() const
Is pad resizing in opaque mode ?
void SetHighLightColor(Color_t col)
virtual void Draw(Option_t *option="")
Draw a canvas.
Int_t GetWindowTopX()
Returns current top x position of window on screen.
virtual void ToggleEventStatus()
Toggle event statusbar.
virtual void GetCanvasPar(Int_t &wtopx, Int_t &wtopy, UInt_t &ww, UInt_t &wh)
virtual void SetDoubleBuffer(Int_t mode=1)
Set Double Buffer On/Off.
void Clear(Option_t *option="")
Remove all primitives from the canvas.
virtual void Paint(Option_t *option="")
Paint canvas.
Bool_t HasMenuBar() const
virtual void Resize(Option_t *option="")
Recompute canvas parameters following a X11 Resize.
Int_t GetEventY() const
Get Y event.
Color_t GetHighLightColor() const
Get highlight color.
virtual TObject * DrawClone(Option_t *option="") const
Draw a clone of this canvas A new canvas is created that is a clone of this canvas.
void SetSelected(TObject *obj)
Set selected canvas.
void SaveSource(const char *filename="", Option_t *option="")
Save primitives in this canvas as a C++ macro file.
Int_t GetEvent() const
Get Event.
Size_t GetXsizeUser() const
virtual void Size(Float_t xsizeuser=0, Float_t ysizeuser=0)
Set the canvas scale in centimeters.
virtual void HandleInput(EEventType button, Int_t x, Int_t y)
Handle Input Events.
Size_t GetXsizeReal() const
Int_t GetEventX() const
Get X event.
Bool_t IsBatch() const
Is pad in batch mode ?
virtual void ls(Option_t *option="") const
List all pads.
Int_t GetWindowTopY()
Returns current top y position of window on screen.
Int_t GetCanvasID() const
Get canvas identifier.
Bool_t OpaqueMoving() const
Is pad moving in opaque mode ?
virtual void Update()
Update canvas pad buffers.
Bool_t GetAutoExec() const
TVirtualPad * GetSelectedPad() const
void UseCurrentStyle()
Force a copy of current style for all objects in canvas.
void SetTitle(const char *title="")
Set canvas title.
virtual void SetCursor(ECursor cursor)
Set cursor.
TVirtualPad * GetPadSave() const
const char * GetDISPLAY() const
UInt_t GetWindowWidth() const
void FeedbackMode(Bool_t set)
Turn rubberband feedback mode on or off.
Size_t GetYsizeUser() const
UInt_t GetWw() const
Get Ww.
TObject * GetSelected() const
Get selected.
void Close(Option_t *option="")
Close canvas.
TContextMenu * GetContextMenu() const
Size_t GetYsizeReal() const
void Flush()
Flush canvas buffers.
virtual void Browse(TBrowser *b)
Browse.
Option_t * GetSelectedOpt() const
TVirtualPad * cd(Int_t subpadnumber=0)
Set current canvas & pad.
void MoveOpaque(Int_t set=1)
Set option to move objects/pads in a canvas.
Int_t GetDoubleBuffer() const
void SetWindowPosition(Int_t x, Int_t y)
Bool_t GetShowEventStatus() const
virtual TPad * Pick(Int_t px, Int_t py, TObjLink *&pickobj)
Search for an object at pixel position px,py.
void ResizeOpaque(Int_t set=1)
Set option to resize objects/pads in a canvas.
void SetRetained(Bool_t retained=kTRUE)
virtual TObject * DrawClonePad()
Draw a clone of this canvas into the current pad In an interactive session, select the destination/cu...
void SetBatch(Bool_t batch=kTRUE)
Toggle batch mode.
Wrapper around a TObject so it can be stored in a TList.
TObject * GetObject() const
virtual Option_t * GetOption() const
Mother of all ROOT objects.
virtual Bool_t InheritsFrom(const char *classname) const
Returns kTRUE if object inherits from class "classname".
virtual void Draw(Option_t *option="")
Default Draw method for all objects.
The most important graphics class in the ROOT system.
virtual void Update()
Update pad.
TVirtualPad * cd(Int_t subpadnumber=0)
Set Current pad.
virtual void dragEnterEvent(QDragEnterEvent *e)
Entering a drag event.
virtual void resizeEvent(QResizeEvent *e)
Call QWidget resize and inform the ROOT Canvas.
Int_t GetWindowTopX()
just a wrapper
void SetSelected(TObject *obj)
just a wrapper
virtual void HandleInput(EEventType button, Int_t x, Int_t y)
just a wrapper
void cd(Int_t subpadnumber=0)
Just a wrapper.
void Flush()
just a wrapper
void EnterLeave(TPad *prevSelPad, TObject *prevSelObj)
just a wrapper
virtual void leaveEvent(QEvent *e)
Handle leave event.
TObject * GetSelected()
just a wrapper
void SetHighLightColor(Color_t col)
just a wrapper
Int_t GetEventY()
just a wrapper
Size_t GetYsizeUser()
just a wrapper
virtual void EditorBar()
Just a wrapper.
virtual TObject * DrawClone(Option_t *option="")
Just a wrapper.
virtual void SetCursor(ECursor cursor)
just a wrapper
virtual void mouseDoubleClickEvent(QMouseEvent *e)
Handle mouse double click event.
virtual TObject * DrawClonePad()
Just a wrapper.
void SelectedPadChanged(TPad *)
Option_t * GetSelectedOpt()
just a wrapper
void Show()
just a wrapper
virtual void dropEvent(QDropEvent *Event)
Start a drop, for now only histogram objects can be drwon by droping.
void MoveOpaque(Int_t set=1)
just a wrapper
virtual void Size(Float_t xsizeuser=0, Float_t ysizeuser=0)
just a wrapper
UInt_t GetWh()
just a wrapper
Bool_t IsBatch()
just a wrapper
virtual void SetDoubleBuffer(Int_t mode=1)
just a wrapper
void SetBatch(Bool_t batch=kTRUE)
just a wrapper
Bool_t IsRetained()
just a wrapper
Bool_t HasMenuBar()
just a wrapper
TVirtualPad * GetPadSave()
just a wrapper
virtual void mouseReleaseEvent(QMouseEvent *e)
Handle mouse button release event.
void SetTitle(const char *title="")
just a wrapper
virtual bool eventFilter(QObject *, QEvent *)
Filtering of QWidget Events for ressource management.
UInt_t GetWindowWidth()
just a wrapper
void Close(Option_t *option="")
Just a wrapper.
virtual void ToggleAutoExec()
just a wrapper
virtual void Paint(Option_t *option="")
just a wrapper
void SaveSource(const char *filename="", Option_t *option="")
just a wrapper
void ResizeOpaque(Int_t set=1)
just a wrapper
void Clear(Option_t *option="")
Just a wrapper.
void SetWindowSize(UInt_t ww, UInt_t wh)
just a wrapper
TVirtualPad * GetSelectedPad()
just a wrapper
void ForceUpdate()
just a wrapper
virtual void Draw(Option_t *option="")
Just a wrapper.
TQRootCanvas(const TQRootCanvas &)
Size_t GetXsizeUser()
just a wrapper
Size_t GetXsizeReal()
just a wrapper
virtual void ToggleEventStatus()
just a wrapper
void Iconify()
just a wrapper
Bool_t OpaqueMoving()
just a wrapper
UInt_t GetWw()
just a wrapper
virtual void closeEvent(QCloseEvent *e)
Close.
TQCanvasMenu * fContextMenu
void SetCanvasSize(UInt_t ww, UInt_t wh)
just a wrapper
void FeedbackMode(Bool_t set)
just a wrapper
Int_t GetEvent()
just a wrapper
void SetWindowPosition(Int_t x, Int_t y)
just a wrapper
void SetSelectedPad(TPad *pad)
just a wrapper
virtual void Update()
just a wrapper
virtual void paintEvent(QPaintEvent *e)
Handle paint event of Qt.
virtual void mousePressEvent(QMouseEvent *e)
Handle mouse button press event.
void SetRetained(Bool_t retained=kTRUE)
just a wrapper
Size_t GetYsizeReal()
just a wrapper
virtual void Resize(Option_t *option="")
just a wrapper
virtual ~TQRootCanvas()
dtor
Int_t GetDoubleBuffer()
just a wrapper
virtual TPad * Pick(Int_t px, Int_t py, TObjLink *&pickobj)
just a wrapper
virtual void ls(Option_t *option="")
just a wrapper
Int_t GetCanvasID()
just a wrapper
Bool_t GetShowEventStatus()
just a wrapper
UInt_t GetWindowHeight()
just a wrapper
void UseCurrentStyle()
just a wrapper
Int_t GetWindowTopY()
just a wrapper
const char * GetDISPLAY()
just a wrapper
Int_t GetEventX()
just a wrapper
Color_t GetHighLightColor()
just a wrapper
Bool_t OpaqueResizing()
just a wrapper
virtual void Browse(TBrowser *b)
Just a wrapper.
virtual void mouseMoveEvent(QMouseEvent *e)
Handle mouse move event.
virtual void GetCanvasPar(Int_t &wtopx, Int_t &wtopy, UInt_t &ww, UInt_t &wh)
just a wrapper
Bool_t GetAutoExec()
just a wrapper
TContextMenu * GetContextMenu()
just a wrapper
TVirtualPad is an abstract base class for the Pad and Canvas classes.