diff -r da4876bfd822 -r 8b994c917f69 widgets/designerplugins.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/widgets/designerplugins.cpp Wed Jun 22 21:42:10 2022 +0300 @@ -0,0 +1,95 @@ +#include "designerplugins.h" +#include "vec3editor.h" +#include "matrixeditor.h" + +LDForgeWidgetCollection::LDForgeWidgetCollection(QObject* parent) : + QObject{parent} +{ + this->interfaces.append(new Vec3EditorPlugin{this}); + this->interfaces.append(new MatrixEditorPlugin{this}); +} + +QList LDForgeWidgetCollection::customWidgets() const +{ + return this->interfaces; +} + +QString Vec3EditorPlugin::name() const +{ + return "Vec3Editor"; +} + +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 Vec3Editor{{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}; +}