Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
QCanvasWidget.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_QCanvasWidget
12#define ROOT_QCanvasWidget
13
14#include <QWidget>
15#include <QAction>
16#include "ui_QCanvasWidget.h"
17
18#include <string>
19#include <vector>
20
21class TH1F;
22class TH2I;
23
24class QCanvasWidget : public QWidget, public Ui::QCanvasWidget {
26
30
31 QString fLastFileDir;
32
33protected:
34
35 std::vector<std::string> GetSupportedFileFormats();
36
37 void FillSaveMenu(QMenu *menu);
38
39public:
40 QCanvasWidget(QWidget *parent = nullptr, const char *name = nullptr);
41
42 virtual ~QCanvasWidget();
43
44 QPaintWidget *GetPaintWidget() const { return fPaintWidget; }
45
46 void SaveCanvas(const QString &fname);
47
49
50public slots:
51
52 void NewCanvas();
53 void OpenRootFile();
54 void CloseCanvas();
55
56 void SaveCanvasAs();
57 void PrintCanvas();
58 void QuitRoot();
59
60 void ShowColors();
61 void ShowMarkers();
62 void IconifyCanvas();
63
64 void SetViewToolbar(bool);
65 void SetViewEventStatus(bool);
66 void SetViewToolTip(bool);
67
68 void CanvasStatusEventSlot(const QString &);
69};
70
71#endif
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
char name[80]
Definition TGX11.cxx:142
Qt widget which display canvas and provides menu, toolbar and status bar Actual graphics shown in the...
void SetViewEventStatus(bool)
Set visibility of event status.
void QuitRoot()
Quit ROOT.
void OpenRootFile()
Open ROOT file dialog.
void NewCanvas()
Create new canvas.
void FillSaveMenu(QMenu *menu)
Fill save menu with predefined items.
QAction * fViewEventStatus
void SaveCanvas(const QString &fname)
Save canvas as file.
void CanvasStatusEventSlot(const QString &)
Status event handler.
void SetViewToolTip(bool)
Set visibility of tooltip.
QAction * fViewToolTip
void CloseCanvas()
Close the canvas.
void PrintCanvas()
Print the canvas.
QPaintWidget * GetPaintWidget() const
QAction * fViewToolbar
void SetViewToolbar(bool)
Set visibility of tool bar.
QCanvasWidget(QWidget *parent=nullptr, const char *name=nullptr)
constructor
virtual ~QCanvasWidget()
Destructor.
void SaveCanvasAs()
Save canvas as.
void ShowColors()
Show new canvas with ROOT colors wheel.
QString fLastFileDir
void ShowMarkers()
Show new canvas with ROOT markers.
void IconifyCanvas()
Iconify canvas widget.
void ApplyCanvasStatusBits()
Apply canvas status bits like show tooltip or menu bar.
std::vector< std::string > GetSupportedFileFormats()
Return vector with supported file formats with description and required option.
Represent area where actual canvas painting is performed.
1-D histogram with a float per channel (see TH1 documentation)
Definition TH1.h:878
2-D histogram with an int per channel (see TH1 documentation)
Definition TH2.h:245