| 1 #include "designerplugins.h" |
1 #include "designerplugins.h" |
| 2 #include "vec3editor.h" |
2 #include "vec3editor.h" |
| 3 #include "matrixeditor.h" |
3 #include "matrixeditor.h" |
| |
4 #include "colorbutton.h" |
| 4 |
5 |
| 5 LDForgeWidgetCollection::LDForgeWidgetCollection(QObject* parent) : |
6 LDForgeWidgetCollection::LDForgeWidgetCollection(QObject* parent) : |
| 6 QObject{parent} |
7 QObject{parent} |
| 7 { |
8 { |
| 8 this->interfaces.append(new Vec3EditorPlugin{this}); |
9 this->interfaces.append(new Vec3EditorPlugin{this}); |
| 9 this->interfaces.append(new MatrixEditorPlugin{this}); |
10 this->interfaces.append(new MatrixEditorPlugin{this}); |
| |
11 this->interfaces.append(new ColorButtonPlugin{this}); |
| 10 } |
12 } |
| 11 |
13 |
| 12 QList<QDesignerCustomWidgetInterface*> LDForgeWidgetCollection::customWidgets() const |
14 QList<QDesignerCustomWidgetInterface*> LDForgeWidgetCollection::customWidgets() const |
| 13 { |
15 { |
| 14 return this->interfaces; |
16 return this->interfaces; |
| 91 |
93 |
| 92 QWidget* MatrixEditorPlugin::createWidget(QWidget* parent) |
94 QWidget* MatrixEditorPlugin::createWidget(QWidget* parent) |
| 93 { |
95 { |
| 94 return new MatrixEditor{parent}; |
96 return new MatrixEditor{parent}; |
| 95 } |
97 } |
| |
98 |
| |
99 |
| |
100 QString ColorButtonPlugin::name() const |
| |
101 { |
| |
102 return "ColorButton"; |
| |
103 } |
| |
104 |
| |
105 QString ColorButtonPlugin::group() const |
| |
106 { |
| |
107 return "LDForge"; |
| |
108 } |
| |
109 |
| |
110 QString ColorButtonPlugin::toolTip() const |
| |
111 { |
| |
112 return ""; |
| |
113 } |
| |
114 |
| |
115 QString ColorButtonPlugin::whatsThis() const |
| |
116 { |
| |
117 return ""; |
| |
118 } |
| |
119 |
| |
120 QString ColorButtonPlugin::includeFile() const |
| |
121 { |
| |
122 return "colorbutton.h"; |
| |
123 } |
| |
124 |
| |
125 QIcon ColorButtonPlugin::icon() const |
| |
126 { |
| |
127 return {}; |
| |
128 } |
| |
129 |
| |
130 bool ColorButtonPlugin::isContainer() const |
| |
131 { |
| |
132 return false; |
| |
133 } |
| |
134 |
| |
135 QWidget* ColorButtonPlugin::createWidget(QWidget* parent) |
| |
136 { |
| |
137 return new ColorButton{parent}; |
| |
138 } |