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
qqnxintegration.cpp
Go to the documentation of this file.
1// Copyright (C) 2013 BlackBerry Limited. All rights reserved.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#undef QT_NO_FOREACH // this file contains unported legacy Q_FOREACH uses
5
6#include "qqnxglobal.h"
7
8#include "qqnxintegration.h"
10#include "qqnxnativeinterface.h"
12#include "qqnxscreen.h"
14#include "qqnxwindow.h"
18#include "qqnxservices.h"
19
20#include "qqnxforeignwindow.h"
21#include "qqnxrasterwindow.h"
22#if !defined(QT_NO_OPENGL)
23#include "qqnxeglwindow.h"
24#endif
25
26#if QT_CONFIG(qqnx_pps)
27#include "qqnxnavigatorpps.h"
30#endif
31
32#if QT_CONFIG(qqnx_pps)
34# include "qqnxclipboard.h"
35# if QT_CONFIG(qqnx_imf)
36# include "qqnxinputcontext_imf.h"
37# else
39# endif
40#endif
41
42#include <qpa/qplatforminputcontextfactory_p.h>
43#include <qpa/qplatforminputcontext.h>
44
45#include "private/qgenericunixfontdatabase_p.h"
46#include "private/qgenericunixeventdispatcher_p.h"
47
48#include <qpa/qplatformwindow.h>
49#include <qpa/qwindowsysteminterface.h>
50
51#include <QtGui/private/qguiapplication_p.h>
52#include <QtGui/private/qrhibackingstore_p.h>
53
54#if !defined(QT_NO_OPENGL)
55#include "qqnxglcontext.h"
56#include <QtGui/QOpenGLContext>
57#endif
58
59#include <private/qsimpledrag_p.h>
60
61#include <QtCore/QDebug>
62#include <QtCore/QJsonDocument>
63#include <QtCore/QJsonObject>
64#include <QtCore/QJsonArray>
65#include <QtCore/QFile>
66#include <errno.h>
67
69
70// Q_LOGGING_CATEGORY(lcQpaQnx, "qt.qpa.qnx");
71
72using namespace Qt::StringLiterals;
73
74QQnxIntegration *QQnxIntegration::ms_instance;
75
76static inline QQnxIntegration::Options parseOptions(const QStringList &paramList)
77{
78 QQnxIntegration::Options options = QQnxIntegration::NoOptions;
79 if (!paramList.contains("no-fullscreen"_L1)) {
81 }
82
83 if (paramList.contains("flush-screen-context"_L1)) {
85 }
86
87 if (paramList.contains("rootwindow"_L1)) {
89 }
90
91 if (!paramList.contains("disable-EGL_KHR_surfaceless_context"_L1)) {
93 }
94
95 return options;
96}
97
98static inline int getContextCapabilities(const QStringList &paramList)
99{
100 constexpr auto contextCapabilitiesPrefix = "screen-context-capabilities="_L1;
101 int contextCapabilities = SCREEN_APPLICATION_CONTEXT;
102 for (const QString &param : paramList) {
103 if (param.startsWith(contextCapabilitiesPrefix)) {
104 auto value = QStringView{param}.mid(contextCapabilitiesPrefix.length());
105 bool ok = false;
106 contextCapabilities = value.toInt(&ok, 0);
107 if (!ok)
108 contextCapabilities = SCREEN_APPLICATION_CONTEXT;
109 }
110 }
111 return contextCapabilities;
112}
113
116 , m_screenContextId(256, 0)
117 , m_screenEventThread(0)
118 , m_navigatorEventHandler(new QQnxNavigatorEventHandler())
119 , m_virtualKeyboard(0)
120#if QT_CONFIG(qqnx_pps)
121 , m_navigatorEventNotifier(0)
122 , m_inputContext(0)
123 , m_buttonsNotifier(new QQnxButtonEventNotifier())
124#endif
125 , m_qpaInputContext(0)
126 , m_services(0)
127 , m_fontDatabase(new QGenericUnixFontDatabase())
128 , m_eventDispatcher(createUnixEventDispatcher())
129 , m_nativeInterface(new QQnxNativeInterface(this))
130 , m_screenEventHandler(new QQnxScreenEventHandler(this))
131#if !defined(QT_NO_CLIPBOARD)
132 , m_clipboard(0)
133#endif
134 , m_navigator(0)
135#if QT_CONFIG(draganddrop)
136 , m_drag(new QSimpleDrag())
137#endif
138#if QT_CONFIG(opengl)
139 , m_eglDisplay(EGL_NO_DISPLAY)
140#endif
141{
142 ms_instance = this;
143 m_options = parseOptions(paramList);
144 qCDebug(lcQpaQnx) << Q_FUNC_INFO;
145
146 // Open connection to QNX composition manager
147 if (screen_create_context(&m_screenContext, getContextCapabilities(paramList))) {
148 qFatal("%s - Screen: Failed to create screen context - Error: %s (%i)",
149 Q_FUNC_INFO, strerror(errno), errno);
150 }
151 screen_get_context_property_cv(m_screenContext,
152 SCREEN_PROPERTY_ID,
153 m_screenContextId.size(),
154 m_screenContextId.data());
155 m_screenContextId.resize(strlen(m_screenContextId.constData()));
156
157#if QT_CONFIG(qqnx_pps)
158 // Create/start navigator event notifier
159 m_navigatorEventNotifier = new QQnxNavigatorEventNotifier(m_navigatorEventHandler);
160
161 // delay invocation of start() to the time the event loop is up and running
162 // needed to have the QThread internals of the main thread properly initialized
163 QMetaObject::invokeMethod(m_navigatorEventNotifier, "start", Qt::QueuedConnection);
164#endif
165
166#if QT_CONFIG(opengl)
167 createEglDisplay();
168#endif
169
170 // Create/start event thread
171 m_screenEventThread = new QQnxScreenEventThread(m_screenContext);
172 m_screenEventHandler->setScreenEventThread(m_screenEventThread);
173 m_screenEventThread->start();
174
175 m_qpaInputContext = QPlatformInputContextFactory::create();
176
177#if QT_CONFIG(qqnx_pps)
178 if (!m_qpaInputContext) {
179 // Create/start the keyboard class.
180 m_virtualKeyboard = new QQnxVirtualKeyboardPps();
181
182 // delay invocation of start() to the time the event loop is up and running
183 // needed to have the QThread internals of the main thread properly initialized
184 QMetaObject::invokeMethod(m_virtualKeyboard, "start", Qt::QueuedConnection);
185 }
186#endif
187
188#if QT_CONFIG(qqnx_pps)
189 m_navigator = new QQnxNavigatorPps();
190#endif
191
192 // Create services handling class
193 if (m_navigator)
194 m_services = new QQnxServices(m_navigator);
195
196 createDisplays();
197
198 if (m_virtualKeyboard) {
199 // TODO check if we need to do this for all screens or only the primary one
200 QObject::connect(m_virtualKeyboard, SIGNAL(heightChanged(int)),
201 primaryDisplay(), SLOT(keyboardHeightChanged(int)));
202
203#if QT_CONFIG(qqnx_pps)
204 // Set up the input context
205 m_inputContext = new QQnxInputContext(this, *m_virtualKeyboard);
206#if QT_CONFIG(qqnx_imf)
207 m_screenEventHandler->addScreenEventFilter(m_inputContext);
208#endif
209#endif
210 }
211
212#if QT_CONFIG(qqnx_pps)
213 // delay invocation of start() to the time the event loop is up and running
214 // needed to have the QThread internals of the main thread properly initialized
215 QMetaObject::invokeMethod(m_buttonsNotifier, "start", Qt::QueuedConnection);
216#endif
217}
218
220{
221 qCDebug(lcQpaQnx) << "Platform plugin shutdown begin";
222 delete m_nativeInterface;
223
224#if QT_CONFIG(draganddrop)
225 // Destroy the drag object
226 delete m_drag;
227#endif
228
229#if !defined(QT_NO_CLIPBOARD)
230 // Delete the clipboard
231 delete m_clipboard;
232#endif
233
234 // Stop/destroy navigator event notifier
235#if QT_CONFIG(qqnx_pps)
236 delete m_navigatorEventNotifier;
237#endif
238 delete m_navigatorEventHandler;
239
240 // Stop/destroy screen event thread
241 delete m_screenEventThread;
242
243 // In case the event-dispatcher was never transferred to QCoreApplication
244 delete m_eventDispatcher;
245
246 delete m_screenEventHandler;
247
248 // Destroy all displays
249 destroyDisplays();
250
251 // Close connection to QNX composition manager
252 screen_destroy_context(m_screenContext);
253
254#if QT_CONFIG(opengl)
255 destroyEglDisplay();
256#endif
257
258#if QT_CONFIG(qqnx_pps)
259 // Destroy the hardware button notifier
260 delete m_buttonsNotifier;
261
262 // Destroy input context
263 delete m_inputContext;
264#endif
265 delete m_qpaInputContext;
266
267 // Destroy the keyboard class.
268 delete m_virtualKeyboard;
269
270 // Destroy services class
271 delete m_services;
272
273 // Destroy navigator interface
274 delete m_navigator;
275
276 ms_instance = nullptr;
277
278 qCDebug(lcQpaQnx) << "Platform plugin shutdown end";
279}
280
282{
283 qCDebug(lcQpaQnx) << Q_FUNC_INFO;
284 switch (cap) {
285 case MultipleWindows:
286 case ForeignWindows:
287 case ThreadedPixmaps:
288 return true;
289#if !defined(QT_NO_OPENGL)
290 case OpenGL:
291 case ThreadedOpenGL:
293 return true;
294#endif
295 default:
297 }
298}
299
301{
302 screen_window_t screenWindow = reinterpret_cast<screen_window_t>(nativeHandle);
303 if (this->window(screenWindow)) {
304 qWarning() << "QWindow already created for foreign window"
305 << screenWindow;
306 return nullptr;
307 }
308
309 return new QQnxForeignWindow(window, m_screenContext, screenWindow);
310}
311
313{
314 qCDebug(lcQpaQnx) << Q_FUNC_INFO;
315 QSurface::SurfaceType surfaceType = window->surfaceType();
316 const bool needRootWindow = options() & RootWindow;
317 switch (surfaceType) {
319 return new QQnxRasterWindow(window, m_screenContext, needRootWindow);
320#if !defined(QT_NO_OPENGL)
322 return new QQnxEglWindow(window, m_screenContext, needRootWindow);
323#endif
324 default:
325 qFatal("QQnxWindow: unsupported window API");
326 }
327 return 0;
328}
329
331{
332 QSurface::SurfaceType surfaceType = window->surfaceType();
333 qCDebug(lcQpaQnx) << Q_FUNC_INFO << surfaceType;
334 switch (surfaceType) {
336 return new QQnxRasterBackingStore(window);
337#if !defined(QT_NO_OPENGL)
338 // Return a QRhiBackingStore for non-raster surface windows
340 return new QRhiBackingStore(window);
341#endif
342 default:
343 return nullptr;
344 }
345}
346
347#if !defined(QT_NO_OPENGL)
349{
350 qCDebug(lcQpaQnx) << Q_FUNC_INFO;
351
352 // Get color channel sizes from window format
353 QSurfaceFormat format = context->format();
354 int alphaSize = format.alphaBufferSize();
355 int redSize = format.redBufferSize();
356 int greenSize = format.greenBufferSize();
357 int blueSize = format.blueBufferSize();
358
359 // Check if all channels are don't care
360 if (alphaSize == -1 && redSize == -1 && greenSize == -1 && blueSize == -1) {
361 // Set color channels based on depth of window's screen
362 QQnxScreen *screen = static_cast<QQnxScreen*>(context->screen()->handle());
363 int depth = screen->depth();
364 if (depth == 32) {
365 // SCREEN_FORMAT_RGBA8888
366 alphaSize = 8;
367 redSize = 8;
368 greenSize = 8;
369 blueSize = 8;
370 } else {
371 // SCREEN_FORMAT_RGB565
372 alphaSize = 0;
373 redSize = 5;
374 greenSize = 6;
375 blueSize = 5;
376 }
377 } else {
378 // Choose best match based on supported pixel formats
379 if (alphaSize <= 0 && redSize <= 5 && greenSize <= 6 && blueSize <= 5) {
380 // SCREEN_FORMAT_RGB565
381 alphaSize = 0;
382 redSize = 5;
383 greenSize = 6;
384 blueSize = 5;
385 } else {
386 // SCREEN_FORMAT_RGBA8888
387 alphaSize = 8;
388 redSize = 8;
389 greenSize = 8;
390 blueSize = 8;
391 }
392 }
393
394 // Update color channel sizes in window format
395 format.setAlphaBufferSize(alphaSize);
396 format.setRedBufferSize(redSize);
397 format.setGreenBufferSize(greenSize);
398 format.setBlueBufferSize(blueSize);
399 context->setFormat(format);
400
401 QQnxGLContext *ctx = new QQnxGLContext(context->format(), context->shareHandle());
402 return ctx;
403}
404#endif
405
406#if QT_CONFIG(qqnx_pps)
408{
409 qCDebug(lcQpaQnx) << Q_FUNC_INFO;
410 if (m_qpaInputContext)
411 return m_qpaInputContext;
412 return m_inputContext;
413}
414#endif
415
417{
418 qCDebug(lcQpaQnx) << Q_FUNC_INFO << "w =" << window << ", s =" << screen;
419
420 // get platform window used by widget
421 QQnxWindow *platformWindow = static_cast<QQnxWindow *>(window->handle());
422
423 // lookup platform screen by index
424 QQnxScreen *platformScreen = m_screens.at(screen);
425
426 // move the platform window to the platform screen
427 platformWindow->setScreen(platformScreen);
428}
429
431{
432 qCDebug(lcQpaQnx) << Q_FUNC_INFO;
433
434 // We transfer ownersip of the event-dispatcher to QtCoreApplication
435 QAbstractEventDispatcher *eventDispatcher = m_eventDispatcher;
436 m_eventDispatcher = 0;
437
438 return eventDispatcher;
439}
440
442{
443 return m_nativeInterface;
444}
445
446#if !defined(QT_NO_CLIPBOARD)
448{
449 qCDebug(lcQpaQnx) << Q_FUNC_INFO;
450
451#if QT_CONFIG(qqnx_pps)
452 if (!m_clipboard)
453 m_clipboard = new QQnxClipboard;
454#endif
455 return m_clipboard;
456}
457#endif
458
459#if QT_CONFIG(draganddrop)
460QPlatformDrag *QQnxIntegration::drag() const
461{
462 return m_drag;
463}
464#endif
465
474
476{
477 return m_services;
478}
479
480QWindow *QQnxIntegration::window(screen_window_t qnxWindow) const
481{
482 qCDebug(lcQpaQnx) << Q_FUNC_INFO;
483 QMutexLocker locker(&m_windowMapperMutex);
484 Q_UNUSED(locker);
485 return m_windowMapper.value(qnxWindow, 0);
486}
487
488void QQnxIntegration::addWindow(screen_window_t qnxWindow, QWindow *window)
489{
490 qCDebug(lcQpaQnx) << Q_FUNC_INFO;
491 QMutexLocker locker(&m_windowMapperMutex);
492 Q_UNUSED(locker);
493 m_windowMapper.insert(qnxWindow, window);
494}
495
496void QQnxIntegration::removeWindow(screen_window_t qnxWindow)
497{
498 qCDebug(lcQpaQnx) << Q_FUNC_INFO;
499 QMutexLocker locker(&m_windowMapperMutex);
500 Q_UNUSED(locker);
501 m_windowMapper.remove(qnxWindow);
502}
503
509static int getIdOfDisplay(screen_display_t display)
510{
511 int displayId;
512 if (screen_get_display_property_iv(display,
513 SCREEN_PROPERTY_ID,
514 &displayId) == 0) {
515 return displayId;
516 }
517 return -1;
518}
519
525static bool getRequestedDisplays(QJsonArray &requestedDisplays)
526{
527 // Check if display configuration file is provided
528 QByteArray json = qgetenv("QT_QPA_QNX_DISPLAY_CONFIG");
529 if (json.isEmpty())
530 return false;
531
532 // Check if configuration file exists
534 if (!file.open(QFile::ReadOnly)) {
535 qWarning() << "Could not open config file" << json << "for reading";
536 return false;
537 }
538
539 // Read config file and check it's json
541 if (!doc.isObject()) {
542 qWarning() << "Invalid config file" << json
543 << "- no top-level JSON object";
544 return false;
545 }
546
547 // Read the requested display order
548 const QJsonObject object = doc.object();
549 requestedDisplays = object.value("displayOrder"_L1).toArray();
550
551 return true;
552}
553
570QList<screen_display_t *> QQnxIntegration::sortDisplays(screen_display_t *availableDisplays, int displayCount)
571{
572 // Intermediate list for sorting
573 QList<screen_display_t *> allDisplays;
574 for (int i = 0; i < displayCount; i++)
575 allDisplays.append(&availableDisplays[i]);
576
577 // Read requested display order if available
578 QJsonArray requestedDisplays;
579 if (!getRequestedDisplays(requestedDisplays))
580 return allDisplays;
581
582 // Go through all the requested displays IDs
583 QList<screen_display_t *> orderedDisplays;
584 for (const QJsonValue &value : std::as_const(requestedDisplays)) {
585 int requestedValue = value.toInt();
586
587 // Move all displays with matching ID from the intermediate list
588 // to the beginning of the ordered list
589 for (auto it = allDisplays.begin(), end = allDisplays.end(); it != end; ++it) {
590 screen_display_t *display = *it;
591 if (getIdOfDisplay(*display) == requestedValue) {
592 orderedDisplays.append(display);
593 allDisplays.erase(it);
594 break;
595 }
596 }
597 }
598
599 // Place all unordered displays to the end of list
600 orderedDisplays.append(allDisplays);
601
602 return orderedDisplays;
603}
604
605void QQnxIntegration::createDisplays()
606{
607 qCDebug(lcQpaQnx) << Q_FUNC_INFO;
608 // Query number of displays
609 int displayCount = 0;
610 int result = screen_get_context_property_iv(m_screenContext, SCREEN_PROPERTY_DISPLAY_COUNT,
611 &displayCount);
612 Q_SCREEN_CRITICALERROR(result, "Failed to query display count");
613
614 if (Q_UNLIKELY(displayCount < 1)) {
615 // Never happens, even if there's no display, libscreen returns 1
616 qFatal("QQnxIntegration: displayCount=%d", displayCount);
617 }
618
619 // Get all displays
620 screen_display_t *displays = (screen_display_t *)alloca(sizeof(screen_display_t) * displayCount);
621 result = screen_get_context_property_pv(m_screenContext, SCREEN_PROPERTY_DISPLAYS,
622 (void **)displays);
623 QList<screen_display_t *> orderedDisplays = sortDisplays(displays, displayCount);
624 Q_SCREEN_CRITICALERROR(result, "Failed to query displays");
625
626 // If it's primary, we create a QScreen for it even if it's not attached
627 // since Qt will dereference QGuiApplication::primaryScreen()
628 createDisplay(*orderedDisplays[0], /*isPrimary=*/true);
629
630 for (int i=1; i<displayCount; i++) {
631 int isAttached = 1;
632 result = screen_get_display_property_iv(*orderedDisplays[i], SCREEN_PROPERTY_ATTACHED,
633 &isAttached);
634 Q_SCREEN_CHECKERROR(result, "Failed to query display attachment");
635
636 if (!isAttached) {
637 qCDebug(lcQpaQnx) << "Skipping non-attached display " << i;
638 continue;
639 }
640
641 qCDebug(lcQpaQnx) << "Creating screen for display " << i;
642
643 createDisplay(*orderedDisplays[i], /*isPrimary=*/false);
644 } // of displays iteration
645}
646
647void QQnxIntegration::createDisplay(screen_display_t display, bool isPrimary)
648{
649 QQnxScreen *screen = new QQnxScreen(m_screenContext, display, isPrimary);
650 m_screens.append(screen);
652 screen->adjustOrientation();
653
654 QObject::connect(m_screenEventHandler, SIGNAL(newWindowCreated(void*)),
655 screen, SLOT(newWindowCreated(void*)));
656 QObject::connect(m_screenEventHandler, SIGNAL(windowClosed(void*)),
657 screen, SLOT(windowClosed(void*)));
658
659 QObject::connect(m_navigatorEventHandler, SIGNAL(rotationChanged(int)), screen, SLOT(setRotation(int)));
660 QObject::connect(m_navigatorEventHandler, SIGNAL(windowGroupActivated(QByteArray)), screen, SLOT(activateWindowGroup(QByteArray)));
661 QObject::connect(m_navigatorEventHandler, SIGNAL(windowGroupDeactivated(QByteArray)), screen, SLOT(deactivateWindowGroup(QByteArray)));
662 QObject::connect(m_navigatorEventHandler, SIGNAL(windowGroupStateChanged(QByteArray,Qt::WindowState)),
663 screen, SLOT(windowGroupStateChanged(QByteArray,Qt::WindowState)));
664}
665
673
674void QQnxIntegration::destroyDisplays()
675{
676 qCDebug(lcQpaQnx) << Q_FUNC_INFO;
677
678 Q_FOREACH (QQnxScreen *screen, m_screens) {
680 }
681 m_screens.clear();
682}
683
684QQnxScreen *QQnxIntegration::screenForNative(screen_display_t qnxScreen) const
685{
686 Q_FOREACH (QQnxScreen *screen, m_screens) {
687 if (screen->nativeDisplay() == qnxScreen)
688 return screen;
689 }
690
691 return 0;
692}
693
695{
696 return m_screens.first();
697}
698
699QQnxIntegration::Options QQnxIntegration::options() const
700{
701 return m_options;
702}
703
705{
706 return m_screenContext;
707}
708
710{
711 return m_screenContextId;
712}
713
715{
716 return m_navigatorEventHandler;
717}
718
720{
721 // If QQNX_PPS is defined then we have navigator
722 return m_navigator != 0;
723}
724
725#if QT_CONFIG(opengl)
726void QQnxIntegration::createEglDisplay()
727{
728 qCDebug(lcQpaQnx) << Q_FUNC_INFO;
729
730 // Initialize connection to EGL
731 m_eglDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY);
732 if (Q_UNLIKELY(m_eglDisplay == EGL_NO_DISPLAY))
733 qFatal("QQnxiIntegration: failed to obtain EGL display: %x", eglGetError());
734
735 EGLBoolean eglResult = eglInitialize(m_eglDisplay, 0, 0);
736 if (Q_UNLIKELY(eglResult != EGL_TRUE))
737 qFatal("QQnxIntegration: failed to initialize EGL display, err=%d", eglGetError());
738}
739
740void QQnxIntegration::destroyEglDisplay()
741{
742 qCDebug(lcQpaQnx) << Q_FUNC_INFO;
743
744 // Close connection to EGL
745 eglTerminate(m_eglDisplay);
746}
747#endif
748
\inmodule QtCore
Definition qbytearray.h:57
char * data()
\macro QT_NO_CAST_FROM_BYTEARRAY
Definition qbytearray.h:611
qsizetype size() const noexcept
Returns the number of bytes in this byte array.
Definition qbytearray.h:494
const char * constData() const noexcept
Returns a pointer to the const data stored in the byte array.
Definition qbytearray.h:124
bool isEmpty() const noexcept
Returns true if the byte array has size 0; otherwise returns false.
Definition qbytearray.h:107
void resize(qsizetype size)
Sets the size of the byte array to size bytes.
\inmodule QtCore
Definition qfile.h:93
QFILE_MAYBE_NODISCARD bool open(OpenMode flags) override
Opens the file using OpenMode mode, returning true if successful; otherwise false.
Definition qfile.cpp:904
bool remove(const Key &key)
Removes the item that has the key from the hash.
Definition qhash.h:958
T value(const Key &key) const noexcept
Definition qhash.h:1054
iterator insert(const Key &key, const T &value)
Inserts a new item with the key and a value of value.
Definition qhash.h:1303
QByteArray readAll()
Reads all remaining data from the device, and returns it as a byte array.
\inmodule QtCore\reentrant
Definition qjsonarray.h:18
\inmodule QtCore\reentrant
QJsonObject object() const
Returns the QJsonObject contained in the document.
bool isObject() const
Returns true if the document contains an object.
static QJsonDocument fromJson(const QByteArray &json, QJsonParseError *error=nullptr)
Parses json as a UTF-8 encoded JSON document, and creates a QJsonDocument from it.
\inmodule QtCore\reentrant
Definition qjsonobject.h:20
QJsonValue value(const QString &key) const
Returns a QJsonValue representing the value for the key key.
\inmodule QtCore\reentrant
Definition qjsonvalue.h:25
QJsonArray toArray() const
This is an overloaded member function, provided for convenience. It differs from the above function o...
T & first()
Definition qlist.h:645
const_reference at(qsizetype i) const noexcept
Definition qlist.h:446
qsizetype removeAll(const AT &t)
Definition qlist.h:592
void append(parameter_type t)
Definition qlist.h:458
void clear()
Definition qlist.h:434
\inmodule QtCore
Definition qmutex.h:313
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
Definition qobject.cpp:2960
\inmodule QtGui
The QPlatformBackingStore class provides the drawing area for top-level windows.
The QPlatformClipboard class provides an abstraction for the system clipboard.
The QPlatformDrag class provides an abstraction for drag.
The QPlatformFontDatabase class makes it possible to customize how fonts are discovered and how they ...
static QPlatformInputContext * create()
The QPlatformInputContext class abstracts the input method dependent data and composing state.
The QPlatformIntegration class is the entry for WindowSystem specific functionality.
virtual QVariant styleHint(StyleHint hint) const
virtual bool hasCapability(Capability cap) const
virtual QPlatformOpenGLContext * createPlatformOpenGLContext(QOpenGLContext *context) const
Factory function for QPlatformOpenGLContext.
virtual QPlatformInputContext * inputContext() const
Returns the platforms input context.
Capability
Capabilities are used to determine specific features of a platform integration.
The QPlatformNativeInterface class provides an abstraction for retrieving native resource handles.
The QPlatformOpenGLContext class provides an abstraction for native GL contexts.
The QPlatformServices provides the backend for desktop-related functionality.
The QPlatformWindow class provides an abstraction for top-level windows.
QAbstractEventDispatcher * createEventDispatcher() const override
Factory function for the GUI event dispatcher.
bool hasCapability(QPlatformIntegration::Capability cap) const override
QQnxIntegration(const QStringList &paramList)
QPlatformNativeInterface * nativeInterface() const override
QQnxNavigatorEventHandler * navigatorEventHandler()
QPlatformBackingStore * createPlatformBackingStore(QWindow *window) const override
Factory function for QPlatformBackingStore.
QPlatformWindow * createPlatformWindow(QWindow *window) const override
Factory function for QPlatformWindow.
QPlatformWindow * createForeignWindow(QWindow *window, WId nativeHandle) const override
Options options() const
QQnxScreen * primaryDisplay() const
void removeDisplay(QQnxScreen *screen)
QVariant styleHint(StyleHint hint) const override
QPlatformServices * services() const override
void moveToScreen(QWindow *window, int screen)
QByteArray screenContextId()
QQnxScreen * screenForNative(screen_display_t qnxScreen) const
void createDisplay(screen_display_t display, bool isPrimary)
screen_context_t screenContext()
QWindow * window(screen_window_t qnxWindow) const
QPlatformClipboard * clipboard() const override
Accessor for the platform integration's clipboard.
bool supportsNavigatorEvents() const
void setScreenEventThread(QQnxScreenEventThread *eventThread)
void addScreenEventFilter(QQnxScreenEventFilter *filter)
The QQnxWindow is the base class of the various classes used as instances of QPlatformWindow in the Q...
Definition qqnxwindow.h:31
void setScreen(QQnxScreen *platformScreen)
int depth
the color depth of the screen
Definition qscreen.h:40
iterator begin()
Definition qset.h:136
iterator erase(const_iterator i)
Definition qset.h:145
QSimpleDrag implements QBasicDrag for Drag and Drop operations within the Qt Application itself.
\inmodule QtCore
\inmodule QtCore
Definition qstringview.h:78
constexpr QStringView mid(qsizetype pos, qsizetype n=-1) const noexcept
Returns the substring of length length starting at position start in this object.
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
static QString fromUtf8(QByteArrayView utf8)
This is an overloaded member function, provided for convenience. It differs from the above function o...
Definition qstring.cpp:6018
The QSurfaceFormat class represents the format of a QSurface. \inmodule QtGui.
SurfaceType
The SurfaceType enum describes what type of surface this is.
Definition qsurface.h:30
@ RasterSurface
Definition qsurface.h:31
@ OpenGLSurface
Definition qsurface.h:32
void start(Priority=InheritPriority)
Definition qthread.cpp:996
\inmodule QtCore
Definition qvariant.h:65
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
EGLContext ctx
#define this
Definition dialogs.cpp:9
QSet< QString >::iterator it
struct wl_display * display
Definition linuxdmabuf.h:41
Combined button and popup list for selecting options.
WindowState
Definition qnamespace.h:251
@ QueuedConnection
static void * context
#define Q_UNLIKELY(x)
#define Q_FUNC_INFO
typedef EGLBoolean(EGLAPIENTRYP PFNEGLQUERYDEVICESEXTPROC)(EGLint max_devices
EGLOutputLayerEXT EGLint EGLAttrib value
[5]
#define Q_FOREACH(variable, container)
Definition qforeach.h:66
#define qWarning
Definition qlogging.h:166
#define qFatal
Definition qlogging.h:168
#define qCDebug(category,...)
#define SLOT(a)
Definition qobjectdefs.h:52
#define SIGNAL(a)
Definition qobjectdefs.h:53
GLint GLenum GLsizei GLsizei GLsizei depth
GLuint GLuint end
GLenum const GLint * param
GLint GLsizei GLsizei GLenum format
GLuint64EXT * result
[6]
GLenum cap
#define Q_SCREEN_CRITICALERROR(x, message)
Definition qqnxglobal.h:16
#define Q_SCREEN_CHECKERROR(x, message)
Definition qqnxglobal.h:13
static bool getRequestedDisplays(QJsonArray &requestedDisplays)
Read JSON configuration file for the QNX display order.
static int getIdOfDisplay(screen_display_t display)
Get display ID for given display.
static int getContextCapabilities(const QStringList &paramList)
#define Q_ASSERT(cond)
Definition qrandom.cpp:47
static QT_BEGIN_NAMESPACE QVariant hint(QPlatformIntegration::StyleHint h)
Options parseOptions()
Definition main.cpp:369
QScreen * screen
[1]
Definition main.cpp:29
#define QT_CONFIG(feature)
Q_CORE_EXPORT QByteArray qgetenv(const char *varName)
#define Q_UNUSED(x)
Q_CHECK_PTR(a=new int[80])
if(qFloatDistance(a, b)<(1<< 7))
[0]
QFile file
[0]
aWidget window() -> setWindowTitle("New Window Title")
[2]
bool contains(const AT &t) const noexcept
Definition qlist.h:45
static bool invokeMethod(QObject *obj, const char *member, Qt::ConnectionType, QGenericReturnArgument ret, QGenericArgument val0=QGenericArgument(nullptr), QGenericArgument val1=QGenericArgument(), QGenericArgument val2=QGenericArgument(), QGenericArgument val3=QGenericArgument(), QGenericArgument val4=QGenericArgument(), QGenericArgument val5=QGenericArgument(), QGenericArgument val6=QGenericArgument(), QGenericArgument val7=QGenericArgument(), QGenericArgument val8=QGenericArgument(), QGenericArgument val9=QGenericArgument())
\threadsafe This is an overloaded member function, provided for convenience. It differs from the abov...