KanoopGuiQt 1.3.0
Qt GUI utility library
Loading...
Searching...
No Matches
widgetplugincollection.h
1#ifndef WIDGETPLUGINCOLLECTION_H
2#define WIDGETPLUGINCOLLECTION_H
3
4#include <Kanoop/gui/libkanoopgui.h>
5#include <QtDesigner>
6#include <QtCore>
7
8/**
9 * @brief Qt Designer plugin collection exposing KanoopGuiQt custom widgets.
10 *
11 * WidgetPluginCollection implements QDesignerCustomWidgetCollectionInterface so
12 * that all custom KanoopGuiQt widgets are registered with Qt Designer as a
13 * single plugin. The list of widgets is populated in the constructor.
14 */
15class LIBKANOOPGUI_EXPORT WidgetPluginCollection : public QObject,
16 public QDesignerCustomWidgetCollectionInterface
17{
18 Q_OBJECT
19 Q_PLUGIN_METADATA(IID "org.qt-project.Qt.QDesignerCustomWidgetCollectionInterface")
20 Q_INTERFACES(QDesignerCustomWidgetCollectionInterface)
21
22public:
23 /**
24 * @brief Construct and populate the list of custom widget descriptors.
25 * @param parent Optional QObject parent
26 */
27 explicit WidgetPluginCollection(QObject *parent = nullptr);
28
29 /**
30 * @brief Return all custom widget descriptors in this collection.
31 * @return List of QDesignerCustomWidgetInterface pointers
32 */
33 virtual QList<QDesignerCustomWidgetInterface*> customWidgets() const override;
34
35private:
36 QList<QDesignerCustomWidgetInterface*> _widgets;
37};
38
39#endif // WIDGETPLUGINCOLLECTION_H
Qt Designer plugin collection exposing KanoopGuiQt custom widgets.
WidgetPluginCollection(QObject *parent=nullptr)
Construct and populate the list of custom widget descriptors.
virtual QList< QDesignerCustomWidgetInterface * > customWidgets() const override
Return all custom widget descriptors in this collection.