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
qwaylandshell.h
Go to the documentation of this file.
1
// Copyright (C) 2017 Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
2
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only
3
// Qt-Security score:significant reason:default
4
5
#
ifndef
QWAYLANDSHELL_H
6
#
define
QWAYLANDSHELL_H
7
8
#
include
<
QtWaylandCompositor
/
qtwaylandqmlinclude
.
h
>
9
#
include
<
QtWaylandCompositor
/
qwaylandcompositorextension
.
h
>
10
11
QT_BEGIN_NAMESPACE
12
13
class
QWaylandShellPrivate;
14
15
class
Q_WAYLANDCOMPOSITOR_EXPORT
QWaylandShell
:
public
QWaylandCompositorExtension
16
{
17
Q_OBJECT
18
Q_DECLARE_PRIVATE(QWaylandShell)
19
Q_PROPERTY(FocusPolicy focusPolicy READ focusPolicy WRITE setFocusPolicy NOTIFY focusPolicyChanged)
20
21
QML_NAMED_ELEMENT(Shell)
22
QML_UNCREATABLE(
""
)
23
QML_ADDED_IN_VERSION(1, 0)
24
public
:
25
enum
FocusPolicy {
26
AutomaticFocus,
27
ManualFocus
28
};
29
Q_ENUM(FocusPolicy)
30
31
QWaylandShell();
32
QWaylandShell(QWaylandObject *waylandObject);
33
34
FocusPolicy focusPolicy()
const
;
35
void
setFocusPolicy(FocusPolicy focusPolicy);
36
37
Q_SIGNALS:
38
void
focusPolicyChanged();
39
40
protected
:
41
explicit
QWaylandShell(QWaylandShellPrivate &dd);
42
explicit
QWaylandShell(QWaylandObject *container, QWaylandShellPrivate &dd);
43
};
44
45
template
<
typename
T
>
46
class
Q_WAYLANDCOMPOSITOR_EXPORT
QWaylandShellTemplate
:
public
QWaylandShell
47
{
48
public
:
49
QWaylandShellTemplate()
50
: QWaylandShell()
51
{ }
52
53
QWaylandShellTemplate(QWaylandObject *container)
54
: QWaylandShell(container)
55
{ }
56
57
const
struct
wl_interface *extensionInterface()
const
override
58
{
59
return
T::interface();
60
}
61
62
static
T *findIn(QWaylandObject *container)
63
{
64
if
(!container)
return
nullptr
;
65
return
qobject_cast<T *>(container->extension(T::interfaceName()));
66
}
67
68
protected
:
69
QWaylandShellTemplate(QWaylandShellPrivate &dd)
70
: QWaylandShell(dd)
71
{ }
72
73
QWaylandShellTemplate(QWaylandObject *container, QWaylandShellPrivate &dd)
74
: QWaylandShell(container,dd)
75
{ }
76
};
77
78
QT_END_NAMESPACE
79
80
#
endif
// QWAYLANDSHELL_H
QWaylandShellTemplate
Definition
qwaylandshell.h:47
QWaylandShell
\inmodule QtWaylandCompositor \abstract
Definition
qwaylandshell.h:16
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtwayland
src
compositor
extensions
qwaylandshell.h
Generated on
for Qt by
1.18.0