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
widgetdatabase_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
16
#
ifndef
WIDGETDATABASE_H
17
#
define
WIDGETDATABASE_H
18
19
#
include
"shared_global_p.h"
20
21
#
include
<
QtDesigner
/
abstractwidgetdatabase
.
h
>
22
23
#
include
<
QtGui
/
qicon
.
h
>
24
#
include
<
QtCore
/
qstring
.
h
>
25
#
include
<
QtCore
/
qvariant
.
h
>
26
#
include
<
QtCore
/
qpair
.
h
>
27
#
include
<
QtCore
/
qstringlist
.
h
>
28
29
QT_BEGIN_NAMESPACE
30
31
class
QObject;
32
class
QDesignerCustomWidgetInterface
;
33
34
namespace
qdesigner_internal
{
35
36
class
QDESIGNER_SHARED_EXPORT
WidgetDataBaseItem
:
public
QDesignerWidgetDataBaseItemInterface
37
{
38
public
:
39
explicit
WidgetDataBaseItem
(
const
QString
&
name
=
QString
(),
40
const
QString
&
group
=
QString
());
41
42
QString
name
()
const
override
;
43
void
setName
(
const
QString
&
name
)
override
;
44
45
QString
group
()
const
override
;
46
void
setGroup
(
const
QString
&
group
)
override
;
47
48
QString
toolTip
()
const
override
;
49
void
setToolTip
(
const
QString
&
toolTip
)
override
;
50
51
QString
whatsThis
()
const
override
;
52
void
setWhatsThis
(
const
QString
&
whatsThis
)
override
;
53
54
QString
includeFile
()
const
override
;
55
void
setIncludeFile
(
const
QString
&
includeFile
)
override
;
56
57
58
QIcon
icon
()
const
override
;
59
void
setIcon
(
const
QIcon
&
icon
)
override
;
60
61
bool
isCompat
()
const
override
;
62
void
setCompat
(
bool
compat
)
override
;
63
64
bool
isContainer
()
const
override
;
65
void
setContainer
(
bool
b
)
override
;
66
67
bool
isCustom
()
const
override
;
68
void
setCustom
(
bool
b
)
override
;
69
70
QString
pluginPath
()
const
override
;
71
void
setPluginPath
(
const
QString
&
path
)
override
;
72
73
bool
isPromoted
()
const
override
;
74
void
setPromoted
(
bool
b
)
override
;
75
76
QString
extends
()
const
override
;
77
void
setExtends
(
const
QString
&
s
)
override
;
78
79
void
setDefaultPropertyValues
(
const
QList
<
QVariant
> &
list
)
override
;
80
QList
<
QVariant
>
defaultPropertyValues
()
const
override
;
81
82
static
WidgetDataBaseItem
*
clone
(
const
QDesignerWidgetDataBaseItemInterface
*
item
);
83
84
QString
baseClassName
()
const
;
// FIXME Qt 7: Move to QDesignerWidgetDataBaseItemInterface
85
void
setBaseClassName
(
const
QString
&
b
);
86
87
QStringList
fakeSlots
()
const
;
88
void
setFakeSlots
(
const
QStringList
&);
89
90
QStringList
fakeSignals
()
const
;
91
void
setFakeSignals
(
const
QStringList
&);
92
93
QString
addPageMethod
()
const
;
94
void
setAddPageMethod
(
const
QString
&
m
);
95
96
private
:
97
QString
m_name
;
98
QString
m_baseClassName
;
99
QString
m_group
;
100
QString
m_toolTip
;
101
QString
m_whatsThis
;
102
QString
m_includeFile
;
103
QString
m_pluginPath
;
104
QString
m_extends
;
105
QString
m_addPageMethod
;
106
QIcon
m_icon
;
107
uint
m_compat
: 1;
108
uint
m_container
: 1;
109
uint
m_custom
: 1;
110
uint
m_promoted
: 1;
111
QList
<
QVariant
>
m_defaultPropertyValues
;
112
QStringList
m_fakeSlots
;
113
QStringList
m_fakeSignals
;
114
};
115
116
enum
IncludeType
{
IncludeLocal
,
IncludeGlobal
};
117
118
using
IncludeSpecification
=
std
::
pair
<
QString
,
IncludeType
>;
119
120
QDESIGNER_SHARED_EXPORT
IncludeSpecification
includeSpecification
(
QString
includeFile
);
121
QDESIGNER_SHARED_EXPORT
QString
buildIncludeFile
(
QString
includeFile
,
IncludeType
includeType
);
122
123
class
QDESIGNER_SHARED_EXPORT
WidgetDataBase
:
public
QDesignerWidgetDataBaseInterface
124
{
125
Q_OBJECT
126
public
:
127
explicit
WidgetDataBase
(
QDesignerFormEditorInterface
*
core
,
QObject
*
parent
=
nullptr
);
128
~
WidgetDataBase
()
override
;
129
130
QDesignerFormEditorInterface
*
core
()
const
override
;
131
132
int
indexOfObject
(
QObject
*
o
,
bool
resolveName
=
true
)
const
override
;
133
134
void
remove
(
int
index
);
135
136
137
void
grabDefaultPropertyValues
();
138
void
grabStandardWidgetBoxIcons
();
139
140
// Helpers for 'New Form' wizards in integrations. Obtain a list of suitable classes and generate XML for them.
141
static
QStringList
formWidgetClasses
(
const
QDesignerFormEditorInterface
*
core
);
142
static
QStringList
customFormWidgetClasses
(
const
QDesignerFormEditorInterface
*
core
);
143
static
QString
formTemplate
(
const
QDesignerFormEditorInterface
*
core
,
const
QString
&
className
,
const
QString
&
objectName
);
144
145
// Helpers for 'New Form' wizards: Set a fixed size on a XML form template
146
static
QString
scaleFormTemplate
(
const
QString
&
xml
,
const
QSize
&
size
,
bool
fixed
);
147
148
public
slots
:
149
void
loadPlugins
();
150
151
private
:
152
QList
<
QVariant
>
defaultPropertyValues
(
const
QString
&
name
);
153
154
QDesignerFormEditorInterface
*
m_core
;
155
};
156
157
QDESIGNER_SHARED_EXPORT
QDesignerWidgetDataBaseItemInterface
158
*
appendDerived
(
QDesignerWidgetDataBaseInterface
*
db
,
159
const
QString
&
className
,
160
const
QString
&
group
,
161
const
QString
&
baseClassName
,
162
const
QString
&
includeFile
,
163
bool
promoted
,
164
bool
custom
);
165
166
using
WidgetDataBaseItemList
=
QList
<
QDesignerWidgetDataBaseItemInterface
*>;
167
168
QDESIGNER_SHARED_EXPORT
WidgetDataBaseItemList
169
promotionCandidates
(
const
QDesignerWidgetDataBaseInterface
*
db
,
170
const
QString
&
baseClassName
);
171
}
// namespace qdesigner_internal
172
173
QT_END_NAMESPACE
174
175
#
endif
// WIDGETDATABASE_H
QDesignerCustomWidgetInterface
Definition
customwidget.h:23
qdesigner_internal::FormEditorOptionsPage
Definition
formeditor_optionspage.h:22
qdesigner_internal::FormEditorOptionsPage::FormEditorOptionsPage
FormEditorOptionsPage(QDesignerFormEditorInterface *core)
Definition
formeditor_optionspage.cpp:79
qdesigner_internal::FormEditorOptionsPage::name
QString name() const override
Definition
formeditor_optionspage.cpp:84
qdesigner_internal::FormEditorOptionsPage::finish
void finish() override
Definition
formeditor_optionspage.cpp:169
qdesigner_internal::FormEditorOptionsPage::createPage
QWidget * createPage(QWidget *parent) override
Definition
formeditor_optionspage.cpp:90
qdesigner_internal::FormEditorOptionsPage::apply
void apply() override
Definition
formeditor_optionspage.cpp:136
qdesigner_internal::FormEditor
Definition
formeditor.h:18
qdesigner_internal::FormEditor::FormEditor
FormEditor(const QStringList &pluginPaths, QObject *parent=nullptr)
Definition
formeditor.cpp:51
qdesigner_internal::FormEditor::~FormEditor
~FormEditor() override
qdesigner_internal::PreviewConfigurationWidget::PreviewConfigurationWidgetPrivate
Definition
previewconfigurationwidget.cpp:55
qdesigner_internal::TemplateOptionsPage
Definition
templateoptionspage.h:52
qdesigner_internal::TemplateOptionsPage::apply
void apply() override
Definition
templateoptionspage.cpp:131
qdesigner_internal::TemplateOptionsPage::name
QString name() const override
Definition
templateoptionspage.cpp:117
qdesigner_internal::TemplateOptionsPage::createPage
QWidget * createPage(QWidget *parent) override
Definition
templateoptionspage.cpp:123
qdesigner_internal::TemplateOptionsPage::finish
void finish() override
Definition
templateoptionspage.cpp:143
qdesigner_internal::TemplateOptionsWidget
Definition
templateoptionspage.h:27
qdesigner_internal::TemplateOptionsWidget::chooseTemplatePath
static QString chooseTemplatePath(QDesignerFormEditorInterface *core, QWidget *parent)
Definition
templateoptionspage.cpp:99
qdesigner_internal::TemplateOptionsWidget::~TemplateOptionsWidget
~TemplateOptionsWidget()
Definition
templateoptionspage.cpp:40
qdesigner_internal::TemplateOptionsWidget::setTemplatePaths
void setTemplatePaths(const QStringList &l)
Definition
templateoptionspage.cpp:55
qdesigner_internal::TemplateOptionsWidget::templatePaths
QStringList templatePaths() const
Definition
templateoptionspage.cpp:45
qdesigner_internal::WidgetDataBaseItem
Definition
widgetdatabase_p.h:37
qdesigner_internal::WidgetDataBase
Definition
widgetdatabase_p.h:124
qdesigner_internal::ZoomSettingsWidget
Definition
formeditor_optionspage.cpp:31
QT_FORMEDITOR_EXPORT
#define QT_FORMEDITOR_EXPORT
Definition
formeditor_global.h:16
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qstandardpaths_haiku.cpp:21
qdesigner_internal::Ui
Definition
templateoptionspage.h:20
qdesigner_internal
Auxiliary methods to store/retrieve settings.
Definition
buddyeditor.cpp:66
qdesigner_internal::IncludeType
IncludeType
Definition
widgetdatabase_p.h:116
qdesigner_internal::IncludeLocal
@ IncludeLocal
Definition
widgetdatabase_p.h:116
qdesigner_internal::IncludeGlobal
@ IncludeGlobal
Definition
widgetdatabase_p.h:116
QDESIGNER_SHARED_EXPORT
#define QDESIGNER_SHARED_EXPORT
Definition
shared_global_p.h:32
qttools
src
designer
src
lib
shared
widgetdatabase_p.h
Generated on Sat Sep 21 2024 00:50:19 for Qt by
1.12.0