src/ui/polygonobjecteditor.h

Thu, 03 Mar 2022 11:42:52 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Thu, 03 Mar 2022 11:42:52 +0200
changeset 150
b6cbba6e29a1
parent 100
43ce3672648a
child 152
03f8e6d42e13
permissions
-rw-r--r--

extract polygon cache out of Model

#pragma once
#include <QWidget>
#include <QSplitter>
#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<QSplitter> splitter;
};

mercurial