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
4//
5// W A R N I N G
6// -------------
7//
8// This file is not part of the Qt API. It exists for the convenience
9// of Qt Designer. This header
10// file may change from version to version without notice, or even be removed.
11//
12// We mean it.
13//
14
15#ifndef PROMOTIONMODEL_H
16#define PROMOTIONMODEL_H
17
18#include <QtGui/qstandarditemmodel.h>
19#include <QtCore/qmetatype.h>
20#include <QtCore/qset.h>
21
22QT_BEGIN_NAMESPACE
23
24class QDesignerFormEditorInterface;
26
27namespace qdesigner_internal {
28
29 // Item model representing the promoted widgets.
32
33 public:
34 struct ModelData {
35 bool isValid() const { return promotedItem != nullptr; }
36
39 bool referenced{false};
40 };
41
42 explicit PromotionModel(QDesignerFormEditorInterface *core);
43
45
46 ModelData modelData(const QModelIndex &index) const;
47 ModelData modelData(const QStandardItem *item) const;
48
49 QModelIndex indexOfClass(const QString &className) const;
50
51 signals:
54
55 private slots:
57
58 private:
59 void initializeHeaders();
60
61 QDesignerFormEditorInterface *m_core;
62 };
63} // namespace qdesigner_internal
64
65QT_END_NAMESPACE
66
67Q_DECLARE_METATYPE(qdesigner_internal::PromotionModel::ModelData)
68
69#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.