-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcursor.h
More file actions
38 lines (32 loc) · 851 Bytes
/
cursor.h
File metadata and controls
38 lines (32 loc) · 851 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
37
38
#ifndef CURSOR_H
#define CURSOR_H
#include <QGraphicsItem>
#include <QPen>
#include <QDebug>
#include <QLineF>
#include <QPainter>
#include <QGraphicsSceneMouseEvent>
class Cursor : public QGraphicsItem
{
public:
QRectF boundingRect() const;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
Cursor(const QRectF& Window);
void mover(QPointF punto);
void setMode (bool mode);
protected:
void mousePressEvent(QGraphicsSceneMouseEvent *event);
void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
void mouseReleaseEvent(QGraphicsSceneMouseEvent *event);
public slots:
void resize (QRectF rec);
private:
qreal ancho;
qreal alto;
QLineF EjeX;
QLineF EjeY;
QRectF SquareSelect;
QPointF posicionActual;
bool CursorDrawMode;
};
#endif // CURSOR_H