tilde~
Puredata Qt-based GUI
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
SizeBox.h
Go to the documentation of this file.
1 // (c) 2017 Alex Nadzharov
2 // License: GPL3
3 
4 #ifndef CM_SIZEBOXG_H
5 #define CM_SIZEBOXG_H
6 
7 #include "UIItem.h"
8 
9 namespace tilde {
10 
14 class SizeBox : public UIItem {
15  Q_OBJECT
16 
17 private:
18  QPoint _previousPosition;
19 
20  t_objectSize* _objectSizeType;
21 
22 public:
23  explicit SizeBox(UIItem* parent = 0);
24 
25  void paint(QPainter* p, const QStyleOptionGraphicsItem*, QWidget*);
26  void mousePressEvent(QGraphicsSceneMouseEvent* ev);
27  void mouseReleaseEvent(QGraphicsSceneMouseEvent* event);
28  void mouseMoveEvent(QGraphicsSceneMouseEvent* ev);
29 
30  virtual void hoverEnterEvent(QGraphicsSceneHoverEvent* ev);
31  virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent* ev);
32 
33 signals:
34 
35  void resizeBoxEvent(int dx, int dy);
36 };
37 }
38 
39 #endif // CM_SIZEBOX_H
void mouseMoveEvent(QGraphicsSceneMouseEvent *ev)
Definition: SizeBox.cpp:51
SizeBox QGraphicsObject class.
Definition: SizeBox.h:14
virtual void hoverEnterEvent(QGraphicsSceneHoverEvent *ev)
Definition: SizeBox.cpp:56
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event)
Definition: SizeBox.cpp:44
virtual void hoverLeaveEvent(QGraphicsSceneHoverEvent *ev)
Definition: SizeBox.cpp:62
UIItem QGraphicsObject class.
Definition: UIItem.h:15
void mousePressEvent(QGraphicsSceneMouseEvent *ev)
Definition: SizeBox.cpp:35
SizeBox(UIItem *parent=0)
Definition: SizeBox.cpp:15
void resizeBoxEvent(int dx, int dy)
t_objectSize
object box size constraints
Definition: CommonTypes.h:26
void paint(QPainter *p, const QStyleOptionGraphicsItem *, QWidget *)
Definition: SizeBox.cpp:25