src/ui/polygonobjecteditor.h

Sat, 05 Mar 2022 13:19:59 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Sat, 05 Mar 2022 13:19:59 +0200
changeset 162
3ebe1a0ca818
parent 152
03f8e6d42e13
child 178
a23024fc98e0
permissions
-rw-r--r--

only render svg to png if the png does not exist

#pragma once
#include <QWidget>
#include <QSplitter>
#include "main.h"
#include "../widgets/vec3editor.h"

class Document;

class PolygonObjectEditor : public QWidget
{
public:
	PolygonObjectEditor(Document* document, ldraw::id_t id);
	~PolygonObjectEditor();
	ldraw::id_t objectId() const;
	void setObjectId(ldraw::id_t id);
private:
	void buildWidgets();
	void setupPointWidget(int n);
	Q_SLOT void pointChanged(const glm::vec3& value);
	Document* document;
	ldraw::id_t storedObjectId;
	std::vector<std::unique_ptr<QWidget>> widgets;
	std::optional<QSplitter> splitter;
};

mercurial