widgets/designerplugins.cpp

Sun, 26 Jun 2022 20:54:09 +0300

author
Teemu Piippo <teemu.s.piippo@gmail.com>
date
Sun, 26 Jun 2022 20:54:09 +0300
changeset 262
dc33f8a707c4
parent 256
c6f5de03dc0f
child 264
76a025db4948
permissions
-rw-r--r--

Add action to make a model unofficial (modifies the !LDRAW_ORG line)

#include "designerplugins.h"
#include "vec3editor.h"
#include "matrixeditor.h"
#include "colorbutton.h"

LDForgeWidgetCollection::LDForgeWidgetCollection(QObject* parent) :
	QObject{parent}
{
	this->interfaces.append(new Vec3EditorPlugin{this});
	this->interfaces.append(new MatrixEditorPlugin{this});
	this->interfaces.append(new ColorButtonPlugin{this});
}

QList<QDesignerCustomWidgetInterface*> LDForgeWidgetCollection::customWidgets() const
{
	return this->interfaces;
}

QString Vec3EditorPlugin::name() const
{
	return "VectorInput";
}

QString Vec3EditorPlugin::group() const
{
	return "LDForge";
}

QString Vec3EditorPlugin::toolTip() const
{
	return "";
}

QString Vec3EditorPlugin::whatsThis() const
{
	return "";
}

QString Vec3EditorPlugin::includeFile() const
{
	return "vec3editor.h";
}

QIcon Vec3EditorPlugin::icon() const
{
	return {};
}

bool Vec3EditorPlugin::isContainer() const
{
	return false;
}

QWidget* Vec3EditorPlugin::createWidget(QWidget* parent)
{
	return new VectorInput{{0, 0, 0}, parent};
}

QString MatrixEditorPlugin::name() const
{
	return "MatrixEditor";
}

QString MatrixEditorPlugin::group() const
{
	return "LDForge";
}

QString MatrixEditorPlugin::toolTip() const
{
	return "";
}

QString MatrixEditorPlugin::whatsThis() const
{
	return "";
}

QString MatrixEditorPlugin::includeFile() const
{
	return "matrixeditor.h";
}

QIcon MatrixEditorPlugin::icon() const
{
	return {};
}

bool MatrixEditorPlugin::isContainer() const
{
	return false;
}

QWidget* MatrixEditorPlugin::createWidget(QWidget* parent)
{
	return new MatrixEditor{parent};
}


QString ColorButtonPlugin::name() const
{
	return "ColorButton";
}

QString ColorButtonPlugin::group() const
{
	return "LDForge";
}

QString ColorButtonPlugin::toolTip() const
{
	return "";
}

QString ColorButtonPlugin::whatsThis() const
{
	return "";
}

QString ColorButtonPlugin::includeFile() const
{
	return "colorbutton.h";
}

QIcon ColorButtonPlugin::icon() const
{
	return {};
}

bool ColorButtonPlugin::isContainer() const
{
	return false;
}

QWidget* ColorButtonPlugin::createWidget(QWidget* parent)
{
	return new ColorButton{parent};
}

mercurial