| 1 | // Copyright (C) 2016 The Qt Company Ltd. |
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0 |
| 3 | |
| 4 | #ifndef ABSTRACTWIDGETFACTORY_H |
| 5 | #define ABSTRACTWIDGETFACTORY_H |
| 6 | |
| 7 | #include <QtDesigner/sdk_global.h> |
| 8 | #include <QtCore/qobject.h> |
| 9 | |
| 10 | QT_BEGIN_NAMESPACE |
| 11 | |
| 12 | class QDesignerFormEditorInterface; |
| 13 | class QWidget; |
| 14 | class QLayout; |
| 15 | |
| 16 | class QDESIGNER_SDK_EXPORT QDesignerWidgetFactoryInterface: public QObject |
| 17 | { |
| 18 | Q_OBJECT |
| 19 | public: |
| 20 | explicit QDesignerWidgetFactoryInterface(QObject *parent = nullptr); |
| 21 | virtual ~QDesignerWidgetFactoryInterface(); |
| 22 | |
| 23 | virtual QDesignerFormEditorInterface *core() const = 0; |
| 24 | |
| 25 | virtual QWidget* containerOfWidget(QWidget *w) const = 0; |
| 26 | virtual QWidget* widgetOfContainer(QWidget *w) const = 0; |
| 27 | |
| 28 | virtual QWidget *createWidget(const QString &name, QWidget *parentWidget = nullptr) const = 0; |
| 29 | virtual QLayout *createLayout(QWidget *widget, QLayout *layout, int type) const = 0; |
| 30 | |
| 31 | virtual bool isPassiveInteractor(QWidget *widget) = 0; |
| 32 | virtual void initialize(QObject *object) const = 0; |
| 33 | }; |
| 34 | |
| 35 | QT_END_NAMESPACE |
| 36 | |
| 37 | #endif // ABSTRACTWIDGETFACTORY_H |
| 38 | |