src/ui/polygonobjecteditor.h

Wed, 25 Mar 2020 16:07:20 +0200

author
Teemu Piippo <teemu@hecknology.net>
date
Wed, 25 Mar 2020 16:07:20 +0200
changeset 87
93ec4d630346
parent 86
4bec0525ef1b
child 89
7abaf1d64719
permissions
-rw-r--r--

added PolygonObject and refactored away a lot of boilerplate

#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:
	Q_SLOT void vectorChanged(const glm::vec3& value);
	void updateNumRows();
	Model* model;
	ldraw::id_t storedObjectId;
	std::optional<Vec3Editor> vec3Editors[4];
};

mercurial