forked from magnocube/POV-Globe
-
Notifications
You must be signed in to change notification settings - Fork 0
/
customrect.h
46 lines (34 loc) · 899 Bytes
/
customrect.h
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
39
40
41
42
43
44
45
46
#ifndef CUSTOMRECT_H
#define CUSTOMRECT_H
#include <QGraphicsObject>
#include <QPainter>
#include <QDateTime>
#include <QMessageBox>
#include "customrect_editor.h"
#include <QDebug>
class CustomRect : public QGraphicsObject
{
Q_OBJECT
public:
CustomRect();
QRectF boundingRect() const;
void paint(QPainter *painter, const QStyleOptionGraphicsItem *option, QWidget *widget);
void resize(int w, int h);
private:
int x_location;
int y_location;
int width;
int height;
QColor color;
int rotation;
QColor lineColor;
int lineThickness;
int borderRadius;
signals:
void updateGraphics();
public slots:
void newProperties(int width, int height, int lineThichness, int rotation, QColor backColor, QColor lineColor, int borderRadius);
protected:
void mouseDoubleClickEvent(QGraphicsSceneMouseEvent *e);
};
#endif // CUSTOMRECT_H