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
default_layoutdecoration.cpp
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
#
include
"default_layoutdecoration.h"
6
#
include
"qlayout_widget_p.h"
7
8
#
include
<
layoutinfo_p
.
h
>
9
10
#
include
<
QtDesigner
/
abstractmetadatabase
.
h
>
11
#
include
<
QtDesigner
/
abstractformwindow
.
h
>
12
#
include
<
QtDesigner
/
abstractformeditor
.
h
>
13
14
QT_BEGIN_NAMESPACE
15
16
namespace
qdesigner_internal
{
17
18
// ---- QDesignerLayoutDecorationFactory ----
19
QDesignerLayoutDecorationFactory
::QDesignerLayoutDecorationFactory(QExtensionManager *parent)
20
: QExtensionFactory(parent)
21
{
22
}
23
24
QObject *
QDesignerLayoutDecorationFactory
::createExtension(QObject *object,
const
QString &iid, QObject *parent)
const
25
{
26
if
(!object->isWidgetType() || iid != Q_TYPEID(QDesignerLayoutDecorationExtension))
27
return
nullptr
;
28
29
QWidget
*widget = qobject_cast<
QWidget
*>(object);
30
31
if
(
const
QLayoutWidget *layoutWidget = qobject_cast<
const
QLayoutWidget*>(widget))
32
return
QLayoutSupport::createLayoutSupport(layoutWidget->formWindow(), widget, parent);
33
34
if
(QDesignerFormWindowInterface *fw = QDesignerFormWindowInterface::findFormWindow(widget))
35
if
(LayoutInfo::managedLayout(fw->core(), widget))
36
return
QLayoutSupport::createLayoutSupport(fw, widget, parent);
37
38
return
nullptr
;
39
}
40
}
41
42
QT_END_NAMESPACE
QPainter::QWidget
friend class QWidget
Definition
qpainter.h:432
qdesigner_internal::QDesignerLayoutDecorationFactory
Definition
default_layoutdecoration.h:18
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qdesigner_internal
Auxiliary methods to store/retrieve settings.
Definition
buddyeditor.cpp:67
qttools
src
designer
src
components
formeditor
default_layoutdecoration.cpp
Generated on
for Qt by
1.18.0