43 lines
608 B
C++
43 lines
608 B
C++
#include "line.h"
|
|
|
|
Line::Line() {}
|
|
|
|
void Line::setStartPoint(QPoint newPoint)
|
|
{
|
|
start = newPoint;
|
|
}
|
|
|
|
void Line::setEndPoint(QPoint newPoint)
|
|
{
|
|
end = newPoint;
|
|
}
|
|
|
|
void Line::setColor(QString newColor)
|
|
{
|
|
color = newColor;
|
|
}
|
|
|
|
const QPoint &Line::getStart() const
|
|
{
|
|
return start;
|
|
}
|
|
|
|
const QPoint &Line::getEnd() const
|
|
{
|
|
return end;
|
|
}
|
|
|
|
const QString &Line::getColor() const
|
|
{
|
|
return color;
|
|
}
|
|
|
|
QString Line::getColor()
|
|
{
|
|
return color;
|
|
}
|
|
|
|
QString Line::toLuaTable()
|
|
{
|
|
return QString("{ %1, %2, %3, %4, \"%5\" }").arg(start.x()).arg(start.y()).arg(end.x()).arg(end.y()).arg(color);
|
|
}
|