major api and quality of life changes
This commit is contained in:
parent
4148d42bfb
commit
67e63561c4
7 changed files with 113 additions and 24 deletions
|
|
@ -24,9 +24,9 @@ struct PointProbe
|
|||
class GridPreview : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
QMap<QString, QColor> colorMap;
|
||||
int width = 5, height = 5;
|
||||
QVector<Line> lines {};
|
||||
QMap<QString, QColor> colorMap;
|
||||
const QString tableTemplate = "return {\n width = %1,\n height = %2,\n lines = {\n%3\n }\n}";
|
||||
|
||||
bool mouseCaptured = false;
|
||||
|
|
@ -38,14 +38,17 @@ public:
|
|||
void addLine(Line &line);
|
||||
void removeLine(int index);
|
||||
|
||||
void setLineColor(int index, QString color);
|
||||
void setLineStartPoint(int index, QPoint point);
|
||||
void setLineEndPoint(int index, QPoint point);
|
||||
void setLineColor(int index, const QString &color);
|
||||
void setLineStartPoint(int index, const QPoint &point);
|
||||
void setLineEndPoint(int index, const QPoint &point);
|
||||
void setColorMap(QMap<QString, QColor> &map);
|
||||
|
||||
int getWidth();
|
||||
int getHeight();
|
||||
const Line& getLine(int index);
|
||||
const PointProbe& getCapturedProbe();
|
||||
const Line& getLine(int index) const;
|
||||
const PointProbe& getCapturedProbe() const;
|
||||
PointProbe& getCapturedProbe();
|
||||
const QList<Line>& getLines() const;
|
||||
|
||||
const QString toLuaTable();
|
||||
void paintEvent(QPaintEvent* event);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue