Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TCanvasWidget.h
Go to the documentation of this file.
1// Author: Sergey Linev, GSI 13/01/2021
2
3/*************************************************************************
4 * Copyright (C) 1995-2021, 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 TCanvasWidget_H
12#define TCanvasWidget_H
13
14#include <QWidget>
15#include <QWebEngineView>
16
17class TCanvas;
18class TPad;
19class TObject;
20
21class TCanvasWidget : public QWidget {
22
23 Q_OBJECT
24
25public:
26 TCanvasWidget(QWidget *parent = nullptr);
27 virtual ~TCanvasWidget();
28
29 /// returns canvas shown in the widget
30 TCanvas *getCanvas() { return fCanvas; }
31
32signals:
33
35
37
38 void PadClicked(TPad*,int,int);
39
40 void PadDblClicked(TPad*,int,int);
41
42public slots:
43
44 void activateEditor(TPad *pad = nullptr, TObject *obj = nullptr);
45
46 void activateStatusLine();
47
48 void setEditorVisible(bool flag = true);
49
50protected:
51
52 void resizeEvent(QResizeEvent *event) override;
53
54 void SetPrivateCanvasFields(bool on_init);
55
56 QWebEngineView *fView{nullptr}; ///< qt webwidget to show
57
58 TCanvas *fCanvas{nullptr};
59};
60
61#endif
TCanvas * fCanvas
void SelectedPadChanged(TPad *)
void PadDblClicked(TPad *, int, int)
void SetPrivateCanvasFields(bool on_init)
void resizeEvent(QResizeEvent *event) override
virtual ~TCanvasWidget()
QWebEngineView * fView
qt webwidget to show
TCanvas * getCanvas()
returns canvas shown in the widget
void activateEditor(TPad *pad=nullptr, TObject *obj=nullptr)
void PadClicked(TPad *, int, int)
void setEditorVisible(bool flag=true)
void activateStatusLine()
void CanvasUpdated()
The Canvas class.
Definition TCanvas.h:23
Mother of all ROOT objects.
Definition TObject.h:37
The most important graphics class in the ROOT system.
Definition TPad.h:26