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 <QGraphicsObject>
6
#include <QGraphicsSceneHoverEvent>
7
#include <QFont>
8
#include <QColor>
9
#include <QPen>
10
12
#include "
oks/class.hpp
"
13
14
namespace
dbse
15
{
16
17
class
SchemaGraphicSegmentedArrow
;
18
class
SchemaGraphicsScene
;
19
20
class
SchemaGraphicObject
:
public
QGraphicsObject
21
{
22
Q_OBJECT
23
public
:
24
explicit
SchemaGraphicObject
( QString & ClassName,
25
SchemaGraphicsScene
* scene,
26
QGraphicsObject * parent =
nullptr
);
27
~SchemaGraphicObject
();
28
29
[[nodiscard]]
dunedaq::oks::OksClass
*
GetClass
()
const
;
30
[[nodiscard]] QString
GetClassName
()
const
;
31
void
GetInfo
();
33
void
toggle_highlight_class
();
34
[[nodiscard]] QRectF
boundingRect
()
const override
;
35
[[nodiscard]] QPainterPath
shape
()
const override
;
36
void
paint
( QPainter * painter,
const
QStyleOptionGraphicsItem * option,
37
QWidget * widget )
override
;
39
void
AddArrow
(
SchemaGraphicSegmentedArrow
* Arrow );
40
void
RemoveArrow
(
SchemaGraphicSegmentedArrow
* Arrow );
41
void
RemoveArrows
();
42
bool
HasArrow
(
SchemaGraphicObject
* Dest )
const
;
43
void
update_arrows
();
44
bool
highlighted
()
const
{
return
m_highlight_class
;};
45
protected
:
46
QVariant
itemChange
( GraphicsItemChange change,
const
QVariant & value );
47
void
hoverEnterEvent
( QGraphicsSceneHoverEvent* ev );
48
void
hoverLeaveEvent
( QGraphicsSceneHoverEvent* ev );
49
void
mouseDoubleClickEvent
( QGraphicsSceneMouseEvent* ev );
50
private
:
51
void
set_font
();
52
SchemaGraphicsScene
*
m_scene
;
53
dunedaq::oks::OksClass
*
m_class_info
;
54
QString
m_class_object_name
;
55
QStringList
m_class_attributes
;
56
QStringList
m_class_attribute_values
;
57
QStringList
m_class_methods
;
58
QStringList
m_class_relationhips
;
59
60
QStringList
m_class_inherited_attributes
;
61
QStringList
m_class_inherited_relationhips
;
62
QStringList
m_class_inherited_methods
;
63
64
bool
m_inherited_properties_visible
;
65
bool
m_highlight_active
{
false
};
66
bool
m_highlight_class
{
false
};
67
QFont
m_font
;
68
QFont
m_bold_font
;
69
70
double
LineOffsetX
;
71
double
LineOffsetY
;
72
QList<SchemaGraphicSegmentedArrow *>
m_arrows
;
73
private
slots:
74
void
UpdateObject
( QString Name );
75
void
RemoveObject
( QString Name );
76
};
77
78
}
// namespace dbse
79
#endif
// SCHEMAGRAPHICOBJECT_H
class.hpp
dbse::SchemaGraphicObject::update_arrows
void update_arrows()
Definition
SchemaGraphicObject.cpp:503
dbse::SchemaGraphicObject::m_highlight_active
bool m_highlight_active
Definition
SchemaGraphicObject.hpp:65
dbse::SchemaGraphicObject::AddArrow
void AddArrow(SchemaGraphicSegmentedArrow *Arrow)
Arrow API.
Definition
SchemaGraphicObject.cpp:457
dbse::SchemaGraphicObject::m_class_attributes
QStringList m_class_attributes
Definition
SchemaGraphicObject.hpp:55
dbse::SchemaGraphicObject::m_class_relationhips
QStringList m_class_relationhips
Definition
SchemaGraphicObject.hpp:58
dbse::SchemaGraphicObject::m_arrows
QList< SchemaGraphicSegmentedArrow * > m_arrows
Definition
SchemaGraphicObject.hpp:72
dbse::SchemaGraphicObject::RemoveObject
void RemoveObject(QString Name)
Definition
SchemaGraphicObject.cpp:574
dbse::SchemaGraphicObject::highlighted
bool highlighted() const
Definition
SchemaGraphicObject.hpp:44
dbse::SchemaGraphicObject::shape
QPainterPath shape() const override
Definition
SchemaGraphicObject.cpp:332
dbse::SchemaGraphicObject::UpdateObject
void UpdateObject(QString Name)
Definition
SchemaGraphicObject.cpp:545
dbse::SchemaGraphicObject::hoverLeaveEvent
void hoverLeaveEvent(QGraphicsSceneHoverEvent *ev)
Definition
SchemaGraphicObject.cpp:121
dbse::SchemaGraphicObject::m_class_inherited_methods
QStringList m_class_inherited_methods
Definition
SchemaGraphicObject.hpp:62
dbse::SchemaGraphicObject::paint
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
Definition
SchemaGraphicObject.cpp:339
dbse::SchemaGraphicObject::m_highlight_class
bool m_highlight_class
Definition
SchemaGraphicObject.hpp:66
dbse::SchemaGraphicObject::LineOffsetX
double LineOffsetX
Definition
SchemaGraphicObject.hpp:70
dbse::SchemaGraphicObject::RemoveArrow
void RemoveArrow(SchemaGraphicSegmentedArrow *Arrow)
Definition
SchemaGraphicObject.cpp:462
dbse::SchemaGraphicObject::RemoveArrows
void RemoveArrows()
Definition
SchemaGraphicObject.cpp:472
dbse::SchemaGraphicObject::m_class_object_name
QString m_class_object_name
Definition
SchemaGraphicObject.hpp:54
dbse::SchemaGraphicObject::set_font
void set_font()
Definition
SchemaGraphicObject.cpp:511
dbse::SchemaGraphicObject::m_inherited_properties_visible
bool m_inherited_properties_visible
Definition
SchemaGraphicObject.hpp:64
dbse::SchemaGraphicObject::SchemaGraphicObject
SchemaGraphicObject(QString &ClassName, SchemaGraphicsScene *scene, QGraphicsObject *parent=nullptr)
Definition
SchemaGraphicObject.cpp:22
dbse::SchemaGraphicObject::~SchemaGraphicObject
~SchemaGraphicObject()
Definition
SchemaGraphicObject.cpp:51
dbse::SchemaGraphicObject::m_class_methods
QStringList m_class_methods
Definition
SchemaGraphicObject.hpp:57
dbse::SchemaGraphicObject::hoverEnterEvent
void hoverEnterEvent(QGraphicsSceneHoverEvent *ev)
Definition
SchemaGraphicObject.cpp:57
dbse::SchemaGraphicObject::GetClassName
QString GetClassName() const
Definition
SchemaGraphicObject.cpp:137
dbse::SchemaGraphicObject::itemChange
QVariant itemChange(GraphicsItemChange change, const QVariant &value)
Definition
SchemaGraphicObject.cpp:533
dbse::SchemaGraphicObject::m_class_attribute_values
QStringList m_class_attribute_values
Definition
SchemaGraphicObject.hpp:56
dbse::SchemaGraphicObject::toggle_highlight_class
void toggle_highlight_class()
Graphic API.
Definition
SchemaGraphicObject.cpp:525
dbse::SchemaGraphicObject::m_font
QFont m_font
Definition
SchemaGraphicObject.hpp:67
dbse::SchemaGraphicObject::GetClass
dunedaq::oks::OksClass * GetClass() const
Definition
SchemaGraphicObject.cpp:132
dbse::SchemaGraphicObject::boundingRect
QRectF boundingRect() const override
Definition
SchemaGraphicObject.cpp:249
dbse::SchemaGraphicObject::LineOffsetY
double LineOffsetY
Definition
SchemaGraphicObject.hpp:71
dbse::SchemaGraphicObject::m_bold_font
QFont m_bold_font
Definition
SchemaGraphicObject.hpp:68
dbse::SchemaGraphicObject::GetInfo
void GetInfo()
Definition
SchemaGraphicObject.cpp:142
dbse::SchemaGraphicObject::m_class_inherited_relationhips
QStringList m_class_inherited_relationhips
Definition
SchemaGraphicObject.hpp:61
dbse::SchemaGraphicObject::m_class_info
dunedaq::oks::OksClass * m_class_info
Definition
SchemaGraphicObject.hpp:53
dbse::SchemaGraphicObject::m_scene
SchemaGraphicsScene * m_scene
Definition
SchemaGraphicObject.hpp:52
dbse::SchemaGraphicObject::m_class_inherited_attributes
QStringList m_class_inherited_attributes
Definition
SchemaGraphicObject.hpp:60
dbse::SchemaGraphicObject::HasArrow
bool HasArrow(SchemaGraphicObject *Dest) const
Definition
SchemaGraphicObject.cpp:482
dbse::SchemaGraphicObject::mouseDoubleClickEvent
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *ev)
Definition
SchemaGraphicObject.cpp:127
dbse::SchemaGraphicSegmentedArrow
Definition
SchemaGraphicSegmentedArrow.hpp:14
dbse::SchemaGraphicsScene
Definition
SchemaGraphicsScene.hpp:16
dunedaq::oks::OksClass
The OKS class.
Definition
class.hpp:205
dbse
Including QT Headers.
Definition
SchemaAttributeEditor.hpp:14
Generated on
for DUNE-DAQ by
1.17.0