Basic classes and window layout
This commit is contained in:
commit
a9c7952f5c
10 changed files with 706 additions and 0 deletions
23
gridpreview.h
Normal file
23
gridpreview.h
Normal 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
|
||||
Loading…
Add table
Add a link
Reference in a new issue