Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TQt6Canvas.h
Go to the documentation of this file.
1// Author: Sergey Linev, GSI 26/06/2026
2
3/*************************************************************************
4 * Copyright (C) 1995-2026, Rene Brun and Fons Rademakers. *
5 * All rights reserved. *
6 * *
7 * For the licensing terms see $ROOTSYS/LICENSE. *
8 * For the list of contributors see $ROOTSYS/README/CREDITS. *
9 *************************************************************************/
10
11#ifndef ROOT_TQt6Canvas
12#define ROOT_TQt6Canvas
13
14#include "TCanvasImp.h"
15
16class QWidget;
17class QCanvasWidget;
18class QPaintWidget;
19
20namespace ROOT {
21namespace Experimental {
22
23
24class TQt6Canvas : public TCanvasImp {
25
26protected:
27
30
31 Bool_t fFixedSize = kFALSE; ///<! true when fixed-size canvas is configured
32 UInt_t fClientBits = 0; ///<! latest status bits from client like editor visible or not
33
36
37 void AssignStatusBits(UInt_t bits);
38
39
40public:
42 ~TQt6Canvas() override;
43
45
46 Int_t InitWindow() override;
47 void Close() override;
48 void Show() override;
49
51 void GetCanvasGeometry(Int_t wid, UInt_t &w, UInt_t &h) override;
52 void ResizeCanvasWindow(Int_t) override {}
53 void UpdateDisplay(Int_t = 0, Bool_t = kFALSE) override {}
54
55 void ShowMenuBar(Bool_t = kTRUE) override { }
56 void ShowStatusBar(Bool_t = kTRUE) override { }
57 void ShowEditor(Bool_t = kTRUE) override { }
58 void ShowToolBar(Bool_t = kTRUE) override { }
59 void ShowToolTips(Bool_t = kTRUE) override { }
60
61 void ForceUpdate() override;
62
63 void SetWindowPosition(Int_t x, Int_t y) override;
64 void SetWindowSize(UInt_t w, UInt_t h) override;
65 void SetWindowTitle(const char *newTitle) override;
66 void SetCanvasSize(UInt_t w, UInt_t h) override;
67 void Iconify() override;
68 void RaiseWindow() override;
69
70 Bool_t HasEditor() const override;
71 Bool_t HasMenuBar() const override;
72 Bool_t HasStatusBar() const override;
73 Bool_t HasToolBar() const override { return kFALSE; }
74 Bool_t HasToolTips() const override;
75
76 static TCanvasImp *NewCanvas(TCanvas *c, const char *name, Int_t x, Int_t y, UInt_t width, UInt_t height);
77
78 ClassDefOverride(TQt6Canvas, 0) // Qt6 implementation for TCanvasImp
79};
80
81} // namespace Experimental
82} // namespace ROOT
83
84#endif
#define c(i)
Definition RSha256.hxx:101
#define h(i)
Definition RSha256.hxx:106
bool Bool_t
Boolean (0=false, 1=true) (bool)
Definition RtypesCore.h:78
constexpr Bool_t kFALSE
Definition RtypesCore.h:109
constexpr Bool_t kTRUE
Definition RtypesCore.h:108
#define ClassDefOverride(name, id)
Definition Rtypes.h:347
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize wid
Option_t Option_t width
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t height
char name[80]
Definition TGX11.cxx:142
Qt widget which display canvas and provides menu, toolbar and status bar Actual graphics shown in the...
Represent area where actual canvas painting is performed.
void Close() override
Close qt6 canvas - not implemented.
void ShowStatusBar(Bool_t=kTRUE) override
Definition TQt6Canvas.h:56
TQt6Canvas(TCanvas *c, const char *name, Int_t x, Int_t y, UInt_t width, UInt_t height)
Constructor.
Bool_t HasToolBar() const override
Definition TQt6Canvas.h:73
void SetWindowSize(UInt_t w, UInt_t h) override
Set window size of web canvas.
void SetCanvasSize(UInt_t w, UInt_t h) override
Set canvas size.
void ForceUpdate() override
Increment canvas version and force sending data to client - do not wait for reply.
void ShowMenuBar(Bool_t=kTRUE) override
Definition TQt6Canvas.h:55
void ShowToolBar(Bool_t=kTRUE) override
Definition TQt6Canvas.h:58
Int_t InitWindow() override
Initialize window for the qt6 canvas.
void ShowEditor(Bool_t=kTRUE) override
Definition TQt6Canvas.h:57
UInt_t fClientBits
! latest status bits from client like editor visible or not
Definition TQt6Canvas.h:32
void ResizeCanvasWindow(Int_t) override
Resize canvas window, redirect to gVirtualX.
Definition TQt6Canvas.h:52
void Iconify() override
Iconify browser window.
void Show() override
Show qt6 canvas.
~TQt6Canvas() override
Destructor.
void AssignStatusBits(UInt_t bits)
Assign clients bits.
void ShowToolTips(Bool_t=kTRUE) override
Definition TQt6Canvas.h:59
void UpdateDisplay(Int_t=0, Bool_t=kFALSE) override
Update gVirtualX display, also optionally sleep to wait until operation finished.
Definition TQt6Canvas.h:53
Bool_t HasMenuBar() const override
Returns kTRUE if web canvas has menu bar.
UInt_t GetWindowGeometry(Int_t &x, Int_t &y, UInt_t &w, UInt_t &h) override
Returns window geometry including borders and menus.
static TCanvasImp * NewCanvas(TCanvas *c, const char *name, Int_t x, Int_t y, UInt_t width, UInt_t height)
Static method to create TQt6Canvas instance Used by plugin manager to directly create TQt6Canvas with...
Bool_t HasEditor() const override
Returns kTRUE if web canvas has graphical editor.
void SetWindowTitle(const char *newTitle) override
Set window title of web canvas.
Bool_t PerformUpdate(Bool_t async) override
if canvas or any subpad was modified, invoke Qt update() which will redraw area
void GetCanvasGeometry(Int_t wid, UInt_t &w, UInt_t &h) override
Returns canvas geometry.
Bool_t HasToolTips() const override
Returns kTRUE if tooltips are activated in web canvas.
QPaintWidget * GetPaintWidget() const
Definition TQt6Canvas.h:44
Bool_t HasStatusBar() const override
Returns kTRUE if web canvas has status bar.
TVirtualPadPainter * CreatePadPainter() override
Creates pad painter.
void SetWindowPosition(Int_t x, Int_t y) override
Set window position of web canvas.
void RaiseWindow() override
Raise browser window.
QCanvasWidget * fCanvasWidget
Definition TQt6Canvas.h:28
Bool_t fFixedSize
! true when fixed-size canvas is configured
Definition TQt6Canvas.h:31
ABC describing GUI independent main window (with menubar, scrollbars and a drawing area).
Definition TCanvasImp.h:31
The Canvas class.
Definition TCanvas.h:23
To make it possible to use GL for 2D graphic in a TPad/TCanvas.
Double_t y[n]
Definition legend1.C:17
Double_t x[n]
Definition legend1.C:17