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 PROPERTYSHEET_H |
5 | #define PROPERTYSHEET_H |
6 | |
7 | #include <QtDesigner/extension.h> |
8 | |
9 | QT_BEGIN_NAMESPACE |
10 | |
11 | class QVariant; |
12 | |
13 | class QDesignerPropertySheetExtension |
14 | { |
15 | public: |
16 | Q_DISABLE_COPY_MOVE(QDesignerPropertySheetExtension) |
17 | |
18 | QDesignerPropertySheetExtension() = default; |
19 | virtual ~QDesignerPropertySheetExtension() = default; |
20 | |
21 | virtual int count() const = 0; |
22 | |
23 | virtual int indexOf(const QString &name) const = 0; |
24 | |
25 | virtual QString propertyName(int index) const = 0; |
26 | virtual QString propertyGroup(int index) const = 0; |
27 | virtual void setPropertyGroup(int index, const QString &group) = 0; |
28 | |
29 | virtual bool hasReset(int index) const = 0; |
30 | virtual bool reset(int index) = 0; |
31 | |
32 | virtual bool isVisible(int index) const = 0; |
33 | virtual void setVisible(int index, bool b) = 0; |
34 | |
35 | virtual bool isAttribute(int index) const = 0; |
36 | virtual void setAttribute(int index, bool b) = 0; |
37 | |
38 | virtual QVariant property(int index) const = 0; |
39 | virtual void setProperty(int index, const QVariant &value) = 0; |
40 | |
41 | virtual bool isChanged(int index) const = 0; |
42 | virtual void setChanged(int index, bool changed) = 0; |
43 | |
44 | virtual bool isEnabled(int index) const = 0; |
45 | }; |
46 | |
47 | Q_DECLARE_EXTENSION_INTERFACE(QDesignerPropertySheetExtension, |
48 | "org.qt-project.Qt.Designer.PropertySheet" ) |
49 | |
50 | QT_END_NAMESPACE |
51 | |
52 | #endif // PROPERTYSHEET_H |
53 | |