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 ABSTRACTNEWFORMWIDGET_H |
5 | #define ABSTRACTNEWFORMWIDGET_H |
6 | |
7 | #include <QtDesigner/sdk_global.h> |
8 | |
9 | #include <QtWidgets/qwidget.h> |
10 | |
11 | QT_BEGIN_NAMESPACE |
12 | |
13 | class QDesignerFormEditorInterface; |
14 | |
15 | class QDESIGNER_SDK_EXPORT QDesignerNewFormWidgetInterface : public QWidget |
16 | { |
17 | Q_OBJECT |
18 | public: |
19 | explicit QDesignerNewFormWidgetInterface(QWidget *parent = nullptr); |
20 | virtual ~QDesignerNewFormWidgetInterface(); |
21 | |
22 | virtual bool hasCurrentTemplate() const = 0; |
23 | virtual QString currentTemplate(QString *errorMessage = nullptr) = 0; |
24 | |
25 | static QDesignerNewFormWidgetInterface *createNewFormWidget(QDesignerFormEditorInterface *core, QWidget *parent = nullptr); |
26 | |
27 | Q_SIGNALS: |
28 | void templateActivated(); |
29 | void currentTemplateChanged(bool templateSelected); |
30 | }; |
31 | |
32 | QT_END_NAMESPACE |
33 | |
34 | #endif // ABSTRACTNEWFORMWIDGET_H |
35 | |