src/ui/polygonobjecteditor.h

Mon, 24 Aug 2020 23:00:50 +0300

author
Teemu Piippo <teemu@hecknology.net>
date
Mon, 24 Aug 2020 23:00:50 +0300
changeset 92
c438a7db7c52
parent 89
7abaf1d64719
child 100
43ce3672648a
permissions
-rw-r--r--

merge commit

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

class Model;

class PolygonObjectEditor : public QWidget
{
public:
	PolygonObjectEditor(Model* model, ldraw::id_t id, QWidget* parent = nullptr);
	~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);
	Model* model;
	ldraw::id_t storedObjectId;
	std::vector<std::unique_ptr<QWidget>> widgets;
	std::optional<class QSplitter> splitter;
};

mercurial