Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TQt6GedEditor.h
Go to the documentation of this file.
1// Author: Sergey Linev, GSI 27/08/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_TQt6GedEditor
12#define ROOT_TQt6GedEditor
13
14#include "TVirtualPadEditor.h"
15#include "TQObject.h"
16
17#include <functional>
18
19class TVirtualPad;
20class TAttMarker;
21class TAttText;
22class TAttLine;
23class TAttFill;
24class TClass;
25
26class QDialog;
27class QFormLayout;
28
29
30namespace ROOT {
31namespace Experimental {
32
33class TQt6GedEditor : public TVirtualPadEditor, public TObject, public TQObject {
34
35 protected:
36
37 TCanvas *fCanvas = nullptr;
38 TVirtualPad *fPad = nullptr;
39 TObject *fModel = nullptr;
41
42 QDialog *fDialog = nullptr;
44
46
47 void ModifiedPad();
48
49 void AddHLine(QFormLayout *f, const char *lbl);
50
51 void AddColorElements(int colindx, QFormLayout *layout, std::function<void(int)> callback);
52
53 void FillGed(TClass *cl);
54
55 public:
56
57 TQt6GedEditor(TCanvas *c = nullptr);
58 virtual ~TQt6GedEditor();
59
60 Bool_t IsGlobal() const override { return fGlobal; }
61 void SetGlobal(Bool_t on) override { fGlobal = on; }
62
63 TCanvas* GetCanvas() const override { return fCanvas; }
64
67 void SetCanvas(TCanvas *c);
68
69 void Show() override;
70 void Hide() override;
71
72 void RecursiveRemove(TObject* obj) override;
73
74 virtual void SetModel(TVirtualPad* pad, TObject* obj, Int_t event);
75
76 // specific editors
77 void AddTAttLine(TAttLine *);
78 void AddTAttFill(TAttFill *);
79 void AddTAttText(TAttText *);
81
82 ClassDefOverride(TQt6GedEditor, 0) // Implementation for Ged Editor with Qt6
83};
84
85} // namespace Experimental
86} // namespace ROOT
87
88#endif
#define f(i)
Definition RSha256.hxx:104
#define c(i)
Definition RSha256.hxx:101
cudaEvent_t event
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 void on
void SetGlobal(Bool_t on) override
TCanvas * GetCanvas() const override
Bool_t IsGlobal() const override
void ConnectToCanvas(TCanvas *c)
Connect this editor to the Selected signal of canvas 'c'.
void DisconnectFromCanvas()
Disconnect this editor from the Selected signal of fCanvas.
void AddHLine(QFormLayout *f, const char *lbl)
void AddColorElements(int colindx, QFormLayout *layout, std::function< void(int)> callback)
void RecursiveRemove(TObject *obj) override
Recursively remove this object from a list.
virtual void SetModel(TVirtualPad *pad, TObject *obj, Int_t event)
Activate object editors according to the selected object.
Fill Area Attributes class.
Definition TAttFill.h:21
Line Attributes class.
Definition TAttLine.h:21
Marker Attributes class.
Definition TAttMarker.h:22
Text Attributes class.
Definition TAttText.h:21
The Canvas class.
Definition TCanvas.h:23
TClass instances represent classes, structs and namespaces in the ROOT type system.
Definition TClass.h:84
Mother of all ROOT objects.
Definition TObject.h:42
/**
Definition TQObject.h:48
Abstract base class used by ROOT graphics editor.
TVirtualPad is an abstract base class for the Pad and Canvas classes.
Definition TVirtualPad.h:51