|
1 #ifndef _LED_PLUGIN_H_ |
|
2 #define _LED_PLUGIN_H_ |
|
3 |
|
4 #include <QObject> |
|
5 #include <QString> |
|
6 #include <QWidget> |
|
7 #include <QIcon> |
|
8 #include <QtUiPlugin/QDesignerCustomWidgetInterface> |
|
9 |
|
10 class LEDPlugin; |
|
11 |
|
12 class LEDPlugin : public QObject, public QDesignerCustomWidgetInterface |
|
13 { |
|
14 Q_OBJECT |
|
15 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDesignerCustomWidgetCollectionInterface") |
|
16 Q_INTERFACES(QDesignerCustomWidgetInterface) |
|
17 |
|
18 public: |
|
19 LEDPlugin(QObject* parent=0); |
|
20 |
|
21 QString name() const; |
|
22 QString group() const; |
|
23 QString toolTip() const; |
|
24 QString whatsThis() const; |
|
25 QString includeFile() const; |
|
26 QIcon icon() const; |
|
27 QString domXml() const; |
|
28 |
|
29 bool isContainer() const; |
|
30 bool isInitialized() const; |
|
31 |
|
32 QWidget *createWidget(QWidget *parent); |
|
33 void initialize(QDesignerFormEditorInterface *core); |
|
34 |
|
35 private: |
|
36 bool initialized = false; |
|
37 }; |
|
38 |
|
39 #endif |