Basic classes and window layout
This commit is contained in:
commit
a9c7952f5c
10 changed files with 706 additions and 0 deletions
50
line.cpp
Normal file
50
line.cpp
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
#include "line.h"
|
||||
|
||||
Line::Line() {}
|
||||
|
||||
void Line::setStartPoint(int x, int y)
|
||||
{
|
||||
startX = x;
|
||||
startY = y;
|
||||
}
|
||||
|
||||
void Line::setEndPoint(int x, int y)
|
||||
{
|
||||
endX = x;
|
||||
endY = y;
|
||||
}
|
||||
|
||||
void Line::setColor(QString newColor)
|
||||
{
|
||||
color = newColor;
|
||||
}
|
||||
|
||||
int Line::getStartX()
|
||||
{
|
||||
return startX;
|
||||
}
|
||||
|
||||
int Line::getStartY()
|
||||
{
|
||||
return startY;
|
||||
}
|
||||
|
||||
int Line::getEndX()
|
||||
{
|
||||
return endX;
|
||||
}
|
||||
|
||||
int Line::getEndY()
|
||||
{
|
||||
return endY;
|
||||
}
|
||||
|
||||
QString Line::getColor()
|
||||
{
|
||||
return color;
|
||||
}
|
||||
|
||||
QString Line::toLuaTable()
|
||||
{
|
||||
return QString("{ %1, %2, %3, %4, \"%5\" }").arg(startX).arg(startY).arg(endX).arg(endY).arg(color);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue