DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
sourcecode
dbe
include
dbe
SchemaGraphicSegmentedArrow.hpp
Go to the documentation of this file.
1
#ifndef SchemaGraphicSegmentedArrow_H
2
#define SchemaGraphicSegmentedArrow_H
3
5
#include <QGraphicsPathItem>
7
#include "
dbe/SchemaGraphicObject.hpp
"
8
#include "
dbe/SchemaGraphicsScene.hpp
"
9
10
namespace
dbse
{
11
12
class
SchemaGraphicSegmentedArrow
:
public
QGraphicsPathItem
13
{
14
public
:
15
SchemaGraphicSegmentedArrow
(
SchemaGraphicObject
* StartItem,
16
SchemaGraphicObject
* EndItem,
17
int
connection_count,
18
bool
IsInheritance,
19
bool
IsComposite,
20
QString ArrowName,
21
QString ArrowCardinality,
22
QGraphicsItem* parent =
nullptr
);
23
~SchemaGraphicSegmentedArrow
();
24
QRectF
boundingRect
()
const
;
25
QPainterPath
shape
()
const
;
26
void
UpdatePosition
();
27
SchemaGraphicObject
*
GetStartItem
()
const
;
28
SchemaGraphicObject
*
GetEndItem
()
const
;
29
bool
GetInheritanceMode
();
30
void
RemoveArrow
();
31
32
protected
:
33
void
paint
(QPainter* painter,
const
QStyleOptionGraphicsItem* option, QWidget* widget = 0);
34
void
hoverEnterEvent
(QGraphicsSceneHoverEvent* ev);
35
void
hoverLeaveEvent
(QGraphicsSceneHoverEvent* ev);
36
37
private
:
38
QPointF
p1
()
const
{
return
path().elementCount() > 0 ? path().elementAt(0) : QPointF(); }
39
QPointF
p2
()
const
{
return
path().elementCount() > 0 ? path().elementAt(path().elementCount() - 1) : QPointF(); }
40
qreal
dx
()
const
{
return
p2
().x() -
p1
().x(); }
41
qreal
dy
()
const
{
return
p2
().y() -
p1
().y(); }
42
43
QPolygonF
make_arrow_head
(qreal angle)
const
;
44
QPolygonF
make_rhombus
(qreal angle)
const
;
45
46
SchemaGraphicObject
*
m_start_item
;
47
SchemaGraphicObject
*
m_end_item
;
48
int
m_connection_count
;
49
QPolygonF
m_marker
;
50
QRectF
m_rel_label_br
;
51
QRectF
m_rel_cardinality_br
;
52
bool
m_inheritance
;
53
bool
m_composite
;
54
QString
m_name
;
55
QString
m_cardinality
;
56
QColor
m_default_color
;
57
QFont
m_label_font
;
58
qreal
m_arrow_size
;
59
60
double
LastDegree
;
61
double
LastRotation
;
62
// QString LabelString;
63
};
64
65
}
// namespace dbse
66
#endif
// SchemaGraphicSegmentedArrow_H
SchemaGraphicObject.hpp
SchemaGraphicsScene.hpp
dbse::SchemaGraphicObject
Definition
SchemaGraphicObject.hpp:20
dbse::SchemaGraphicSegmentedArrow::dx
qreal dx() const
Definition
SchemaGraphicSegmentedArrow.hpp:40
dbse::SchemaGraphicSegmentedArrow::dy
qreal dy() const
Definition
SchemaGraphicSegmentedArrow.hpp:41
dbse::SchemaGraphicSegmentedArrow::make_rhombus
QPolygonF make_rhombus(qreal angle) const
Definition
SchemaGraphicSegmentedArrow.cpp:317
dbse::SchemaGraphicSegmentedArrow::m_rel_cardinality_br
QRectF m_rel_cardinality_br
Definition
SchemaGraphicSegmentedArrow.hpp:51
dbse::SchemaGraphicSegmentedArrow::shape
QPainterPath shape() const
Definition
SchemaGraphicSegmentedArrow.cpp:82
dbse::SchemaGraphicSegmentedArrow::GetEndItem
SchemaGraphicObject * GetEndItem() const
Definition
SchemaGraphicSegmentedArrow.cpp:281
dbse::SchemaGraphicSegmentedArrow::m_marker
QPolygonF m_marker
Definition
SchemaGraphicSegmentedArrow.hpp:49
dbse::SchemaGraphicSegmentedArrow::p2
QPointF p2() const
Definition
SchemaGraphicSegmentedArrow.hpp:39
dbse::SchemaGraphicSegmentedArrow::m_connection_count
int m_connection_count
Definition
SchemaGraphicSegmentedArrow.hpp:48
dbse::SchemaGraphicSegmentedArrow::m_name
QString m_name
Definition
SchemaGraphicSegmentedArrow.hpp:54
dbse::SchemaGraphicSegmentedArrow::SchemaGraphicSegmentedArrow
SchemaGraphicSegmentedArrow(SchemaGraphicObject *StartItem, SchemaGraphicObject *EndItem, int connection_count, bool IsInheritance, bool IsComposite, QString ArrowName, QString ArrowCardinality, QGraphicsItem *parent=nullptr)
Definition
SchemaGraphicSegmentedArrow.cpp:18
dbse::SchemaGraphicSegmentedArrow::m_end_item
SchemaGraphicObject * m_end_item
Definition
SchemaGraphicSegmentedArrow.hpp:47
dbse::SchemaGraphicSegmentedArrow::m_inheritance
bool m_inheritance
Definition
SchemaGraphicSegmentedArrow.hpp:52
dbse::SchemaGraphicSegmentedArrow::make_arrow_head
QPolygonF make_arrow_head(qreal angle) const
Definition
SchemaGraphicSegmentedArrow.cpp:303
dbse::SchemaGraphicSegmentedArrow::m_rel_label_br
QRectF m_rel_label_br
Definition
SchemaGraphicSegmentedArrow.hpp:50
dbse::SchemaGraphicSegmentedArrow::GetStartItem
SchemaGraphicObject * GetStartItem() const
Definition
SchemaGraphicSegmentedArrow.cpp:275
dbse::SchemaGraphicSegmentedArrow::m_arrow_size
qreal m_arrow_size
Definition
SchemaGraphicSegmentedArrow.hpp:58
dbse::SchemaGraphicSegmentedArrow::LastDegree
double LastDegree
Definition
SchemaGraphicSegmentedArrow.hpp:60
dbse::SchemaGraphicSegmentedArrow::RemoveArrow
void RemoveArrow()
Definition
SchemaGraphicSegmentedArrow.cpp:293
dbse::SchemaGraphicSegmentedArrow::UpdatePosition
void UpdatePosition()
Definition
SchemaGraphicSegmentedArrow.cpp:96
dbse::SchemaGraphicSegmentedArrow::GetInheritanceMode
bool GetInheritanceMode()
Definition
SchemaGraphicSegmentedArrow.cpp:287
dbse::SchemaGraphicSegmentedArrow::hoverLeaveEvent
void hoverLeaveEvent(QGraphicsSceneHoverEvent *ev)
Definition
SchemaGraphicSegmentedArrow.cpp:60
dbse::SchemaGraphicSegmentedArrow::boundingRect
QRectF boundingRect() const
Definition
SchemaGraphicSegmentedArrow.cpp:67
dbse::SchemaGraphicSegmentedArrow::hoverEnterEvent
void hoverEnterEvent(QGraphicsSceneHoverEvent *ev)
Definition
SchemaGraphicSegmentedArrow.cpp:48
dbse::SchemaGraphicSegmentedArrow::m_cardinality
QString m_cardinality
Definition
SchemaGraphicSegmentedArrow.hpp:55
dbse::SchemaGraphicSegmentedArrow::paint
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Definition
SchemaGraphicSegmentedArrow.cpp:335
dbse::SchemaGraphicSegmentedArrow::p1
QPointF p1() const
Definition
SchemaGraphicSegmentedArrow.hpp:38
dbse::SchemaGraphicSegmentedArrow::m_composite
bool m_composite
Definition
SchemaGraphicSegmentedArrow.hpp:53
dbse::SchemaGraphicSegmentedArrow::m_default_color
QColor m_default_color
Definition
SchemaGraphicSegmentedArrow.hpp:56
dbse::SchemaGraphicSegmentedArrow::LastRotation
double LastRotation
Definition
SchemaGraphicSegmentedArrow.hpp:61
dbse::SchemaGraphicSegmentedArrow::m_label_font
QFont m_label_font
Definition
SchemaGraphicSegmentedArrow.hpp:57
dbse::SchemaGraphicSegmentedArrow::m_start_item
SchemaGraphicObject * m_start_item
Definition
SchemaGraphicSegmentedArrow.hpp:46
dbse
Including QT Headers.
Definition
SchemaAttributeEditor.hpp:13
Generated on
for DUNE-DAQ by
1.18.0