widgets/designerplugins.cpp

changeset 253
8b994c917f69
child 254
b7b29cb82360
equal deleted inserted replaced
252:da4876bfd822 253:8b994c917f69
1 #include "designerplugins.h"
2 #include "vec3editor.h"
3 #include "matrixeditor.h"
4
5 LDForgeWidgetCollection::LDForgeWidgetCollection(QObject* parent) :
6 QObject{parent}
7 {
8 this->interfaces.append(new Vec3EditorPlugin{this});
9 this->interfaces.append(new MatrixEditorPlugin{this});
10 }
11
12 QList<QDesignerCustomWidgetInterface*> LDForgeWidgetCollection::customWidgets() const
13 {
14 return this->interfaces;
15 }
16
17 QString Vec3EditorPlugin::name() const
18 {
19 return "Vec3Editor";
20 }
21
22 QString Vec3EditorPlugin::group() const
23 {
24 return "LDForge";
25 }
26
27 QString Vec3EditorPlugin::toolTip() const
28 {
29 return "";
30 }
31
32 QString Vec3EditorPlugin::whatsThis() const
33 {
34 return "";
35 }
36
37 QString Vec3EditorPlugin::includeFile() const
38 {
39 return "vec3editor.h";
40 }
41
42 QIcon Vec3EditorPlugin::icon() const
43 {
44 return {};
45 }
46
47 bool Vec3EditorPlugin::isContainer() const
48 {
49 return false;
50 }
51
52 QWidget* Vec3EditorPlugin::createWidget(QWidget* parent)
53 {
54 return new Vec3Editor{{0, 0, 0}, parent};
55 }
56
57 QString MatrixEditorPlugin::name() const
58 {
59 return "MatrixEditor";
60 }
61
62 QString MatrixEditorPlugin::group() const
63 {
64 return "LDForge";
65 }
66
67 QString MatrixEditorPlugin::toolTip() const
68 {
69 return "";
70 }
71
72 QString MatrixEditorPlugin::whatsThis() const
73 {
74 return "";
75 }
76
77 QString MatrixEditorPlugin::includeFile() const
78 {
79 return "matrixeditor.h";
80 }
81
82 QIcon MatrixEditorPlugin::icon() const
83 {
84 return {};
85 }
86
87 bool MatrixEditorPlugin::isContainer() const
88 {
89 return false;
90 }
91
92 QWidget* MatrixEditorPlugin::createWidget(QWidget* parent)
93 {
94 return new MatrixEditor{parent};
95 }

mercurial