Loading...
Searching...
No Matches
QGraphicsCheckBox.hpp
1#pragma once
2#include <score/graphics/widgets/Constants.hpp>
3
4#include <QGraphicsItem>
5#include <QObject>
6
7#include <score_lib_base_export.h>
8
9#include <verdigris>
10
11namespace score
12{
13class SCORE_LIB_BASE_EXPORT QGraphicsCheckBox final
14 : public QObject
15 , public QGraphicsItem
16{
17 W_OBJECT(QGraphicsCheckBox)
18 SCORE_GRAPHICS_ITEM_TYPE(20)
19 QRectF m_rect{defaultCheckBoxSize};
20
21 bool m_toggled{};
22
23public:
24 QGraphicsCheckBox(QGraphicsItem* parent);
25
26 void toggle();
27 void setState(bool toggled);
28
29public:
30 void toggled(bool arg_1) E_SIGNAL(SCORE_LIB_BASE_EXPORT, toggled, arg_1)
31
32private:
33 void mousePressEvent(QGraphicsSceneMouseEvent* event) override;
34 void mouseReleaseEvent(QGraphicsSceneMouseEvent* event) override;
35 QRectF boundingRect() const override;
36 void paint(QPainter* painter, const QStyleOptionGraphicsItem* option, QWidget* widget)
37 override;
38};
39}
Definition QGraphicsCheckBox.hpp:16
Base toolkit upon which the software is built.
Definition Application.cpp:90