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
qintegrityfbintegration.cpp
Go to the documentation of this file.
1
// Copyright (C) 2017 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
"qintegrityfbintegration.h"
6
#
include
"qintegrityfbscreen.h"
7
#
include
"qintegrityhidmanager.h"
8
9
#
include
<
QtGui
/
private
/
qgenericunixfontdatabase_p
.
h
>
10
#
include
<
QtGui
/
private
/
qgenericunixeventdispatcher_p
.
h
>
11
12
#
include
<
QtFbSupport
/
private
/
qfbbackingstore_p
.
h
>
13
#
include
<
QtFbSupport
/
private
/
qfbwindow_p
.
h
>
14
#
include
<
QtFbSupport
/
private
/
qfbcursor_p
.
h
>
15
16
#
include
<
QtGui
/
private
/
qguiapplication_p
.
h
>
17
#
include
<
qpa
/
qplatforminputcontextfactory_p
.
h
>
18
#
include
<
qpa
/
qwindowsysteminterface
.
h
>
19
#
include
<
qpa
/
qplatformservices
.
h
>
20
21
QT_BEGIN_NAMESPACE
22
23
QIntegrityFbIntegration::QIntegrityFbIntegration(
const
QStringList ¶mList)
24
: m_fontDb(
new
QGenericUnixFontDatabase)
25
{
26
m_primaryScreen =
new
QIntegrityFbScreen(paramList);
27
}
28
29
QIntegrityFbIntegration
::~
QIntegrityFbIntegration
()
30
{
31
QWindowSystemInterface::handleScreenRemoved(m_primaryScreen);
32
}
33
34
void
QIntegrityFbIntegration
::
initialize
()
35
{
36
if
(m_primaryScreen
->
initialize
(
)
)
37
QWindowSystemInterface::handleScreenAdded(m_primaryScreen);
38
else
39
qWarning(
"integrityfb: Failed to initialize screen"
);
40
41
m_inputContext = QPlatformInputContextFactory::create();
42
43
m_nativeInterface.reset(
new
QPlatformNativeInterface);
44
45
if
(!qEnvironmentVariableIntValue(
"QT_QPA_FB_DISABLE_INPUT"
))
46
createInputHandlers();
47
}
48
49
bool
QIntegrityFbIntegration
::
hasCapability
(QPlatformIntegration::Capability cap)
const
50
{
51
switch
(cap) {
52
case
ThreadedPixmaps:
return
true
;
53
case
WindowManagement:
return
false
;
54
default
:
return
QPlatformIntegration::hasCapability(cap);
55
}
56
}
57
58
QPlatformBackingStore
*
QIntegrityFbIntegration
::
createPlatformBackingStore
(QWindow *window)
const
59
{
60
return
new
QFbBackingStore(window);
61
}
62
63
QPlatformWindow
*
QIntegrityFbIntegration
::
createPlatformWindow
(QWindow *window)
const
64
{
65
return
new
QFbWindow(window);
66
}
67
68
QAbstractEventDispatcher *
QIntegrityFbIntegration
::
createEventDispatcher
()
const
69
{
70
return
createUnixEventDispatcher();
71
}
72
73
QList
<
QPlatformScreen
*>
QIntegrityFbIntegration
::
screens
()
const
74
{
75
QList<QPlatformScreen *> list;
76
list.append(m_primaryScreen);
77
return
list;
78
}
79
80
QPlatformFontDatabase
*
QIntegrityFbIntegration
::
fontDatabase
()
const
81
{
82
return
m_fontDb.data();
83
}
84
85
QPlatformServices
*
QIntegrityFbIntegration
::
services
()
const
86
{
87
if
(m_services.isNull())
88
m_services.reset(
new
QPlatformServices);
89
90
return
m_services.data();
91
}
92
93
void
QIntegrityFbIntegration
::createInputHandlers()
94
{
95
new
QIntegrityHIDManager(
"HID"
,
""
,
this
);
96
}
97
98
QPlatformNativeInterface
*
QIntegrityFbIntegration
::
nativeInterface
()
const
99
{
100
return
m_nativeInterface.data();
101
}
102
103
QT_END_NAMESPACE
QIntegrityFbIntegration
Definition
qintegrityfbintegration.h:17
QIntegrityFbIntegration::fontDatabase
QPlatformFontDatabase * fontDatabase() const override
Accessor for the platform integration's fontdatabase.
Definition
qintegrityfbintegration.cpp:80
QIntegrityFbIntegration::createPlatformWindow
QPlatformWindow * createPlatformWindow(QWindow *window) const override
Factory function for QPlatformWindow.
Definition
qintegrityfbintegration.cpp:63
QIntegrityFbIntegration::screens
QList< QPlatformScreen * > screens() const
Definition
qintegrityfbintegration.cpp:73
QIntegrityFbIntegration::services
QPlatformServices * services() const override
Definition
qintegrityfbintegration.cpp:85
QIntegrityFbIntegration::hasCapability
bool hasCapability(QPlatformIntegration::Capability cap) const override
Definition
qintegrityfbintegration.cpp:49
QIntegrityFbIntegration::createPlatformBackingStore
QPlatformBackingStore * createPlatformBackingStore(QWindow *window) const override
Factory function for QPlatformBackingStore.
Definition
qintegrityfbintegration.cpp:58
QIntegrityFbIntegration::initialize
void initialize() override
Performs initialization steps that depend on having an event dispatcher available.
Definition
qintegrityfbintegration.cpp:34
QIntegrityFbIntegration::createEventDispatcher
QAbstractEventDispatcher * createEventDispatcher() const override
Factory function for the GUI event dispatcher.
Definition
qintegrityfbintegration.cpp:68
QIntegrityFbIntegration::nativeInterface
QPlatformNativeInterface * nativeInterface() const override
Definition
qintegrityfbintegration.cpp:98
QIntegrityFbIntegration::~QIntegrityFbIntegration
~QIntegrityFbIntegration()
Definition
qintegrityfbintegration.cpp:29
QIntegrityFbScreen::initialize
bool initialize()
Definition
qintegrityfbscreen.cpp:76
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
qtbase
src
plugins
platforms
integrity
qintegrityfbintegration.cpp
Generated on
for Qt by
1.18.0