ROOT
master
Reference Guide
Loading...
Searching...
No Matches
QRootContextMenu.h
Go to the documentation of this file.
1
// Author: Sergey Linev 2/07/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_QRootContextMenu
12
#define ROOT_QRootContextMenu
13
14
#include <QObject>
15
#include <QString>
16
#include <QColor>
17
18
#include "
TContextMenuImp.h
"
19
#include "
TObject.h
"
20
#include "
TList.h
"
21
#include <map>
22
23
class
QSignalMapper
;
24
class
TList
;
25
class
QAction
;
26
class
QMenu
;
27
class
QFormLayout
;
28
class
QPushButton
;
29
30
class
QRootContextMenu
:
public
QObject
,
public
TObject
,
public
TContextMenuImp
{
31
Q_OBJECT
32
33
public
slots
:
34
void
executeMenu
(
int
id
);
35
36
protected
:
37
38
QColor
fSelectedColor
;
// selected color in attributes editors
39
QPushButton
*
fColorButton
=
nullptr
;
40
41
TList
fTrash
;
42
std::map<int, void*>
fCustomArg
;
43
QAction
*
addMenuAction
(
QMenu
*
menu
,
QSignalMapper
*map,
const
QString &
text
,
int
id
,
void
*arg =
nullptr
);
44
45
void
AddColorElements
(
int
colindx
,
QFormLayout
*
layout
);
46
void
UpdateColorElements
();
47
48
void
SetLineAttributesDialog
();
49
void
SetFillAttributesDialog
();
50
void
SetTextAttributesDialog
();
51
void
SetMarkerAttributesDialog
();
52
53
public
:
54
QRootContextMenu
(
TContextMenu
*
c
=
nullptr
,
const
char
*
name
=
"ROOT Context Menu"
);
55
~QRootContextMenu
()
override
;
56
57
void
DisplayPopup
(
Int_t
x
,
Int_t
y
)
override
;
58
void
Dialog
(
TObject
*
object
,
TMethod
*
method
)
override
;
59
void
Dialog
(
TObject
*
object
,
TFunction
*function)
override
;
60
61
void
RecursiveRemove
(
TObject
*obj)
override
;
62
};
63
64
#endif
c
#define c(i)
Definition
RSha256.hxx:101
TRangeDynCast
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
Definition
TCollection.h:359
TContextMenuImp.h
text
Option_t Option_t TPoint TPoint const char text
Definition
TGWin32VirtualXProxy.cxx:68
name
char name[80]
Definition
TGX11.cxx:142
TList.h
TObject.h
QObject
QRootContextMenu
This class provides an interface to context-sensitive popup menus.
Definition
QRootContextMenu.h:30
QRootContextMenu::fColorButton
QPushButton * fColorButton
Definition
QRootContextMenu.h:39
QRootContextMenu::executeMenu
void executeMenu(int id)
Execute specified menu item.
Definition
QRootContextMenu.cpp:753
QRootContextMenu::UpdateColorElements
void UpdateColorElements()
Update color button with currently selected color.
Definition
QRootContextMenu.cpp:357
QRootContextMenu::SetTextAttributesDialog
void SetTextAttributesDialog()
Start TAttText editor.
Definition
QRootContextMenu.cpp:557
QRootContextMenu::SetFillAttributesDialog
void SetFillAttributesDialog()
Start TAttFill editor.
Definition
QRootContextMenu.cpp:453
QRootContextMenu::SetLineAttributesDialog
void SetLineAttributesDialog()
Start TAttLine editor.
Definition
QRootContextMenu.cpp:370
QRootContextMenu::fSelectedColor
QColor fSelectedColor
Definition
QRootContextMenu.h:38
QRootContextMenu::Dialog
void Dialog(TObject *object, TMethod *method) override
Create dialog object with OK and Cancel buttons.
Definition
QRootContextMenu.cpp:248
QRootContextMenu::RecursiveRemove
void RecursiveRemove(TObject *obj) override
Handle remove of some ROOT objects.
Definition
QRootContextMenu.cpp:267
QRootContextMenu::QRootContextMenu
QRootContextMenu(TContextMenu *c=nullptr, const char *name="ROOT Context Menu")
Create context menu.
Definition
QRootContextMenu.cpp:61
QRootContextMenu::fTrash
TList fTrash
Definition
QRootContextMenu.h:41
QRootContextMenu::addMenuAction
QAction * addMenuAction(QMenu *menu, QSignalMapper *map, const QString &text, int id, void *arg=nullptr)
Register menu action in signal map.
Definition
QRootContextMenu.cpp:283
QRootContextMenu::~QRootContextMenu
~QRootContextMenu() override
Delete a context menu.
Definition
QRootContextMenu.cpp:70
QRootContextMenu::AddColorElements
void AddColorElements(int colindx, QFormLayout *layout)
Add color elements to attributes editor dialog.
Definition
QRootContextMenu.cpp:310
QRootContextMenu::fCustomArg
std::map< int, void * > fCustomArg
Definition
QRootContextMenu.h:42
QRootContextMenu::SetMarkerAttributesDialog
void SetMarkerAttributesDialog()
Start TAttMarker editor.
Definition
QRootContextMenu.cpp:676
QRootContextMenu::DisplayPopup
void DisplayPopup(Int_t x, Int_t y) override
Display context popup menu for currently selected object.
Definition
QRootContextMenu.cpp:79
ROOT::Detail::TRangeCast
Definition
TCollection.h:312
TContextMenuImp
This class provides an interface to GUI independent context sensitive popup menus.
Definition
TContextMenuImp.h:23
TContextMenu
This class provides an interface to context sensitive popup menus.
Definition
TContextMenu.h:34
TFunction
Global functions class (global functions are obtained from CINT).
Definition
TFunction.h:30
TList
A doubly linked list.
Definition
TList.h:38
TMethod
Each ROOT class (see TClass) has a linked list of methods.
Definition
TMethod.h:38
TObject
Mother of all ROOT objects.
Definition
TObject.h:42
int
y
Double_t y[n]
Definition
legend1.C:17
x
Double_t x[n]
Definition
legend1.C:17
gui
qt6canvas
src
QRootContextMenu.h
ROOTmaster - Reference Guide Generated on Tue Sep 22 2026 05:08:01 (GVA Time) using Doxygen 1.10.0