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
13
class
SchemaGraphicSegmentedArrow
:
public
QGraphicsPathItem
14
{
15
public
:
16
SchemaGraphicSegmentedArrow
(
SchemaGraphicObject
* StartItem,
SchemaGraphicObject
* EndItem,
17
int
connection_count,
18
bool
IsInheritance,
bool
IsComposite, QString ArrowName,
19
QString ArrowCardinality, QGraphicsItem * parent =
nullptr
);
20
~SchemaGraphicSegmentedArrow
();
21
QRectF
boundingRect
()
const
;
22
QPainterPath
shape
()
const
;
23
void
UpdatePosition
();
24
SchemaGraphicObject
*
GetStartItem
()
const
;
25
SchemaGraphicObject
*
GetEndItem
()
const
;
26
bool
GetInheritanceMode
();
27
void
RemoveArrow
();
28
protected
:
29
void
paint
( QPainter * painter,
const
QStyleOptionGraphicsItem * option,
30
QWidget * widget = 0 );
31
void
hoverEnterEvent
( QGraphicsSceneHoverEvent* ev );
32
void
hoverLeaveEvent
( QGraphicsSceneHoverEvent* ev );
33
private
:
34
35
QPointF
p1
()
const
{
return
path().elementCount() > 0 ? path().elementAt(0) : QPointF(); }
36
QPointF
p2
()
const
{
return
path().elementCount() > 0 ? path().elementAt(path().elementCount()-1) : QPointF(); }
37
qreal
dx
()
const
{
return
p2
().x() -
p1
().x(); }
38
qreal
dy
()
const
{
return
p2
().y() -
p1
().y(); }
39
40
QPolygonF
make_arrow_head
(qreal angle)
const
;
41
QPolygonF
make_rhombus
(qreal angle)
const
;
42
43
SchemaGraphicObject
*
m_start_item
;
44
SchemaGraphicObject
*
m_end_item
;
45
int
m_connection_count
;
46
QPolygonF
m_marker
;
47
QRectF
m_rel_label_br
;
48
QRectF
m_rel_cardinality_br
;
49
bool
m_inheritance
;
50
bool
m_composite
;
51
QString
m_name
;
52
QString
m_cardinality
;
53
QColor
m_default_color
;
54
QFont
m_label_font
;
55
qreal
m_arrow_size
;
56
57
double
LastDegree
;
58
double
LastRotation
;
59
//QString LabelString;
60
};
61
62
}
// namespace dbse
63
#endif
// SchemaGraphicSegmentedArrow_H
SchemaGraphicObject.hpp
SchemaGraphicsScene.hpp
dbse::SchemaGraphicObject
Definition
SchemaGraphicObject.hpp:21
dbse::SchemaGraphicSegmentedArrow::dx
qreal dx() const
Definition
SchemaGraphicSegmentedArrow.hpp:37
dbse::SchemaGraphicSegmentedArrow::dy
qreal dy() const
Definition
SchemaGraphicSegmentedArrow.hpp:38
dbse::SchemaGraphicSegmentedArrow::make_rhombus
QPolygonF make_rhombus(qreal angle) const
Definition
SchemaGraphicSegmentedArrow.cpp:352
dbse::SchemaGraphicSegmentedArrow::m_rel_cardinality_br
QRectF m_rel_cardinality_br
Definition
SchemaGraphicSegmentedArrow.hpp:48
dbse::SchemaGraphicSegmentedArrow::shape
QPainterPath shape() const
Definition
SchemaGraphicSegmentedArrow.cpp:81
dbse::SchemaGraphicSegmentedArrow::GetEndItem
SchemaGraphicObject * GetEndItem() const
Definition
SchemaGraphicSegmentedArrow.cpp:318
dbse::SchemaGraphicSegmentedArrow::m_marker
QPolygonF m_marker
Definition
SchemaGraphicSegmentedArrow.hpp:46
dbse::SchemaGraphicSegmentedArrow::p2
QPointF p2() const
Definition
SchemaGraphicSegmentedArrow.hpp:36
dbse::SchemaGraphicSegmentedArrow::~SchemaGraphicSegmentedArrow
~SchemaGraphicSegmentedArrow()
Definition
SchemaGraphicSegmentedArrow.cpp:44
dbse::SchemaGraphicSegmentedArrow::m_connection_count
int m_connection_count
Definition
SchemaGraphicSegmentedArrow.hpp:45
dbse::SchemaGraphicSegmentedArrow::m_name
QString m_name
Definition
SchemaGraphicSegmentedArrow.hpp:51
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:44
dbse::SchemaGraphicSegmentedArrow::m_inheritance
bool m_inheritance
Definition
SchemaGraphicSegmentedArrow.hpp:49
dbse::SchemaGraphicSegmentedArrow::make_arrow_head
QPolygonF make_arrow_head(qreal angle) const
Definition
SchemaGraphicSegmentedArrow.cpp:340
dbse::SchemaGraphicSegmentedArrow::m_rel_label_br
QRectF m_rel_label_br
Definition
SchemaGraphicSegmentedArrow.hpp:47
dbse::SchemaGraphicSegmentedArrow::GetStartItem
SchemaGraphicObject * GetStartItem() const
Definition
SchemaGraphicSegmentedArrow.cpp:313
dbse::SchemaGraphicSegmentedArrow::m_arrow_size
qreal m_arrow_size
Definition
SchemaGraphicSegmentedArrow.hpp:55
dbse::SchemaGraphicSegmentedArrow::LastDegree
double LastDegree
Definition
SchemaGraphicSegmentedArrow.hpp:57
dbse::SchemaGraphicSegmentedArrow::RemoveArrow
void RemoveArrow()
Definition
SchemaGraphicSegmentedArrow.cpp:328
dbse::SchemaGraphicSegmentedArrow::UpdatePosition
void UpdatePosition()
Definition
SchemaGraphicSegmentedArrow.cpp:94
dbse::SchemaGraphicSegmentedArrow::GetInheritanceMode
bool GetInheritanceMode()
Definition
SchemaGraphicSegmentedArrow.cpp:323
dbse::SchemaGraphicSegmentedArrow::hoverLeaveEvent
void hoverLeaveEvent(QGraphicsSceneHoverEvent *ev)
Definition
SchemaGraphicSegmentedArrow.cpp:59
dbse::SchemaGraphicSegmentedArrow::boundingRect
QRectF boundingRect() const
Definition
SchemaGraphicSegmentedArrow.cpp:64
dbse::SchemaGraphicSegmentedArrow::hoverEnterEvent
void hoverEnterEvent(QGraphicsSceneHoverEvent *ev)
Definition
SchemaGraphicSegmentedArrow.cpp:48
dbse::SchemaGraphicSegmentedArrow::m_cardinality
QString m_cardinality
Definition
SchemaGraphicSegmentedArrow.hpp:52
dbse::SchemaGraphicSegmentedArrow::paint
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget=0)
Definition
SchemaGraphicSegmentedArrow.cpp:370
dbse::SchemaGraphicSegmentedArrow::p1
QPointF p1() const
Definition
SchemaGraphicSegmentedArrow.hpp:35
dbse::SchemaGraphicSegmentedArrow::m_composite
bool m_composite
Definition
SchemaGraphicSegmentedArrow.hpp:50
dbse::SchemaGraphicSegmentedArrow::m_default_color
QColor m_default_color
Definition
SchemaGraphicSegmentedArrow.hpp:53
dbse::SchemaGraphicSegmentedArrow::LastRotation
double LastRotation
Definition
SchemaGraphicSegmentedArrow.hpp:58
dbse::SchemaGraphicSegmentedArrow::m_label_font
QFont m_label_font
Definition
SchemaGraphicSegmentedArrow.hpp:54
dbse::SchemaGraphicSegmentedArrow::m_start_item
SchemaGraphicObject * m_start_item
Definition
SchemaGraphicSegmentedArrow.hpp:43
dbse
Including QT Headers.
Definition
SchemaAttributeEditor.hpp:14
Generated on
for DUNE-DAQ by
1.17.0