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
qaxwidgetextrainfo.cpp
Go to the documentation of this file.
1
// Copyright (C) 2016 The Qt Company Ltd.
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
// Qt-Security score:significant reason:default
4
5
#
include
"qaxwidgetextrainfo.h"
6
#
include
"qdesigneraxwidget.h"
7
#
include
"qaxwidgetpropertysheet.h"
8
9
#
include
<
QtDesigner
/
abstractformeditor
.
h
>
10
#
include
<
QtDesigner
/
private
/
ui4_p
.
h
>
11
12
QT_BEGIN_NAMESPACE
13
14
QAxWidgetExtraInfo
::
QAxWidgetExtraInfo
(QDesignerAxWidget *widget, QDesignerFormEditorInterface *core, QObject *parent)
15
:
QObject
(
parent
), m_widget(widget), m_core(core)
16
{
17
}
18
19
QWidget
*
QAxWidgetExtraInfo
::
widget
()
const
20
{
21
return
m_widget;
22
}
23
24
QDesignerFormEditorInterface
*
QAxWidgetExtraInfo
::
core
()
const
25
{
26
return
m_core;
27
}
28
29
bool
QAxWidgetExtraInfo
::
saveUiExtraInfo
(DomUI *)
30
{
31
return
false
;
32
}
33
34
bool
QAxWidgetExtraInfo
::
loadUiExtraInfo
(DomUI *)
35
{
36
return
false
;
37
}
38
39
bool
QAxWidgetExtraInfo
::
saveWidgetExtraInfo
(DomWidget *ui_widget)
40
{
41
/* Turn off standard setters and make sure "control" is in front,
42
* otherwise, previews will not work as the properties are not applied via
43
* the caching property sheet, them. */
44
QList<DomProperty *> props = ui_widget->elementProperty();
45
const
qsizetype size = props.size();
46
const
QString controlProperty = QLatin1String(
QAxWidgetPropertySheet
::
controlPropertyName
);
47
for
(qsizetype i = 0; i < size; ++i) {
48
props.at(i)->setAttributeStdset(
false
);
49
if
(i > 0 && props.at(i)->attributeName() == controlProperty) {
50
qSwap(props[0], props[i]);
51
ui_widget->setElementProperty(props);
52
}
53
54
}
55
return
true
;
56
}
57
58
bool
QAxWidgetExtraInfo
::
loadWidgetExtraInfo
(DomWidget *)
59
{
60
return
false
;
61
}
62
63
QAxWidgetExtraInfoFactory
::QAxWidgetExtraInfoFactory(QDesignerFormEditorInterface *core, QExtensionManager *parent)
64
: QExtensionFactory(parent), m_core(core)
65
{
66
}
67
68
QObject
*
QAxWidgetExtraInfoFactory
::
createExtension
(QObject *object,
const
QString &iid, QObject *parent)
const
69
{
70
if
(iid != Q_TYPEID(QDesignerExtraInfoExtension))
71
return
0;
72
73
if
(QDesignerAxWidget *w = qobject_cast<QDesignerAxWidget*>(object))
74
return
new
QAxWidgetExtraInfo(w, m_core, parent);
75
76
return
0;
77
}
78
79
QT_END_NAMESPACE
QAxWidgetExtraInfoFactory
Definition
qaxwidgetextrainfo.h:40
QAxWidgetExtraInfoFactory::createExtension
QObject * createExtension(QObject *object, const QString &iid, QObject *parent) const override
Creates an extension specified by iid for the given object.
Definition
qaxwidgetextrainfo.cpp:68
QAxWidgetExtraInfo
Definition
qaxwidgetextrainfo.h:19
QAxWidgetExtraInfo::loadWidgetExtraInfo
bool loadWidgetExtraInfo(DomWidget *ui_widget) override
Loads extra information about the specified widget, and returns true if successful; otherwise returns...
Definition
qaxwidgetextrainfo.cpp:58
QAxWidgetExtraInfo::saveWidgetExtraInfo
bool saveWidgetExtraInfo(DomWidget *ui_widget) override
Saves the information about the specified widget, and returns true if successful; otherwise returns f...
Definition
qaxwidgetextrainfo.cpp:39
QAxWidgetExtraInfo::saveUiExtraInfo
bool saveUiExtraInfo(DomUI *ui) override
Saves the information about the user interface specified by ui, and returns true if successful; other...
Definition
qaxwidgetextrainfo.cpp:29
QAxWidgetExtraInfo::core
QDesignerFormEditorInterface * core() const override
\omit
Definition
qaxwidgetextrainfo.cpp:24
QAxWidgetExtraInfo::widget
QWidget * widget() const override
Returns the widget described by this extension.
Definition
qaxwidgetextrainfo.cpp:19
QAxWidgetExtraInfo::loadUiExtraInfo
bool loadUiExtraInfo(DomUI *ui) override
Loads extra information about the user interface specified by ui, and returns true if successful; oth...
Definition
qaxwidgetextrainfo.cpp:34
QAxWidgetPropertySheet
Definition
qaxwidgetpropertysheet.h:25
QAxWidgetPropertySheet::controlPropertyName
static const char * controlPropertyName
Definition
qaxwidgetpropertysheet.h:39
QObjectData::parent
QObject * parent
Definition
qobject.h:74
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qttools
src
designer
src
plugins
activeqt
qaxwidgetextrainfo.cpp
Generated on
for Qt by
1.18.0