38#include <QtCore/QSignalMapper>
49#include <QColorDialog>
50#include <QDoubleSpinBox>
64 gROOT->GetListOfCleanups()->Add(
this);
72 gROOT->GetListOfCleanups()->Remove(
this);
96 QPoint screenPos = widget->mapToGlobal(widget->rect().topLeft());
101 QObject::connect(&map, &QSignalMapper::mappedInt,
108 bool last_separ =
true;
116 TIter nextItem(menuItemList);
119 switch (menuItem->GetType()) {
134 TClass *classPtr =
nullptr;
135 TIter next(methodList);
138 while ((method = (
TMethod*) next())) {
139 if (classPtr != method->
GetClass()) {
163 if (
m->GetterMethod()) {
165 QMenu *
r = menu.addMenu(method->
GetName());
166 TIter nxt(
m->GetOptions());
168 const char *
name = it->fOptName;
177 act->setCheckable(
true);
179 act->setChecked(
true);
199 act->setCheckable(
true);
201 act->setChecked(
true);
212 const char* menuItemTitle = menuItem->
GetTitle();
213 if (menuItem->IsToggle()) {
221 if (strlen(menuItemTitle)==0)
222 menuItemTitle = method->
GetName();
223 auto act =
addMenuAction(&menu, &map, menuItemTitle, toggle++, t);
224 act->setCheckable(
true);
226 act->setChecked(
true);
229 if (strlen(menuItemTitle)==0)
230 menuItemTitle = menuItem->GetFunctionName();
231 addMenuAction(&menu, &map, menuItemTitle, userfunction++, menuItem);
241 menu.exec(screenPos + QPoint(
x,
y));
287 QAction* act =
new QAction(
text, menu);
290 if ((
text.compare(
"DrawClone") == 0) || (
text.compare(
"DrawClass") == 0) || (
text.compare(
"Inspect") == 0) ||
291 (
text.compare(
"SetShowProjectionX") == 0) || (
text.compare(
"SetShowProjectionY") == 0) ||
292 (
text.compare(
"DrawPanel") == 0) || (
text.compare(
"FitPanel") == 0))
293 act->setEnabled(
false);
295 QObject::connect(act, &QAction::triggered, [
id, map]() {
299 menu->addAction(act);
300 map->setMapping(act,
id);
342 if (t->GetState() == 0)
long Long_t
Signed long integer 4 bytes (long). Size depends on architecture.
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t r
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize id
Option_t Option_t TPoint TPoint const char text
Specialized dialog to enter arguments for method exection.
void methodDialog(TContextMenu *menu, TObject *object, TFunction *func)
Run method dialog.
QPaintWidget * GetPaintWidget() const
TClass instances represent classes, structs and namespaces in the ROOT type system.
TList * GetMenuList() const
Return the list of menu items associated with the class.
TMethod * GetMethodWithPrototype(const char *method, const char *proto, Bool_t objectIsConst=kFALSE, ROOT::EFunctionMatchMode mode=ROOT::kConversionMatch)
Find the method with a given prototype.
void GetMenuItems(TList *listitems)
Returns list of methods accessible by context menu.
Global functions class (global functions are obtained from CINT).
void Add(TObject *obj) override
void Delete(Option_t *option="") override
Remove all objects from the list AND delete all heap based objects.
TClass * IsA() const override
Method or function calling interface.
TFunction * GetMethod()
Returns the TMethod describing the method to be executed.
Each ROOT class (see TClass) has a linked list of methods.
virtual TDataMember * FindDataMember()
Tries to guess DataMember from comment string and Method's name <==(only if 1 Argument!...
TClass * GetClass() const
EMenuItemKind IsMenuItem() const
TClass * IsA() const override
const char * GetName() const override
Returns name of object.
Mother of all ROOT objects.
virtual const char * GetTitle() const
Returns title of object.
This class defines toggling facility for both - object's method or variables.
virtual void SetOnValue(Long_t lon)
TMethodCall * GetSetter() const
virtual void SetToggledObject(TObject *obj, TMethod *anymethod)
Initializes it to toggle an object's datamember using this object's method.
virtual Bool_t GetState()
Returns the state of Toggle according to its current value and fOnValue, returns true if they match.