widgets/designerplugins.h

changeset 253
8b994c917f69
child 256
c6f5de03dc0f
equal deleted inserted replaced
252:da4876bfd822 253:8b994c917f69
1 #pragma once
2 #include <QObject>
3 #include <QDesignerCustomWidgetInterface>
4
5 class LDForgeWidgetCollection final : public QObject, public QDesignerCustomWidgetCollectionInterface
6 {
7 Q_OBJECT
8 Q_PLUGIN_METADATA(IID "org.qgis.customwidgets")
9 Q_INTERFACES(QDesignerCustomWidgetCollectionInterface)
10 // QDesignerCustomWidgetCollectionInterface interface
11 QList<QDesignerCustomWidgetInterface*> interfaces;
12 public:
13 LDForgeWidgetCollection(QObject* parent = nullptr);
14 QList<QDesignerCustomWidgetInterface*> customWidgets() const override;
15 };
16
17 class Vec3EditorPlugin final : public QObject, public QDesignerCustomWidgetInterface
18 {
19 Q_OBJECT
20 Q_INTERFACES(QDesignerCustomWidgetInterface)
21 // QDesignerCustomWidgetInterface interface
22 public:
23 Vec3EditorPlugin(QObject* parent) : QObject{parent}{}
24 QString name() const override;
25 QString group() const override;
26 QString toolTip() const override;
27 QString whatsThis() const override;
28 QString includeFile() const override;
29 QIcon icon() const override;
30 bool isContainer() const override;
31 QWidget* createWidget(QWidget* parent) override;
32 };
33
34 class MatrixEditorPlugin final : public QObject, public QDesignerCustomWidgetInterface
35 {
36 Q_OBJECT
37 Q_INTERFACES(QDesignerCustomWidgetInterface)
38 // QDesignerCustomWidgetInterface interface
39 public:
40 MatrixEditorPlugin(QObject* parent) : QObject{parent}{}
41 QString name() const override;
42 QString group() const override;
43 QString toolTip() const override;
44 QString whatsThis() const override;
45 QString includeFile() const override;
46 QIcon icon() const override;
47 bool isContainer() const override;
48 QWidget* createWidget(QWidget* parent) override;
49 };

mercurial