Maki
Formally verified low-code orchestration
Toggle main menu visibility
Loading...
Searching...
No Matches
empty_slot.h
1
#pragma once
2
3
#include <QGraphicsObject>
4
5
#include "ids.h"
6
7
class
QGraphicsSceneHoverEvent;
8
class
QGraphicsSceneMouseEvent;
9
class
QPainter;
10
class
QStyleOptionGraphicsItem;
11
class
QWidget;
12
13
class
EmptySlot :
public
QGraphicsObject
14
{
15
public
:
16
enum
17
{
18
Type = Types::EMPTY_SLOT
19
};
20
21
explicit
EmptySlot(qreal diameter, QGraphicsItem* parent =
nullptr
);
22
28
int
type
()
const override
;
29
30
QRectF boundingRect()
const override
;
31
32
void
setDiameter(qreal diameter);
33
qreal diameter()
const
;
34
35
std::function<void(
const
QPointF& scenePos)> clicked;
36
37
protected
:
38
void
paint(QPainter* painter,
const
QStyleOptionGraphicsItem* option, QWidget* widget =
nullptr
)
override
;
39
40
void
hoverEnterEvent(QGraphicsSceneHoverEvent* event)
override
;
41
void
hoverLeaveEvent(QGraphicsSceneHoverEvent* event)
override
;
42
43
void
mousePressEvent(QGraphicsSceneMouseEvent* event)
override
;
44
void
mouseReleaseEvent(QGraphicsSceneMouseEvent* event)
override
;
45
46
private
:
47
qreal mDiameter = 0.0;
48
bool
mHovered =
false
;
49
bool
mPressed =
false
;
50
};
EmptySlot::type
int type() const override
Returns the type of this item.
Definition
empty_slot.cpp:23
Generated for
MAKI
· © 2026 with
Doxygen
1.9.8
GitHub
Research