Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qandroidplatformscreen.cpp
Go to the documentation of this file.
1// Copyright (C) 2014 BogDan Vatra <bogdan@kde.org>
2// Copyright (C) 2016 The Qt Company Ltd.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5#include <QDebug>
6#include <QTime>
7
8#include <qpa/qwindowsysteminterface.h>
9
14#include "androidjnimain.h"
15#include "androidjnimenu.h"
17
18#include <android/bitmap.h>
19#include <android/native_window_jni.h>
20#include <qguiapplication.h>
21
22#include <QtCore/QJniObject>
23#include <QtCore/QJniEnvironment>
24#include <QtGui/QGuiApplication>
25#include <QtGui/QWindow>
26#include <QtGui/private/qwindow_p.h>
27#include <vector>
28
30
31#ifdef QANDROIDPLATFORMSCREEN_DEBUG
32class ScopedProfiler
33{
34public:
35 ScopedProfiler(const QString &msg)
36 {
37 m_msg = msg;
38 m_timer.start();
39 }
40 ~ScopedProfiler()
41 {
42 qDebug() << m_msg << m_timer.elapsed();
43 }
44
45private:
46 QTime m_timer;
47 QString m_msg;
48};
49
50# define PROFILE_SCOPE ScopedProfiler ___sp___(__func__)
51#else
52# define PROFILE_SCOPE
53#endif
54
55Q_DECLARE_JNI_CLASS(Display, "android/view/Display")
56Q_DECLARE_JNI_CLASS(DisplayMetrics, "android/util/DisplayMetrics")
57Q_DECLARE_JNI_CLASS(Resources, "android/content/res/Resources")
58Q_DECLARE_JNI_CLASS(Size, "android/util/Size")
59Q_DECLARE_JNI_CLASS(QtNative, "org/qtproject/qt/android/QtNative")
60
61Q_DECLARE_JNI_TYPE(DisplayMode, "Landroid/view/Display$Mode;")
62
65{
66 m_availableGeometry = QAndroidPlatformIntegration::m_defaultAvailableGeometry;
67 m_size = QAndroidPlatformIntegration::m_defaultScreenSize;
68 m_physicalSize = QAndroidPlatformIntegration::m_defaultPhysicalSize;
69
70 // Raster only apps should set QT_ANDROID_RASTER_IMAGE_DEPTH to 16
71 // is way much faster than 32
72 if (qEnvironmentVariableIntValue("QT_ANDROID_RASTER_IMAGE_DEPTH") == 16) {
73 m_format = QImage::Format_RGB16;
74 m_depth = 16;
75 } else {
77 m_depth = 32;
78 }
79
81 &QAndroidPlatformScreen::applicationStateChanged);
82
83 if (!displayObject.isValid())
84 return;
85
86 m_name = displayObject.callObjectMethod<jstring>("getName").toString();
87 m_refreshRate = displayObject.callMethod<jfloat>("getRefreshRate");
88 m_displayId = displayObject.callMethod<jint>("getDisplayId");
89
90 const QJniObject context = QNativeInterface::QAndroidApplication::context();
91 const auto displayContext = context.callMethod<QtJniTypes::Context>("createDisplayContext",
92 displayObject.object<QtJniTypes::Display>());
93
94 const auto sizeObj = QJniObject::callStaticMethod<QtJniTypes::Size>(
95 QtJniTypes::className<QtJniTypes::QtNative>(),
96 "getDisplaySize",
97 displayContext.object<QtJniTypes::Context>(),
98 displayObject.object<QtJniTypes::Display>());
99 m_size = QSize(sizeObj.callMethod<int>("getWidth"), sizeObj.callMethod<int>("getHeight"));
100
101 const auto resources = displayContext.callMethod<QtJniTypes::Resources>("getResources");
102 const auto metrics = resources.callMethod<QtJniTypes::DisplayMetrics>("getDisplayMetrics");
103 const float xdpi = metrics.getField<float>("xdpi");
104 const float ydpi = metrics.getField<float>("ydpi");
105
106 // Potentially densityDpi could be used instead of xpdi/ydpi to do the calculation,
107 // but the results are not consistent with devices specs.
108 // (https://issuetracker.google.com/issues/194120500)
109 m_physicalSize.setWidth(qRound(m_size.width() / xdpi * 25.4));
110 m_physicalSize.setHeight(qRound(m_size.height() / ydpi * 25.4));
111
112 if (QNativeInterface::QAndroidApplication::sdkVersion() >= 23) {
113 const QJniObject currentMode = displayObject.callObjectMethod<QtJniTypes::DisplayMode>("getMode");
114 m_currentMode = currentMode.callMethod<jint>("getModeId");
115
116 const QJniObject supportedModes = displayObject.callObjectMethod<QtJniTypes::DisplayMode[]>(
117 "getSupportedModes");
118 const auto modeArray = jobjectArray(supportedModes.object());
119
120 QJniEnvironment env;
121 const auto size = env->GetArrayLength(modeArray);
122 for (jsize i = 0; i < size; ++i) {
123 const auto mode = QJniObject::fromLocalRef(env->GetObjectArrayElement(modeArray, i));
124 m_modes << QPlatformScreen::Mode {
125 .size = QSize { mode.callMethod<jint>("getPhysicalWidth"),
126 mode.callMethod<jint>("getPhysicalHeight") },
127 .refreshRate = mode.callMethod<jfloat>("getRefreshRate")
128 };
129 }
130 }
131}
132
134{
135 if (m_surfaceId != -1) {
136 QtAndroid::destroySurface(m_surfaceId);
137 m_surfaceWaitCondition.wakeOne();
138 releaseSurface();
139 }
140}
141
143{
145 if (w->window()->type() == Qt::Window ||
146 w->window()->type() == Qt::Popup ||
147 w->window()->type() == Qt::Dialog) {
148 return w->window();
149 }
150 }
151 return 0;
152}
153
155{
157 if (w->geometry().contains(p, false) && w->window()->isVisible())
158 return w->window();
159 }
160 return 0;
161}
162
164{
165 if (event->type() == QEvent::UpdateRequest) {
166 doRedraw();
167 m_updatePending = false;
168 return true;
169 }
170 return QObject::event(event);
171}
172
174{
175 if (window->parent() && window->isRaster())
176 return;
177
179 return;
180
182 if (window->isRaster()) {
183 m_rasterSurfaces.ref();
184 setDirty(window->geometry());
185 }
186
187 QWindow *w = topWindow();
190}
191
193{
194 if (window->parent() && window->isRaster())
195 return;
196
198
200 qWarning() << "Failed to remove window";
201
202 if (window->isRaster()) {
203 m_rasterSurfaces.deref();
204 setDirty(window->geometry());
205 }
206
207 QWindow *w = topWindow();
210}
211
213{
214 if (window->parent() && window->isRaster())
215 return;
216
218 if (index <= 0)
219 return;
221 if (window->isRaster()) {
222 setDirty(window->geometry());
223 }
224 QWindow *w = topWindow();
227}
228
230{
231 if (window->parent() && window->isRaster())
232 return;
233
235 if (index == -1 || index == (m_windowStack.size() - 1))
236 return;
238 if (window->isRaster()) {
239 setDirty(window->geometry());
240 }
241 QWindow *w = topWindow();
244}
245
247{
248 if (!m_updatePending) {
249 m_updatePending = true;
251 }
252}
253
255{
256 QRect intersection = rect.intersected(m_availableGeometry);
257 m_dirtyRect |= intersection;
259}
260
262{
264}
265
267{
268 m_size = size;
270}
271
273 const QRect &availableGeometry)
274{
275 // The goal of this method is to set all geometry-related parameters
276 // at the same time and generate only one screen geometry change event.
278 m_size = size;
279 // If available geometry has changed, the event will be handled in
280 // setAvailableGeometry. Otherwise we need to explicitly handle it to
281 // retain the behavior, because setSize() does the handling unconditionally.
284 } else {
286 this->availableGeometry());
287 }
288}
289
291{
292 return m_displayId;
293}
294
296{
298 return;
301}
302
304{
306}
307
309{
312 return;
313
314 QRect oldGeometry = m_availableGeometry;
315
319
320 if (oldGeometry.width() == 0 && oldGeometry.height() == 0 && rect.width() > 0 && rect.height() > 0) {
322 for (int i = 0; i < windows.size(); ++i) {
323 QWindow *w = windows.at(i);
324 if (w->handle()) {
325 QRect geometry = w->handle()->geometry();
326 if (geometry.width() > 0 && geometry.height() > 0)
328 }
329 }
330 }
331
332 if (m_surfaceId != -1) {
333 releaseSurface();
335 }
336}
337
338void QAndroidPlatformScreen::applicationStateChanged(Qt::ApplicationState state)
339{
340 for (QAndroidPlatformWindow *w : std::as_const(m_windowStack))
341 w->applicationStateChanged(state);
342
344 lockSurface();
345 QtAndroid::destroySurface(m_surfaceId);
346 m_surfaceId = -1;
347 releaseSurface();
349 }
350}
351
353{
355
356 if (w != 0) {
357 QAndroidPlatformWindow *platformWindow = static_cast<QAndroidPlatformWindow *>(w->handle());
358 if (platformWindow != 0)
359 platformWindow->updateSystemUiVisibility();
360 }
361}
362
364{
365 return m_rasterSurfaces;
366}
367
368void QAndroidPlatformScreen::doRedraw(QImage* screenGrabImage)
369{
371 if (!QtAndroid::activity())
372 return;
373
374 if (m_dirtyRect.isEmpty())
375 return;
376
377 // Stop if there are no visible raster windows. If we only have RasterGLSurface
378 // windows that have renderToTexture children (i.e. they need the OpenGL path) then
379 // we do not need an overlay surface.
380 bool hasVisibleRasterWindows = false;
381 for (QAndroidPlatformWindow *window : std::as_const(m_windowStack)) {
382 if (window->window()->isVisible() && window->isRaster() && !qt_window_private(window->window())->compositing) {
383 hasVisibleRasterWindows = true;
384 break;
385 }
386 }
387 if (!hasVisibleRasterWindows) {
388 lockSurface();
389 if (m_surfaceId != -1) {
390 QtAndroid::destroySurface(m_surfaceId);
391 releaseSurface();
392 m_surfaceId = -1;
393 }
395 return;
396 }
398 if (m_surfaceId == -1 && m_rasterSurfaces) {
399 m_surfaceId = QtAndroid::createSurface(this, geometry(), true, m_depth);
400 AndroidDeadlockProtector protector;
401 if (!protector.acquire())
402 return;
403 m_surfaceWaitCondition.wait(&m_surfaceMutex);
404 }
405
406 if (!m_nativeSurface)
407 return;
408
409 ANativeWindow_Buffer nativeWindowBuffer;
410 ARect nativeWindowRect;
411 nativeWindowRect.top = m_dirtyRect.top();
412 nativeWindowRect.left = m_dirtyRect.left();
413 nativeWindowRect.bottom = m_dirtyRect.bottom() + 1; // for some reason that I don't understand the QRect bottom needs to +1 to be the same with ARect bottom
414 nativeWindowRect.right = m_dirtyRect.right() + 1; // same for the right
415
416 int ret;
417 if ((ret = ANativeWindow_lock(m_nativeSurface, &nativeWindowBuffer, &nativeWindowRect)) < 0) {
418 qWarning() << "ANativeWindow_lock() failed! error=" << ret;
419 return;
420 }
421
422 int bpp = 4;
423 if (nativeWindowBuffer.format == WINDOW_FORMAT_RGB_565) {
424 bpp = 2;
425 m_pixelFormat = QImage::Format_RGB16;
426 }
427
428 QImage screenImage(reinterpret_cast<uchar *>(nativeWindowBuffer.bits)
429 , nativeWindowBuffer.width, nativeWindowBuffer.height
430 , nativeWindowBuffer.stride * bpp , m_pixelFormat);
431
432 QPainter compositePainter(&screenImage);
433 compositePainter.setCompositionMode(QPainter::CompositionMode_Source);
434
435 QRegion visibleRegion(m_dirtyRect);
436 for (QAndroidPlatformWindow *window : std::as_const(m_windowStack)) {
437 if (!window->window()->isVisible()
439 || !window->isRaster())
440 continue;
441
442 for (const QRect &rect : std::vector<QRect>(visibleRegion.begin(), visibleRegion.end())) {
443 QRect targetRect = window->geometry();
444 targetRect &= rect;
445
446 if (targetRect.isNull())
447 continue;
448
449 visibleRegion -= targetRect;
450 QRect windowRect = targetRect.translated(-window->geometry().topLeft());
451 QAndroidPlatformBackingStore *backingStore = static_cast<QAndroidPlatformWindow *>(window)->backingStore();
452 if (backingStore)
453 compositePainter.drawImage(targetRect.topLeft(), backingStore->toImage(), windowRect);
454 }
455 }
456
457 for (const QRect &rect : visibleRegion)
458 compositePainter.fillRect(rect, QColor(Qt::transparent));
459
460 ret = ANativeWindow_unlockAndPost(m_nativeSurface);
461 if (ret >= 0)
462 m_dirtyRect = QRect();
463
464 if (screenGrabImage) {
465 if (screenGrabImage->size() != screenImage.size()) {
466 uchar* bytes = static_cast<uchar*>(malloc(screenImage.height() * screenImage.bytesPerLine()));
467 *screenGrabImage = QImage(bytes, screenImage.width(), screenImage.height(),
468 screenImage.bytesPerLine(), m_pixelFormat,
469 [](void* ptr){ if (ptr) free (ptr);});
470 }
471 memcpy(screenGrabImage->bits(),
472 screenImage.bits(),
473 screenImage.bytesPerLine() * screenImage.height());
474 }
475 m_repaintOccurred = true;
476}
477
478QPixmap QAndroidPlatformScreen::doScreenShot(QRect grabRect)
479{
480 if (!m_repaintOccurred)
481 return QPixmap::fromImage(m_lastScreenshot.copy(grabRect));
482 QRect tmp = m_dirtyRect;
484 doRedraw(&m_lastScreenshot);
485 m_dirtyRect = tmp;
486 m_repaintOccurred = false;
487 return QPixmap::fromImage(m_lastScreenshot.copy(grabRect));
488}
489
490static const int androidLogicalDpi = 72;
491
493{
495 return QDpi(lDpi, lDpi);
496}
497
499{
501}
502
504{
505 return QAndroidPlatformIntegration::m_orientation;
506}
507
509{
510 return QAndroidPlatformIntegration::m_nativeOrientation;
511}
512
513void QAndroidPlatformScreen::surfaceChanged(JNIEnv *env, jobject surface, int w, int h)
514{
515 lockSurface();
516 if (surface && w > 0 && h > 0) {
517 releaseSurface();
518 m_nativeSurface = ANativeWindow_fromSurface(env, surface);
519 QMetaObject::invokeMethod(this, "setDirty", Qt::QueuedConnection, Q_ARG(QRect, QRect(0, 0, w, h)));
520 } else {
521 releaseSurface();
522 }
524 m_surfaceWaitCondition.wakeOne();
525}
526
527void QAndroidPlatformScreen::releaseSurface()
528{
529 if (m_nativeSurface) {
530 ANativeWindow_release(m_nativeSurface);
531 m_nativeSurface = 0;
532 }
533}
534
542{
543 QRectF screenshotRect(x, y, width, height);
544 QWindow* wnd = 0;
545 if (window)
546 {
547 const auto windowList = qApp->allWindows();
548 for (QWindow *w : windowList)
549 if (w->winId() == window) {
550 wnd = w;
551 break;
552 }
553 }
554 if (wnd) {
555 const qreal factor = logicalDpi().first / androidLogicalDpi; //HighDPI factor;
556 QRectF wndRect = wnd->geometry();
557 if (wnd->parent())
558 wndRect.moveTopLeft(wnd->parent()->mapToGlobal(wndRect.topLeft().toPoint()));
559 if (!qFuzzyCompare(factor, 1))
560 wndRect = QRectF(wndRect.left() * factor, wndRect.top() * factor,
561 wndRect.width() * factor, wndRect.height() * factor);
562
563 if (!screenshotRect.isEmpty()) {
564 screenshotRect.moveTopLeft(wndRect.topLeft() + screenshotRect.topLeft());
565 screenshotRect = screenshotRect.intersected(wndRect);
566 } else {
567 screenshotRect = wndRect;
568 }
569 } else {
570 screenshotRect = screenshotRect.isValid() ? screenshotRect : geometry();
571 }
572 return const_cast<QAndroidPlatformScreen *>(this)->doScreenShot(screenshotRect.toRect());
573}
574
QImage toImage() const override
Implemented in subclasses to return the content of the backingstore as a QImage.
void setDirty(const QRect &rect)
Qt::ScreenOrientation orientation() const override
Reimplement this function in subclass to return the current orientation of the screen,...
QSizeF physicalSize() const override
Reimplement this function in subclass to return the physical size of the screen, in millimeters.
void lower(QAndroidPlatformWindow *window)
QWindow * topLevelAt(const QPoint &p) const override
Return the given top level window for a given position.
void setSizeParameters(const QSize &physicalSize, const QSize &size, const QRect &availableGeometry)
QDpi logicalBaseDpi() const override
Reimplement to return the base logical DPI for the platform.
QDpi logicalDpi() const override
Reimplement this function in subclass to return the logical horizontal and vertical dots per inch met...
QRect geometry() const override
Reimplement in subclass to return the pixel geometry of the screen.
void raise(QAndroidPlatformWindow *window)
void setPhysicalSize(const QSize &size)
void setAvailableGeometry(const QRect &rect)
void setOrientation(Qt::ScreenOrientation orientation)
QRect availableGeometry() const override
Reimplement in subclass to return the pixel geometry of the available space This normally is the desk...
bool event(QEvent *event) override
This virtual function receives events to an object and should return true if the event e was recogniz...
QPixmap grabWindow(WId window, int x, int y, int width, int height) const override
This function is called when Qt needs to be able to grab the content of a window.
void removeWindow(QAndroidPlatformWindow *window)
Qt::ScreenOrientation nativeOrientation() const override
Reimplement this function in subclass to return the native orientation of the screen,...
void setSize(const QSize &size)
void setRefreshRate(qreal refreshRate)
void surfaceChanged(JNIEnv *env, jobject surface, int w, int h) override
qreal refreshRate() const override
Reimplement this function in subclass to return the vertical refresh rate of the screen,...
void addWindow(QAndroidPlatformWindow *window)
bool ref() noexcept
bool deref() noexcept
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition qcolor.h:31
static void postEvent(QObject *receiver, QEvent *event, int priority=Qt::NormalEventPriority)
\inmodule QtCore
Definition qcoreevent.h:45
@ UpdateRequest
Definition qcoreevent.h:113
static QWindowList allWindows()
Returns a list of all the windows in the application.
void applicationStateChanged(Qt::ApplicationState state)
\inmodule QtGui
Definition qimage.h:37
QImage copy(const QRect &rect=QRect()) const
Returns a sub-area of the image as a new image.
QSize size() const
Returns the size of the image, i.e.
uchar * bits()
Returns a pointer to the first pixel data.
Definition qimage.cpp:1677
@ Format_ARGB32_Premultiplied
Definition qimage.h:48
@ Format_RGB16
Definition qimage.h:49
\inmodule QtCore
\inmodule QtCore
Definition qlist.h:74
qsizetype size() const noexcept
Definition qlist.h:386
bool removeOne(const AT &t)
Definition qlist.h:581
const_reference at(qsizetype i) const noexcept
Definition qlist.h:429
void move(qsizetype from, qsizetype to)
Definition qlist.h:593
void prepend(rvalue_ref t)
Definition qlist.h:456
\inmodule QtCore
Definition qmutex.h:317
\inmodule QtCore
Definition qobject.h:90
virtual bool event(QEvent *event)
This virtual function receives events to an object and should return true if the event e was recogniz...
Definition qobject.cpp:1363
The QPainter class performs low-level painting on widgets and other paint devices.
Definition qpainter.h:46
@ CompositionMode_Source
Definition qpainter.h:101
Returns a copy of the pixmap that is transformed using the given transformation transform and transfo...
Definition qpixmap.h:27
static QPixmap fromImage(const QImage &image, Qt::ImageConversionFlags flags=Qt::AutoColor)
Converts the given image to a pixmap using the specified flags to control the conversion.
Definition qpixmap.cpp:1445
The QPlatformScreen class provides an abstraction for visual displays.
QScreen * screen() const
void resizeMaximizedWindows()
Convenience method to resize all the maximized and fullscreen windows of this platform screen.
QWindowList windows() const
Return all windows residing on this screen.
constexpr QPoint toPoint() const
Rounds the coordinates of this point to the nearest integer, and returns a QPoint object with the rou...
Definition qpoint.h:394
\inmodule QtCore\reentrant
Definition qpoint.h:23
\inmodule QtCore\reentrant
Definition qrect.h:483
constexpr bool isEmpty() const noexcept
Returns true if the rectangle is empty, otherwise returns false.
Definition qrect.h:647
constexpr qreal height() const noexcept
Returns the height of the rectangle.
Definition qrect.h:718
constexpr qreal width() const noexcept
Returns the width of the rectangle.
Definition qrect.h:715
constexpr void moveTopLeft(const QPointF &p) noexcept
Moves the rectangle, leaving the top-left corner at the given position.
Definition qrect.h:700
constexpr qreal left() const noexcept
Returns the x-coordinate of the rectangle's left edge.
Definition qrect.h:496
constexpr QPointF topLeft() const noexcept
Returns the position of the rectangle's top-left corner.
Definition qrect.h:510
constexpr QRect toRect() const noexcept
Returns a QRect based on the values of this rectangle.
Definition qrect.h:845
constexpr qreal top() const noexcept
Returns the y-coordinate of the rectangle's top edge.
Definition qrect.h:497
constexpr bool isValid() const noexcept
Returns true if the rectangle is valid, otherwise returns false.
Definition qrect.h:652
QRectF intersected(const QRectF &other) const noexcept
Definition qrect.h:833
\inmodule QtCore\reentrant
Definition qrect.h:30
constexpr bool isEmpty() const noexcept
Returns true if the rectangle is empty, otherwise returns false.
Definition qrect.h:166
constexpr int height() const noexcept
Returns the height of the rectangle.
Definition qrect.h:238
constexpr bool isNull() const noexcept
Returns true if the rectangle is a null rectangle, otherwise returns false.
Definition qrect.h:163
constexpr int bottom() const noexcept
Returns the y-coordinate of the rectangle's bottom edge.
Definition qrect.h:181
constexpr QPoint topLeft() const noexcept
Returns the position of the rectangle's top-left corner.
Definition qrect.h:220
constexpr int top() const noexcept
Returns the y-coordinate of the rectangle's top edge.
Definition qrect.h:175
constexpr int left() const noexcept
Returns the x-coordinate of the rectangle's left edge.
Definition qrect.h:172
constexpr QSize size() const noexcept
Returns the size of the rectangle.
Definition qrect.h:241
constexpr int width() const noexcept
Returns the width of the rectangle.
Definition qrect.h:235
constexpr QRect translated(int dx, int dy) const noexcept
Returns a copy of the rectangle that is translated dx along the x axis and dy along the y axis,...
Definition qrect.h:260
constexpr int right() const noexcept
Returns the x-coordinate of the rectangle's right edge.
Definition qrect.h:178
The QRegion class specifies a clip region for a painter.
Definition qregion.h:27
\inmodule QtCore
Definition qsize.h:25
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
\inmodule QtCore \reentrant
Definition qdatetime.h:189
bool wait(QMutex *, QDeadlineTimer=QDeadlineTimer(QDeadlineTimer::Forever))
static void handleScreenGeometryChange(QScreen *screen, const QRect &newGeometry, const QRect &newAvailableGeometry)
static bool handleExposeEvent(QWindow *window, const QRegion &region)
static void handleWindowActivated(QWindow *window, Qt::FocusReason r=Qt::OtherFocusReason)
static void handleScreenOrientationChange(QScreen *screen, Qt::ScreenOrientation newOrientation)
static void handleScreenRefreshRateChange(QScreen *screen, qreal newRefreshRate)
\inmodule QtGui
Definition qwindow.h:63
rect
[4]
else opt state
[0]
Combined button and popup list for selecting options.
void setActiveTopLevelWindow(QWindow *window)
void destroySurface(int surfaceId)
void setSurfaceGeometry(int surfaceId, const QRect &geometry)
double pixelDensity()
int createSurface(AndroidSurfaceClient *client, const QRect &geometry, bool onTop, int imageDepth)
QtJniTypes::Activity activity()
ScreenOrientation
Definition qnamespace.h:270
@ transparent
Definition qnamespace.h:46
ApplicationState
Definition qnamespace.h:261
@ ApplicationHidden
Definition qnamespace.h:263
@ QueuedConnection
@ Popup
Definition qnamespace.h:210
@ Window
Definition qnamespace.h:206
@ Dialog
Definition qnamespace.h:207
@ ActiveWindowFocusReason
QRectF fillRect(QRect rect, int background)
static void * context
static const int androidLogicalDpi
#define PROFILE_SCOPE
#define qApp
bool qFuzzyCompare(qfloat16 p1, qfloat16 p2) noexcept
Definition qfloat16.h:287
int qRound(qfloat16 d) noexcept
Definition qfloat16.h:281
#define qGuiApp
QPair< qreal, qreal > QDpi
#define Size(name)
#define qDebug
[1]
Definition qlogging.h:160
#define qWarning
Definition qlogging.h:162
return ret
static ControlElement< T > * ptr(QWidget *widget)
#define Q_ARG(Type, data)
Definition qobjectdefs.h:62
GLint GLint GLint GLint GLint x
[0]
GLenum mode
GLfloat GLfloat GLfloat w
[0]
GLint GLsizei GLsizei height
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLuint index
[2]
GLuint GLuint end
GLsizei GLenum const void GLuint GLsizei GLfloat * metrics
GLint GLsizei width
GLint y
GLfloat GLfloat GLfloat GLfloat h
struct _cl_event * event
GLuint res
GLfloat GLfloat p
[1]
QtPrivate::QRegularExpressionMatchIteratorRangeBasedForIterator begin(const QRegularExpressionMatchIterator &iterator)
QT_BEGIN_NAMESPACE Q_DECLARE_JNI_CLASS(Environment, "android/os/Environment")
Q_DECLARE_JNI_TYPE(File, "Ljava/io/File;")
Q_CORE_EXPORT int qEnvironmentVariableIntValue(const char *varName, bool *ok=nullptr) noexcept
struct _XDisplay Display
unsigned char uchar
Definition qtypes.h:27
double qreal
Definition qtypes.h:92
Q_GUI_EXPORT QWindowPrivate * qt_window_private(QWindow *window)
Definition qwindow.cpp:2864
QList< int > vector
[14]
connect(quitButton, &QPushButton::clicked, &app, &QCoreApplication::quit, Qt::QueuedConnection)
QReadWriteLock lock
[0]
aWidget window() -> setWindowTitle("New Window Title")
[2]
QQuickView * view
[0]
char * toString(const MyType &t)
[31]
qsizetype indexOf(const AT &t, qsizetype from=0) const noexcept
Definition qlist.h:955
bool contains(const AT &t) const noexcept
Definition qlist.h:44
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...