Changed ints to QPoint and basic line creation

This commit is contained in:
Alexey 2025-06-27 18:29:22 +03:00
commit 4ae8031e88
4 changed files with 58 additions and 43 deletions

15
line.h
View file

@ -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();
};