Changed ints to QPoint and basic line creation
This commit is contained in:
parent
bcd01a95b3
commit
4ae8031e88
4 changed files with 58 additions and 43 deletions
15
line.h
15
line.h
|
|
@ -1,22 +1,21 @@
|
|||
#ifndef LINE_H
|
||||
#define LINE_H
|
||||
|
||||
#include <QPoint>
|
||||
#include <QString>
|
||||
|
||||
class Line
|
||||
{
|
||||
private:
|
||||
int startX, startY, endX, endY;
|
||||
QString color;
|
||||
QPoint start, end;
|
||||
QString color = QString("red");
|
||||
public:
|
||||
Line();
|
||||
void setStartPoint(int x, int y);
|
||||
void setEndPoint(int x, int y);
|
||||
void setStartPoint(QPoint newPoint);
|
||||
void setEndPoint(QPoint newPoint);
|
||||
void setColor(QString color);
|
||||
int getStartX();
|
||||
int getStartY();
|
||||
int getEndX();
|
||||
int getEndY();
|
||||
const QPoint& getStart();
|
||||
const QPoint& getEnd();
|
||||
QString getColor();
|
||||
QString toLuaTable();
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue