Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
abstractpromotioninterface.h
Go to the documentation of this file.
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 ABSTRACTPROMOTIONINTERFACE_H
5#define ABSTRACTPROMOTIONINTERFACE_H
6
7#include <QtDesigner/sdk_global.h>
8
9#include <QtCore/qpair.h>
10#include <QtCore/qlist.h>
11#include <QtCore/qset.h>
12
13QT_BEGIN_NAMESPACE
14
15class QDesignerWidgetDataBaseItemInterface;
16
17class QDESIGNER_SDK_EXPORT QDesignerPromotionInterface
18{
19public:
20 Q_DISABLE_COPY_MOVE(QDesignerPromotionInterface)
21
22 QDesignerPromotionInterface() = default;
23 virtual ~QDesignerPromotionInterface() = default;
24
25 struct PromotedClass
26 {
27 QDesignerWidgetDataBaseItemInterface *baseItem;
28 QDesignerWidgetDataBaseItemInterface *promotedItem;
29 };
30
31 using PromotedClasses = QList<PromotedClass>;
32
33 virtual PromotedClasses promotedClasses() const = 0;
34
35 virtual QSet<QString> referencedPromotedClassNames() const = 0;
36
37 virtual bool addPromotedClass(const QString &baseClass,
38 const QString &className,
39 const QString &includeFile,
40 QString *errorMessage) = 0;
41
42 virtual bool removePromotedClass(const QString &className, QString *errorMessage) = 0;
43
44 virtual bool changePromotedClassName(const QString &oldClassName, const QString &newClassName, QString *errorMessage) = 0;
45
46 virtual bool setPromotedClassIncludeFile(const QString &className, const QString &includeFile, QString *errorMessage) = 0;
47
48 virtual QList<QDesignerWidgetDataBaseItemInterface *> promotionBaseClasses() const = 0;
49};
50
51QT_END_NAMESPACE
52
53#endif // ABSTRACTPROMOTIONINTERFACE_H
The QDesignerPromotionInterface provides functions for modifying the promoted classes in Designer.
Combined button and popup list for selecting options.