Loading...
Searching...
No Matches
QGraphicsPixmapButton.hpp
1#pragma once
2#include <score/graphics/widgets/Constants.hpp>
3#include <score/widgets/Pixmap.hpp>
4
5#include <QGraphicsItem>
6#include <QObject>
7
8#include <score_lib_base_export.h>
9
10#include <verdigris>
11
12namespace score
13{
14class SCORE_LIB_BASE_EXPORT QGraphicsPixmapButton final
15 : public QObject
16 , public QGraphicsPixmapItem
17{
18 W_OBJECT(QGraphicsPixmapButton)
19 SCORE_GRAPHICS_ITEM_TYPE(130)
20 const QPixmap m_pressed, m_released;
21
22public:
23 QGraphicsPixmapButton(QPixmap pressed, QPixmap released, QGraphicsItem* parent);
24
25public:
26 void clicked() E_SIGNAL(SCORE_LIB_BASE_EXPORT, clicked)
27
28protected:
29 void mousePressEvent(QGraphicsSceneMouseEvent* event) override;
30 void mouseMoveEvent(QGraphicsSceneMouseEvent* event) override;
31 void mouseReleaseEvent(QGraphicsSceneMouseEvent* event) override;
32};
33}
Definition QGraphicsPixmapButton.hpp:17
Base toolkit upon which the software is built.
Definition Application.cpp:90