DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
sourcecode
dbe
include
dbe
SchemaGraphicObject.hpp
Go to the documentation of this file.
1
#ifndef SCHEMAGRAPHICOBJECT_H
2
#define SCHEMAGRAPHICOBJECT_H
3
5
#include <QColor>
6
#include <QFont>
7
#include <QGraphicsObject>
8
#include <QGraphicsSceneHoverEvent>
9
#include <QPen>
10
12
#include "
oks/class.hpp
"
13
14
namespace
dbse
{
15
16
class
SchemaGraphicSegmentedArrow
;
17
class
SchemaGraphicsScene
;
18
19
class
SchemaGraphicObject
:
public
QGraphicsObject
20
{
21
Q_OBJECT
22
public
:
23
explicit
SchemaGraphicObject
(QString& ClassName,
SchemaGraphicsScene
* scene, QGraphicsObject* parent =
nullptr
);
24
~SchemaGraphicObject
();
25
26
[[nodiscard]]
dunedaq::oks::OksClass
*
GetClass
()
const
;
27
[[nodiscard]] QString
GetClassName
()
const
;
28
void
GetInfo
();
30
void
toggle_highlight_class
();
31
[[nodiscard]] QRectF
boundingRect
()
const override
;
32
[[nodiscard]] QPainterPath
shape
()
const override
;
33
void
paint
(QPainter* painter,
const
QStyleOptionGraphicsItem* option, QWidget* widget)
override
;
35
void
AddArrow
(
SchemaGraphicSegmentedArrow
* Arrow);
36
void
RemoveArrow
(
SchemaGraphicSegmentedArrow
* Arrow);
37
void
RemoveArrows
();
38
bool
HasArrow
(
SchemaGraphicObject
* Dest)
const
;
39
void
update_arrows
();
40
bool
highlighted
()
const
{
return
m_highlight_class
; };
41
42
protected
:
43
QVariant
itemChange
(GraphicsItemChange change,
const
QVariant& value);
44
void
hoverEnterEvent
(QGraphicsSceneHoverEvent* ev);
45
void
hoverLeaveEvent
(QGraphicsSceneHoverEvent* ev);
46
void
mouseDoubleClickEvent
(QGraphicsSceneMouseEvent* ev);
47
48
private
:
49
void
set_font
();
50
SchemaGraphicsScene
*
m_scene
;
51
dunedaq::oks::OksClass
*
m_class_info
;
52
QString
m_class_object_name
;
53
QStringList
m_class_attributes
;
54
QStringList
m_class_attribute_values
;
55
QStringList
m_class_methods
;
56
QStringList
m_class_relationhips
;
57
58
QStringList
m_class_inherited_attributes
;
59
QStringList
m_class_inherited_relationhips
;
60
QStringList
m_class_inherited_methods
;
61
62
bool
m_inherited_properties_visible
;
63
bool
m_highlight_active
{
false
};
64
bool
m_highlight_class
{
false
};
65
QFont
m_font
;
66
QFont
m_bold_font
;
67
68
double
LineOffsetX
;
69
double
LineOffsetY
;
70
QList<SchemaGraphicSegmentedArrow*>
m_arrows
;
71
private
slots:
72
void
UpdateObject
(QString Name);
73
void
RemoveObject
(QString Name);
74
};
75
76
}
// namespace dbse
77
#endif
// SCHEMAGRAPHICOBJECT_H
class.hpp
dbse::SchemaGraphicObject::update_arrows
void update_arrows()
Definition
SchemaGraphicObject.cpp:470
dbse::SchemaGraphicObject::m_highlight_active
bool m_highlight_active
Definition
SchemaGraphicObject.hpp:63
dbse::SchemaGraphicObject::AddArrow
void AddArrow(SchemaGraphicSegmentedArrow *Arrow)
Arrow API.
Definition
SchemaGraphicObject.cpp:425
dbse::SchemaGraphicObject::m_class_attributes
QStringList m_class_attributes
Definition
SchemaGraphicObject.hpp:53
dbse::SchemaGraphicObject::m_class_relationhips
QStringList m_class_relationhips
Definition
SchemaGraphicObject.hpp:56
dbse::SchemaGraphicObject::RemoveObject
void RemoveObject(QString Name)
Definition
SchemaGraphicObject.cpp:539
dbse::SchemaGraphicObject::highlighted
bool highlighted() const
Definition
SchemaGraphicObject.hpp:40
dbse::SchemaGraphicObject::shape
QPainterPath shape() const override
Definition
SchemaGraphicObject.cpp:312
dbse::SchemaGraphicObject::UpdateObject
void UpdateObject(QString Name)
Definition
SchemaGraphicObject.cpp:511
dbse::SchemaGraphicObject::hoverLeaveEvent
void hoverLeaveEvent(QGraphicsSceneHoverEvent *ev)
Definition
SchemaGraphicObject.cpp:111
dbse::SchemaGraphicObject::m_class_inherited_methods
QStringList m_class_inherited_methods
Definition
SchemaGraphicObject.hpp:60
dbse::SchemaGraphicObject::paint
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
Definition
SchemaGraphicObject.cpp:320
dbse::SchemaGraphicObject::m_highlight_class
bool m_highlight_class
Definition
SchemaGraphicObject.hpp:64
dbse::SchemaGraphicObject::LineOffsetX
double LineOffsetX
Definition
SchemaGraphicObject.hpp:68
dbse::SchemaGraphicObject::RemoveArrow
void RemoveArrow(SchemaGraphicSegmentedArrow *Arrow)
Definition
SchemaGraphicObject.cpp:431
dbse::SchemaGraphicObject::RemoveArrows
void RemoveArrows()
Definition
SchemaGraphicObject.cpp:441
dbse::SchemaGraphicObject::m_class_object_name
QString m_class_object_name
Definition
SchemaGraphicObject.hpp:52
dbse::SchemaGraphicObject::set_font
void set_font()
Definition
SchemaGraphicObject.cpp:478
dbse::SchemaGraphicObject::m_inherited_properties_visible
bool m_inherited_properties_visible
Definition
SchemaGraphicObject.hpp:62
dbse::SchemaGraphicObject::m_arrows
QList< SchemaGraphicSegmentedArrow * > m_arrows
Definition
SchemaGraphicObject.hpp:70
dbse::SchemaGraphicObject::SchemaGraphicObject
SchemaGraphicObject(QString &ClassName, SchemaGraphicsScene *scene, QGraphicsObject *parent=nullptr)
Definition
SchemaGraphicObject.cpp:22
dbse::SchemaGraphicObject::m_class_methods
QStringList m_class_methods
Definition
SchemaGraphicObject.hpp:55
dbse::SchemaGraphicObject::hoverEnterEvent
void hoverEnterEvent(QGraphicsSceneHoverEvent *ev)
Definition
SchemaGraphicObject.cpp:50
dbse::SchemaGraphicObject::GetClassName
QString GetClassName() const
Definition
SchemaGraphicObject.cpp:132
dbse::SchemaGraphicObject::itemChange
QVariant itemChange(GraphicsItemChange change, const QVariant &value)
Definition
SchemaGraphicObject.cpp:500
dbse::SchemaGraphicObject::m_class_attribute_values
QStringList m_class_attribute_values
Definition
SchemaGraphicObject.hpp:54
dbse::SchemaGraphicObject::toggle_highlight_class
void toggle_highlight_class()
Graphic API.
Definition
SchemaGraphicObject.cpp:492
dbse::SchemaGraphicObject::m_font
QFont m_font
Definition
SchemaGraphicObject.hpp:65
dbse::SchemaGraphicObject::GetClass
dunedaq::oks::OksClass * GetClass() const
Definition
SchemaGraphicObject.cpp:126
dbse::SchemaGraphicObject::boundingRect
QRectF boundingRect() const override
Definition
SchemaGraphicObject.cpp:242
dbse::SchemaGraphicObject::LineOffsetY
double LineOffsetY
Definition
SchemaGraphicObject.hpp:69
dbse::SchemaGraphicObject::m_bold_font
QFont m_bold_font
Definition
SchemaGraphicObject.hpp:66
dbse::SchemaGraphicObject::GetInfo
void GetInfo()
Definition
SchemaGraphicObject.cpp:138
dbse::SchemaGraphicObject::m_class_inherited_relationhips
QStringList m_class_inherited_relationhips
Definition
SchemaGraphicObject.hpp:59
dbse::SchemaGraphicObject::m_class_info
dunedaq::oks::OksClass * m_class_info
Definition
SchemaGraphicObject.hpp:51
dbse::SchemaGraphicObject::m_scene
SchemaGraphicsScene * m_scene
Definition
SchemaGraphicObject.hpp:50
dbse::SchemaGraphicObject::m_class_inherited_attributes
QStringList m_class_inherited_attributes
Definition
SchemaGraphicObject.hpp:58
dbse::SchemaGraphicObject::HasArrow
bool HasArrow(SchemaGraphicObject *Dest) const
Definition
SchemaGraphicObject.cpp:451
dbse::SchemaGraphicObject::mouseDoubleClickEvent
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *ev)
Definition
SchemaGraphicObject.cpp:119
dbse::SchemaGraphicSegmentedArrow
Definition
SchemaGraphicSegmentedArrow.hpp:13
dbse::SchemaGraphicsScene
Definition
SchemaGraphicsScene.hpp:15
dunedaq::oks::OksClass
The OKS class.
Definition
class.hpp:223
dbse
Including QT Headers.
Definition
SchemaAttributeEditor.hpp:13
Generated on
for DUNE-DAQ by
1.18.0