DUNE-DAQ
DUNE Trigger and Data Acquisition software
Toggle main menu visibility
Loading...
Searching...
No Matches
dunedaq
sourcecode
dbe
include
dbe
SchemaGraphicNote.hpp
Go to the documentation of this file.
1
#ifndef SCHEMAGRAPHICNOTE_H
2
#define SCHEMAGRAPHICNOTE_H
3
5
#include <QGraphicsObject>
6
#include <QGraphicsSceneHoverEvent>
7
#include <QFont>
8
#include <QColor>
9
#include <QPen>
10
#include <QRectF>
11
12
namespace
dbse
13
{
14
class
SchemaGraphicNote
:
public
QGraphicsObject
15
{
16
Q_OBJECT
17
public
:
18
19
explicit
SchemaGraphicNote
(
const
QString& name,
const
QString&
text
,
20
QGraphicsObject* parent =
nullptr
);
21
~SchemaGraphicNote
() =
default
;
22
23
[[nodiscard]] QRectF
boundingRect
()
const override
;
24
[[nodiscard]] QPainterPath
shape
()
const override
;
25
void
paint
( QPainter * painter,
const
QStyleOptionGraphicsItem * option,
26
QWidget * widget )
override
;
27
28
29
[[nodiscard]] QString
text
() {
return
m_text
;}
30
void
update_note
(QString
text
);
31
void
open_editor
();
32
protected
:
33
void
mouseDoubleClickEvent
( QGraphicsSceneMouseEvent* ev )
override
;
34
signals:
35
void
updated
();
36
37
private
:
38
QString
m_name
;
39
QString
m_text
;
40
};
41
}
// namespace dbse
42
#endif
// SCHEMAGRAPHICNOTE_H
dbse::SchemaGraphicNote::paint
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget) override
Definition
SchemaGraphicNote.cpp:90
dbse::SchemaGraphicNote::text
QString text()
Definition
SchemaGraphicNote.hpp:29
dbse::SchemaGraphicNote::shape
QPainterPath shape() const override
Definition
SchemaGraphicNote.cpp:105
dbse::SchemaGraphicNote::updated
void updated()
dbse::SchemaGraphicNote::SchemaGraphicNote
SchemaGraphicNote(const QString &name, const QString &text, QGraphicsObject *parent=nullptr)
Definition
SchemaGraphicNote.cpp:23
dbse::SchemaGraphicNote::open_editor
void open_editor()
Definition
SchemaGraphicNote.cpp:38
dbse::SchemaGraphicNote::~SchemaGraphicNote
~SchemaGraphicNote()=default
dbse::SchemaGraphicNote::boundingRect
QRectF boundingRect() const override
Definition
SchemaGraphicNote.cpp:72
dbse::SchemaGraphicNote::m_name
QString m_name
Definition
SchemaGraphicNote.hpp:38
dbse::SchemaGraphicNote::mouseDoubleClickEvent
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *ev) override
Definition
SchemaGraphicNote.cpp:59
dbse::SchemaGraphicNote::m_text
QString m_text
Definition
SchemaGraphicNote.hpp:39
dbse::SchemaGraphicNote::update_note
void update_note(QString text)
Definition
SchemaGraphicNote.cpp:64
dbse
Including QT Headers.
Definition
SchemaAttributeEditor.hpp:14
Generated on
for DUNE-DAQ by
1.17.0