-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcircle.h
More file actions
46 lines (36 loc) · 1.07 KB
/
Copy pathcircle.h
File metadata and controls
46 lines (36 loc) · 1.07 KB
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 CIRCLE_H
#define CIRCLE_H
#include <QGraphicsEllipseItem>
#include <QGraphicsSceneMouseEvent>
#include <QGraphicsScene>
#include <QPen>
#include <QDebug>
/*********************************************/
/************Interfaz*************************/
/*********************************************/
class Circle : public QGraphicsEllipseItem
{
public:
Circle(QGraphicsScene* S);
virtual void Place();
virtual void mousePressEvent(QGraphicsSceneMouseEvent *event);
virtual void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
protected:
QGraphicsScene* Scene;
QPointF origCircle;
};
/*********************************************/
/************A partir del radio***************/
/*********************************************/
class RadiusCircle : public Circle
{
public:
RadiusCircle(QGraphicsScene* Scene, QPointF Point);
void Place();
void mousePressEvent(QGraphicsSceneMouseEvent *event);
void mouseMoveEvent(QGraphicsSceneMouseEvent *event);
private:
QGraphicsLineItem* RadiusLine;
QPointF CenterCircle;
};
#endif // CIRCLE_H