Basic classes and window layout

This commit is contained in:
Alexey 2025-06-27 14:11:44 +03:00
commit a9c7952f5c
10 changed files with 706 additions and 0 deletions

23
gridpreview.h Normal file
View file

@ -0,0 +1,23 @@
#ifndef GRIDPREVIEW_H
#define GRIDPREVIEW_H
#include <QWidget>
#include "line.h"
class GridPreview : public QWidget
{
Q_OBJECT
public:
explicit GridPreview(QWidget *parent = nullptr);
void setSize(int newWidth, int newHeight);
void addLine(Line &line);
void removeLine(int index);
QString toLuaTable();
private:
int width = 5, height = 5;
QVector<Line> lines {};
const QString tableTemplate = "return {\n width = %1,\n height = %2,\n lines = {\n%3\n }\n}";
signals:
};
#endif // GRIDPREVIEW_H