-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathcornergrabber.h
More file actions
36 lines (28 loc) · 861 Bytes
/
cornergrabber.h
File metadata and controls
36 lines (28 loc) · 861 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#ifndef CORNERGRABBER_H
#define CORNERGRABBER_H
#include <QGraphicsItem>
#include <QGraphicsSceneHoverEvent>
#include <QColor>
#include <QPainter>
#include <QPen>
#include <QPointF>
class CornerGrabber : public QGraphicsItem
{
public:
explicit CornerGrabber(QGraphicsItem *parent = 0);
qreal getHeight();
qreal getWidth();
bool isActive();
enum {bottomLeft, topLeft, topRight, bottomRight};
private:
virtual QRectF boundingRect() const;
virtual void paint (QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
virtual void hoverEnterEvent ( QGraphicsSceneHoverEvent * event );
virtual void hoverLeaveEvent ( QGraphicsSceneHoverEvent * event );
QColor _outterborderColor;
QPen _outterborderPen;
qreal _width;
qreal _height;
bool _is_active;
};
#endif // CORNERGRABBER_H