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
promotionmodel_p.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// Qt-Security score:significant reason:default
4
5//
6// W A R N I N G
7// -------------
8//
9// This file is not part of the Qt API. It exists for the convenience
10// of Qt Designer. This header
11// file may change from version to version without notice, or even be removed.
12//
13// We mean it.
14//
15
16#ifndef PROMOTIONMODEL_H
17#define PROMOTIONMODEL_H
18
19#include <QtGui/qstandarditemmodel.h>
20#include <QtCore/qmetatype.h>
21#include <QtCore/qset.h>
22
23QT_BEGIN_NAMESPACE
24
25class QDesignerFormEditorInterface;
27
28namespace qdesigner_internal {
29
30 // Item model representing the promoted widgets.
33
34 public:
35 struct ModelData {
36 bool isValid() const { return promotedItem != nullptr; }
37
40 bool referenced{false};
41 };
42
43 explicit PromotionModel(QDesignerFormEditorInterface *core);
44
46
47 ModelData modelData(const QModelIndex &index) const;
48 ModelData modelData(const QStandardItem *item) const;
49
50 QModelIndex indexOfClass(const QString &className) const;
51
52 signals:
55
56 private slots:
58
59 private:
60 void initializeHeaders();
61
62 QDesignerFormEditorInterface *m_core;
63 };
64} // namespace qdesigner_internal
65
66QT_END_NAMESPACE
67
68Q_DECLARE_METATYPE(qdesigner_internal::PromotionModel::ModelData)
69
70#endif // PROMOTIONMODEL_H
The QDesignerWidgetDataBaseItemInterface class provides an interface that is used to access individua...
ModelData modelData(const QStandardItem *item) const
QModelIndex indexOfClass(const QString &className) const
PromotionModel(QDesignerFormEditorInterface *core)
ModelData modelData(const QModelIndex &index) const
void classNameChanged(QDesignerWidgetDataBaseItemInterface *, const QString &newName)
Combined button and popup list for selecting options.
StandardItemList baseModelRow(const QDesignerWidgetDataBaseItemInterface *dbItem)
StandardItemList promotedModelRow(QDesignerWidgetDataBaseItemInterface *baseItem, QDesignerWidgetDataBaseItemInterface *dbItem, bool referenced)
StandardItemList modelRow()
Auxiliary methods to store/retrieve settings.