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 
12 namespace score
13 {
14 class SCORE_LIB_BASE_EXPORT QGraphicsPixmapButton final
15  : public QObject
16  , public QGraphicsPixmapItem
17 {
18  W_OBJECT(QGraphicsPixmapButton)
19  const QPixmap m_pressed, m_released;
20 
21 public:
22  QGraphicsPixmapButton(QPixmap pressed, QPixmap released, QGraphicsItem* parent);
23 
24 public:
25  void clicked() E_SIGNAL(SCORE_LIB_BASE_EXPORT, clicked)
26 
27 protected:
28  void mousePressEvent(QGraphicsSceneMouseEvent* event) override;
29  void mouseMoveEvent(QGraphicsSceneMouseEvent* event) override;
30  void mouseReleaseEvent(QGraphicsSceneMouseEvent* event) override;
31 };
32 }
Definition: QGraphicsPixmapButton.hpp:17
Base toolkit upon which the software is built.
Definition: Application.cpp:90