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
customwidget.h
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
#
ifndef
CUSTOMWIDGET_H
6
#
define
CUSTOMWIDGET_H
7
8
#
include
<
QtCore
/
qobject
.
h
>
9
#
include
<
QtCore
/
qstring
.
h
>
10
#
include
<
QtGui
/
qicon
.
h
>
11
12
#
if
0
13
#
pragma
qt_deprecates
(
QtDesigner
/
customwidget
.
h
)
14
#
pragma
qt_deprecates
(
QtDesigner
/
QDesignerCustomWidgetInterface
)
15
#
pragma
qt_deprecates
(
QtDesigner
/
QDesignerCustomWidgetCollectionInterface
)
16
#
endif
17
18
QT_BEGIN_NAMESPACE
19
20
class
QWidget;
21
class
QDesignerFormEditorInterface;
22
23
class
QDesignerCustomWidgetInterface
24
{
25
public
:
26
virtual
~
QDesignerCustomWidgetInterface
() =
default
;
// ### FIXME: weak vtable
27
28
virtual
QString
name
()
const
= 0;
29
virtual
QString
group
()
const
= 0;
30
virtual
QString
toolTip
()
const
= 0;
31
virtual
QString
whatsThis
()
const
= 0;
32
virtual
QString
includeFile
()
const
= 0;
33
virtual
QIcon
icon
()
const
= 0;
34
35
virtual
bool
isContainer
()
const
= 0;
36
37
virtual
QWidget
*
createWidget
(
QWidget
*parent) = 0;
38
39
virtual
bool
isInitialized
()
const
{
return
false
; }
40
virtual
void
initialize
(QDesignerFormEditorInterface *core) { Q_UNUSED(core); }
41
42
virtual
QString
domXml
()
const
43
{
44
return
QLatin1StringView(
"<widget class=\"%1\" name=\"%2\"/>"
)
45
.arg(name(), name().toLower());
46
}
47
48
virtual
QString
codeTemplate
()
const
{
return
QString(); }
49
};
50
51
#
define
QDesignerCustomWidgetInterface_iid
"org.qt-project.QDesignerCustomWidgetInterface"
52
53
Q_DECLARE_INTERFACE(
QDesignerCustomWidgetInterface
,
QDesignerCustomWidgetInterface_iid
)
54
55
class
QDesignerCustomWidgetCollectionInterface
56
{
57
public
:
58
virtual
~
QDesignerCustomWidgetCollectionInterface
() =
default
;
// ### FIXME: weak vtable
59
60
virtual
QList
<
QDesignerCustomWidgetInterface
*>
customWidgets
()
const
= 0;
61
};
62
63
#
define
QDesignerCustomWidgetCollectionInterface_iid
"org.qt-project.Qt.QDesignerCustomWidgetCollectionInterface"
64
65
Q_DECLARE_INTERFACE(QDesignerCustomWidgetCollectionInterface,
QDesignerCustomWidgetCollectionInterface_iid
)
66
67
QT_END_NAMESPACE
68
69
#
endif
// CUSTOMWIDGET_H
QDesignerCustomWidgetCollectionInterface
Definition
customwidget.h:56
QDesignerCustomWidgetCollectionInterface::customWidgets
virtual QList< QDesignerCustomWidgetInterface * > customWidgets() const =0
QDesignerCustomWidgetCollectionInterface::~QDesignerCustomWidgetCollectionInterface
virtual ~QDesignerCustomWidgetCollectionInterface()=default
QDesignerCustomWidgetInterface
Definition
customwidget.h:24
QDesignerCustomWidgetInterface::~QDesignerCustomWidgetInterface
virtual ~QDesignerCustomWidgetInterface()=default
QDesignerCustomWidgetInterface::toolTip
virtual QString toolTip() const =0
QDesignerCustomWidgetInterface::icon
virtual QIcon icon() const =0
QDesignerCustomWidgetInterface::name
virtual QString name() const =0
QDesignerCustomWidgetInterface::includeFile
virtual QString includeFile() const =0
QDesignerCustomWidgetInterface::isContainer
virtual bool isContainer() const =0
QDesignerCustomWidgetInterface::group
virtual QString group() const =0
QDesignerCustomWidgetInterface::codeTemplate
virtual QString codeTemplate() const
Definition
customwidget.h:48
QDesignerCustomWidgetInterface::initialize
virtual void initialize(QDesignerFormEditorInterface *core)
Definition
customwidget.h:40
QDesignerCustomWidgetInterface::createWidget
virtual QWidget * createWidget(QWidget *parent)=0
QDesignerCustomWidgetInterface::whatsThis
virtual QString whatsThis() const =0
QDesignerCustomWidgetInterface::domXml
virtual QString domXml() const
Definition
customwidget.h:42
QDesignerCustomWidgetInterface::isInitialized
virtual bool isInitialized() const
Definition
customwidget.h:39
QPainter::QWidget
friend class QWidget
Definition
qpainter.h:432
QDesignerCustomWidgetInterface_iid
#define QDesignerCustomWidgetInterface_iid
Definition
customwidget.h:51
QDesignerCustomWidgetCollectionInterface_iid
#define QDesignerCustomWidgetCollectionInterface_iid
Definition
customwidget.h:63
qttools
src
uiplugin
customwidget.h
Generated on
for Qt by
1.18.0