Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
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
7
8#include <QtGui/private/qgenericunixfontdatabase_p.h>
9#include <QtGui/private/qgenericunixservices_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
21
23 : m_fontDb(new QGenericUnixFontDatabase),
24 m_services(new QGenericUnixServices)
25{
26 m_primaryScreen = new QIntegrityFbScreen(paramList);
27}
28
33
35{
36 if (m_primaryScreen->initialize())
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
50{
51 switch (cap) {
52 case ThreadedPixmaps: return true;
53 case WindowManagement: return false;
55 }
56}
57
62
67
69{
70 return createUnixEventDispatcher();
71}
72
73QList<QPlatformScreen *> QIntegrityFbIntegration::screens() const
74{
75 QList<QPlatformScreen *> list;
76 list.append(m_primaryScreen);
77 return list;
78}
79
84
86{
87 return m_services.data();
88}
89
90void QIntegrityFbIntegration::createInputHandlers()
91{
92 new QIntegrityHIDManager("HID", "", this);
93}
94
96{
97 return m_nativeInterface.data();
98}
99
QPlatformFontDatabase * fontDatabase() const override
Accessor for the platform integration's fontdatabase.
QIntegrityFbIntegration(const QStringList &paramList)
QPlatformWindow * createPlatformWindow(QWindow *window) const override
Factory function for QPlatformWindow.
QList< QPlatformScreen * > screens() const
QPlatformServices * services() const override
bool hasCapability(QPlatformIntegration::Capability cap) const override
QPlatformBackingStore * createPlatformBackingStore(QWindow *window) const override
Factory function for QPlatformBackingStore.
void initialize() override
Performs initialization steps that depend on having an event dispatcher available.
QAbstractEventDispatcher * createEventDispatcher() const override
Factory function for the GUI event dispatcher.
QPlatformNativeInterface * nativeInterface() const override
void append(parameter_type t)
Definition qlist.h:458
The QPlatformBackingStore class provides the drawing area for top-level windows.
The QPlatformFontDatabase class makes it possible to customize how fonts are discovered and how they ...
static QPlatformInputContext * create()
virtual bool hasCapability(Capability cap) const
Capability
Capabilities are used to determine specific features of a platform integration.
The QPlatformNativeInterface class provides an abstraction for retrieving native resource handles.
The QPlatformServices provides the backend for desktop-related functionality.
The QPlatformWindow class provides an abstraction for top-level windows.
T * data() const noexcept
Returns the value of the pointer referenced by this object.
void reset(T *other=nullptr) noexcept(noexcept(Cleanup::cleanup(std::declval< T * >())))
Deletes the existing object it is pointing to (if any), and sets its pointer to other.
\inmodule QtCore
static void handleScreenAdded(QPlatformScreen *screen, bool isPrimary=false)
Should be called by the implementation whenever a new screen is added.
static void handleScreenRemoved(QPlatformScreen *screen)
Should be called by the implementation whenever a screen is removed.
\inmodule QtGui
Definition qwindow.h:63
Combined button and popup list for selecting options.
#define qWarning
Definition qlogging.h:166
GLenum cap
Q_CORE_EXPORT int qEnvironmentVariableIntValue(const char *varName, bool *ok=nullptr) noexcept
QList< int > list
[14]
aWidget window() -> setWindowTitle("New Window Title")
[2]