Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
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
23
QT_BEGIN_NAMESPACE
24
25
class
QDesignerFormEditorInterface;
26
class
QDesignerWidgetDataBaseItemInterface
;
27
28
namespace
qdesigner_internal
{
29
30
// Item model representing the promoted widgets.
31
class
PromotionModel
:
public
QStandardItemModel
{
32
Q_OBJECT
33
34
public
:
35
struct
ModelData
{
36
bool
isValid
()
const
{
return
promotedItem
!=
nullptr
; }
37
38
QDesignerWidgetDataBaseItemInterface
*
baseItem
{
nullptr
};
39
QDesignerWidgetDataBaseItemInterface
*
promotedItem
{
nullptr
};
40
bool
referenced
{
false
};
41
};
42
43
explicit
PromotionModel
(QDesignerFormEditorInterface *core);
44
45
void
updateFromWidgetDatabase
();
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
:
53
void
includeFileChanged
(
QDesignerWidgetDataBaseItemInterface
*,
const
QString
&
includeFile
);
54
void
classNameChanged
(
QDesignerWidgetDataBaseItemInterface
*,
const
QString &newName);
55
56
private
slots
:
57
void
slotItemChanged
(
QStandardItem
*
item
);
58
59
private
:
60
void
initializeHeaders();
61
62
QDesignerFormEditorInterface *m_core;
63
};
64
}
// namespace qdesigner_internal
65
66
QT_END_NAMESPACE
67
68
Q_DECLARE_METATYPE(qdesigner_internal::PromotionModel::ModelData)
69
70
#
endif
// PROMOTIONMODEL_H
QDesignerWidgetDataBaseItemInterface
The QDesignerWidgetDataBaseItemInterface class provides an interface that is used to access individua...
Definition
abstractwidgetdatabase.h:21
qdesigner_internal::PromotionModel
Definition
promotionmodel_p.h:31
qdesigner_internal::PromotionModel::modelData
ModelData modelData(const QStandardItem *item) const
Definition
promotionmodel.cpp:153
qdesigner_internal::PromotionModel::indexOfClass
QModelIndex indexOfClass(const QString &className) const
Definition
promotionmodel.cpp:164
qdesigner_internal::PromotionModel::updateFromWidgetDatabase
void updateFromWidgetDatabase()
Definition
promotionmodel.cpp:98
qdesigner_internal::PromotionModel::PromotionModel
PromotionModel(QDesignerFormEditorInterface *core)
Definition
promotionmodel.cpp:83
qdesigner_internal::PromotionModel::modelData
ModelData modelData(const QModelIndex &index) const
Definition
promotionmodel.cpp:159
qdesigner_internal::PromotionModel::classNameChanged
void classNameChanged(QDesignerWidgetDataBaseItemInterface *, const QString &newName)
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
QT_BEGIN_NAMESPACE::ClassNameColumn
@ ClassNameColumn
Definition
promotionmodel.cpp:21
QT_BEGIN_NAMESPACE::NumColumns
@ NumColumns
Definition
promotionmodel.cpp:21
QT_BEGIN_NAMESPACE::IncludeTypeColumn
@ IncludeTypeColumn
Definition
promotionmodel.cpp:21
QT_BEGIN_NAMESPACE::IncludeFileColumn
@ IncludeFileColumn
Definition
promotionmodel.cpp:21
QT_BEGIN_NAMESPACE::ReferencedColumn
@ ReferencedColumn
Definition
promotionmodel.cpp:21
QT_BEGIN_NAMESPACE::baseModelRow
StandardItemList baseModelRow(const QDesignerWidgetDataBaseItemInterface *dbItem)
Definition
promotionmodel.cpp:33
QT_BEGIN_NAMESPACE::promotedModelRow
StandardItemList promotedModelRow(QDesignerWidgetDataBaseItemInterface *baseItem, QDesignerWidgetDataBaseItemInterface *dbItem, bool referenced)
Definition
promotionmodel.cpp:44
QT_BEGIN_NAMESPACE::modelRow
StandardItemList modelRow()
Definition
promotionmodel.cpp:24
qdesigner_internal
Auxiliary methods to store/retrieve settings.
Definition
buddyeditor.cpp:67
qttools
src
designer
src
lib
shared
promotionmodel_p.h
Generated on
for Qt by
1.18.0