-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlineo.h
52 lines (42 loc) · 993 Bytes
/
lineo.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
47
48
49
50
51
52
#ifndef LINEO_H
#define LINEO_H
//#include "room.h"
#include <QGraphicsLineItem>
#include <QGraphicsScene>
class room;
class lineo: public QGraphicsLineItem
{
public:
lineo(int x01 = 0, int y01 = 0, int x02 = 0, int y02 = 0 , room *scene = NULL);
void show_line(int a);
double getLength();
int vectX();
int vectY();
double getSlope();
double getYorigin();
void setSlope(double slope);
void setAngle(double angle);
int getX1();
int getY1();
int getX2();
int getY2();
void setX1(double x01);
void setY1(double y01);
void setX2(double x02);
void setY2(double y02);
double getAngle();
protected:
room *myRoom;
double x1;
double y1;
double x2;
double y2;
double angle;
double a;
int b;
double d; // Total distance of the segment
void def_Slope(qreal x01, qreal y01, qreal x02, qreal y02);
void def_YOrigin(qreal x01, qreal y01);
void setLength();
};
#endif // LINEO_H