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
qappleiconengine.mm
Go to the documentation of this file.
1// Copyright (C) 2023 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
5
6#if defined(Q_OS_MACOS)
7# include <AppKit/AppKit.h>
8#elif defined(QT_PLATFORM_UIKIT)
9# include <UIKit/UIKit.h>
10#endif
11
12#include <QtGui/qguiapplication.h>
13#include <QtGui/qpainter.h>
14#include <QtGui/qpalette.h>
15#include <QtGui/qstylehints.h>
16
17#include <QtGui/private/qcoregraphics_p.h>
18
20
21using namespace Qt::StringLiterals;
22
23namespace {
24auto *loadImage(const QString &iconName)
25{
26 static constexpr std::pair<QLatin1StringView, NSString *> iconMap[] = {
27 {"address-book-new"_L1, @"book.closed"},
28 {"application-exit"_L1, @"xmark.circle"},
29 {"appointment-new"_L1, @"calendar.badge.plus"},
30 {"call-start"_L1, @"phone.arrow.up.right"},
31 {"call-stop"_L1, @"phone.down"},
32 {"contact-new"_L1, @"person.crop.circle.badge.plus"},
33 {"document-new"_L1, @"doc.badge.plus"},
34 {"document-open"_L1, @"folder"},
35 {"document-open-recent"_L1, @"doc.badge.clock"},
36 {"document-page-setup"_L1, @"doc.badge.gearshape"},
37 {"document-print"_L1, @"printer"},
38 //{"document-print-preview"_L1, @""},
39 {"document-properties"_L1, @"doc.badge.ellipsis"},
40 //{"document-revert"_L1, @""},
41 {"document-save"_L1, @"square.and.arrow.down"},
42 //{"document-save-as"_L1, @""},
43 {"document-send"_L1, @"paperplane"},
44 {"edit-clear"_L1, @"xmark.circle"},
45 {"edit-copy"_L1, @"doc.on.doc"},
46 {"edit-cut"_L1, @"scissors"},
47 {"edit-delete"_L1, @"delete.left"},
48 {"edit-find"_L1, @"magnifyingglass"},
49 //{"edit-find-replace"_L1, @"arrow.up.left.and.down.right.magnifyingglass"},
50 {"edit-paste"_L1, @"clipboard"},
51 {"edit-redo"_L1, @"arrowshape.turn.up.right"},
52 //{"edit-select-all"_L1, @""},
53 {"edit-undo"_L1, @"arrowshape.turn.up.left"},
54 {"folder-new"_L1, @"folder.badge.plus"},
55 {"format-indent-less"_L1, @"decrease.indent"},
56 {"format-indent-more"_L1, @"increase.indent"},
57 {"format-justify-center"_L1, @"text.aligncenter"},
58 {"format-justify-fill"_L1, @"text.justify"},
59 {"format-justify-left"_L1, @"text.justify.left"},
60 {"format-justify-right"_L1, @"text.justify.right"},
61 {"format-text-direction-ltr"_L1, @"text.justify.leading"},
62 {"format-text-direction-rtl"_L1, @"text.justify.trailing"},
63 {"format-text-bold"_L1, @"bold"},
64 {"format-text-italic"_L1, @"italic"},
65 {"format-text-underline"_L1, @"underline"},
66 {"format-text-strikethrough"_L1, @"strikethrough"},
67 //{"go-bottom"_L1, @""},
68 {"go-down"_L1, @"arrowshape.down"},
69 {"go-first"_L1, @"increase.indent"},
70 {"go-home"_L1, @"house"},
71 //{"go-jump"_L1, @""},
72 //{"go-last"_L1, @""},
73 {"go-next"_L1, @"arrowshape.right"},
74 {"go-previous"_L1, @"arrowshape.left"},
75 //{"go-top"_L1, @""},
76 {"go-up"_L1, @"arrowshape.up"},
77 {"help-about"_L1, @"info.circle"},
78 //{"help-contents"_L1, @""},
79 {"help-faq"_L1, @"questionmark.app"},
80 {"insert-image"_L1, @"photo.badge.plus"},
81 {"insert-link"_L1, @"link.badge.plus"},
82 //{"insert-object"_L1, @""},
83 {"insert-text"_L1, @"textformat"},
84 {"list-add"_L1, @"plus.circle"},
85 {"list-remove"_L1, @"minus.circle"},
86 {"mail-forward"_L1, @"arrowshape.turn.up.right"},
87 {"mail-mark-important"_L1, @"star"},
88 {"mail-mark-junk"_L1, @"xmark.bin"},
89 {"mail-mark-notjunk"_L1, @"trash.slash"},
90 {"mail-mark-read"_L1, @"envelope.open"},
91 {"mail-mark-unread"_L1, @"envelope.fill"},
92 {"mail-message-new"_L1, @"square.and.pencil"},
93 {"mail-reply-all"_L1, @"arrowshape.turn.up.left.2"},
94 {"mail-reply-sender"_L1, @"arrowshape.turn.up.left"},
95 {"mail-send"_L1, @"paperplane"},
96 {"mail-send-receive"_L1, @"envelope.arrow.triangle.branch"},
97 {"media-eject"_L1, @"eject"},
98 {"media-playback-pause"_L1, @"pause"},
99 {"media-playback-start"_L1, @"play"},
100 {"media-playback-stop"_L1, @"stop"},
101 {"media-record"_L1, @"record.circle"},
102 {"media-seek-backward"_L1, @"backward"},
103 {"media-seek-forward"_L1, @"forward"},
104 {"media-skip-backward"_L1, @"backward.end.alt"},
105 {"media-skip-forward"_L1, @"forward.end.alt"},
106 {"object-flip-horizontal"_L1, @"rectangle.landscape.rotate"},
107 {"object-flip-vertical"_L1, @"rectangle.portrait.rotate"},
108 {"object-rotate-left"_L1, @"rotate.left"},
109 {"object-rotate-right"_L1, @"rotate.right"},
110 {"process-stop"_L1, @"stop.circle"},
111 {"system-lock-screen"_L1, @"lock.display"},
112 {"system-log-out"_L1, @"door.left.hand.open"},
113 //{"system-run"_L1, @""},
114 {"system-search"_L1, @"magnifyingglass"},
115 //{"system-reboot"_L1, @""},
116 {"system-shutdown"_L1, @"power"},
117 //{"tools-check-spelling"_L1, @""},
118 {"view-fullscreen"_L1, @"arrow.up.left.and.arrow.down.right"},
119 {"view-refresh"_L1, @"arrow.clockwise"},
120 {"view-restore"_L1, @"arrow.down.right.and.arrow.up.left"},
121 //{"view-sort-ascending"_L1, @""},
122 //{"view-sort-descending"_L1, @""},
123 {"window-close"_L1, @"xmark.circle"},
124 {"window-new"_L1, @"macwindow.badge.plus"},
125 {"zoom-fit-best"_L1, @"square.arrowtriangle.4.outward"},
126 {"zoom-in"_L1, @"plus.magnifyingglass"},
127 //{"zoom-original"_L1, @""},
128 {"zoom-out"_L1, @"minus.magnifyingglass"},
129 {"process-working"_L1, @"circle.dotted"},
130 //{"accessories-calculator"_L1, @""},
131 //{"accessories-character-map"_L1, @""},
132 {"accessories-dictionary"_L1, @"character.book.closed"},
133 {"accessories-text-editor"_L1, @"textformat"},
134 {"help-browser"_L1, @"folder.badge.questionmark"},
135 {"multimedia-volume-control"_L1, @"speaker.wave.3"},
136 {"preferences-desktop-accessibility"_L1, @"accessibility"},
137 //{"preferences-desktop-font"_L1, @""},
138 {"preferences-desktop-keyboard"_L1, @"keyboard.badge.ellipsis"},
139 //{"preferences-desktop-locale"_L1, @""},
140 //{"preferences-desktop-multimedia"_L1, @""},
141 //{"preferences-desktop-screensaver"_L1, @""},
142 //{"preferences-desktop-theme"_L1, @""},
143 //{"preferences-desktop-wallpaper"_L1, @""},
144 {"system-file-manager"_L1, @"folder.badge.gearshape"},
145 //{"system-software-install"_L1, @""},
146 //{"system-software-update"_L1, @""}, d
147 //{"utilities-system-monitor"_L1, @""},
148 {"utilities-terminal"_L1, @"apple.terminal"},
149 //{"applications-accessories"_L1, @""},
150 //{"applications-development"_L1, @""},
151 //{"applications-engineering"_L1, @""},
152 {"applications-games"_L1, @"gamecontroller"},
153 //{"applications-graphics"_L1, @""},
154 {"applications-internet"_L1, @"network"},
155 {"applications-multimedia"_L1, @"tv.and.mediabox"},
156 //{"applications-office"_L1, @""},
157 //{"applications-other"_L1, @""},
158 {"applications-science"_L1, @"atom"},
159 //{"applications-system"_L1, @""},
160 //{"applications-utilities"_L1, @""},
161 {"preferences-desktop"_L1, @"menubar.dock.rectangle"},
162 //{"preferences-desktop-peripherals"_L1, @""},
163 //{"preferences-desktop-personal"_L1, @""},
164 //{"preferences-other"_L1, @""},
165 //{"preferences-system"_L1, @""},
166 {"preferences-system-network"_L1, @"network"},
167 {"system-help"_L1, @"questionmark.diamond"},
168 {"audio-card"_L1, @"waveform.circle"},
169 {"audio-input-microphone"_L1, @"mic"},
170 {"battery"_L1, @"battery.100percent"},
171 {"camera-photo"_L1, @"camera"},
172 {"camera-video"_L1, @"video"},
173 {"camera-web"_L1, @"web.camera"},
174 {"computer"_L1, @"desktopcomputer"},
175 {"drive-harddisk"_L1, @"internaldrive"},
176 {"drive-optical"_L1, @"opticaldiscdrive"},
177 {"drive-removable-media"_L1, @"externaldrive"},
178 {"input-gaming"_L1, @"gamecontroller"}, // "games" also using this one
179 {"input-keyboard"_L1, @"keyboard"},
180 {"input-mouse"_L1, @"computermouse"},
181 {"input-tablet"_L1, @"ipad"},
182 {"media-flash"_L1, @"mediastick"},
183 //{"media-floppy"_L1, @""},
184 //{"media-optical"_L1, @""},
185 {"media-tape"_L1, @"recordingtape"},
186 //{"modem"_L1, @""},
187 {"multimedia-player"_L1, @"play.rectangle"},
188 {"network-wired"_L1, @"app.connected.to.app.below.fill"},
189 {"network-wireless"_L1, @"wifi"},
190 //{"pda"_L1, @""},
191 {"phone"_L1, @"iphone"},
192 {"printer"_L1, @"printer"},
193 {"scanner"_L1, @"scanner"},
194 {"video-display"_L1, @"play.display"},
195 //{"emblem-default"_L1, @""},
196 {"emblem-documents"_L1, @"doc.circle"},
197 {"emblem-downloads"_L1, @"arrow.down.circle"},
198 {"emblem-favorite"_L1, @"star"},
199 {"emblem-important"_L1, @"exclamationmark.bubble.circle"},
200 {"emblem-mail"_L1, @"envelope"},
201 {"emblem-photos"_L1, @"photo.stack"},
202 //{"emblem-readonly"_L1, @""},
203 {"emblem-shared"_L1, @"folder.badge.person.crop"},
204 {"emblem-symbolic-link"_L1, @"link.circle"},
205 {"emblem-synchronized"_L1, @"arrow.triangle.2.circlepath.circle"},
206 {"emblem-system"_L1, @"gear"},
207 //{"emblem-unreadable"_L1, @""},
208 {"folder"_L1, @"folder"},
209 //{"folder-remote"_L1, @""},
210 {"network-server"_L1, @"server.rack"},
211 //{"network-workgroup"_L1, @""},
212 //{"start-here"_L1, @""},
213 {"user-bookmarks"_L1, @"bookmark.circle"},
214 {"user-desktop"_L1, @"desktopcomputer"}, //"computer" also using this one
215 {"user-home"_L1, @"house"}, //"go-home" also using this one
216 {"user-trash"_L1, @"trash"},
217 {"appointment-missed"_L1, @"calendar.badge.exclamationmark"},
218 {"appointment-soon"_L1, @"calendar.badge.clock"},
219 {"audio-volume-high"_L1, @"speaker.wave.3"},
220 {"audio-volume-low"_L1, @"speaker.wave.1"},
221 {"audio-volume-medium"_L1, @"speaker.wave.2"},
222 {"audio-volume-muted"_L1, @"speaker.slash"},
223 {"battery-caution"_L1, @"minus.plus.batteryblock.exclamationmark"},
224 {"battery-low"_L1, @"battery.25percent"}, // there are different levels that can be low battery
225 {"dialog-error"_L1, @"exclamationmark.bubble"},
226 {"dialog-information"_L1, @"info.circle"},
227 {"dialog-password"_L1, @"lock"},
228 {"dialog-question"_L1, @"questionmark.circle"},
229 {"dialog-warning"_L1, @"exclamationmark.octagon"},
230 {"folder-drag-accept"_L1, @"plus.rectangle.on.folder"},
231 //{"folder-open"_L1, @""},
232 {"folder-visiting"_L1, @"folder.circle"},
233 {"image-loading"_L1, @"photo.circle"},
234 {"image-missing"_L1, @"photo"},
235 {"mail-attachment"_L1, @"paperclip"},
236 {"mail-unread"_L1, @"envelope.badge"},
237 {"mail-read"_L1, @"envelope.open"},
238 {"mail-replied"_L1, @"arrowshape.turn.up.left"},
239 //{"mail-signed"_L1, @""},
240 //{"mail-signed-verified"_L1, @""},
241 {"media-playlist-repeat"_L1, @"repet"},
242 {"media-playlist-shuffle"_L1, @"shuffle"},
243 //{"network-error"_L1, @""},
244 //{"network-idle"_L1, @""},
245 {"network-offline"_L1, @"network.slash"},
246 //{"network-receive"_L1, @""},
247 //{"network-transmit"_L1, @""},
248 //{"network-transmit-receive"_L1, @""},
249 //{"printer-error"_L1, @""},
250 {"printer-printing"_L1, @"printer.dotmatrix.filled.and.paper"}, // not sure
251 {"security-high"_L1, @"lock.shield"},
252 //{"security-medium"_L1, @""},
253 {"security-low"_L1, @"lock.trianglebadge.exclamationmark"},
254 {"software-update-available"_L1, @"arrowshape.up.circle"},
255 {"software-update-urgent"_L1, @"exclamationmark.transmission"},
256 {"sync-error"_L1, @"exclamationmark.arrow.triangle.2.circlepath"},
257 {"sync-synchronizing"_L1, @"arrow.triangle.2.circlepath"},
258 {"task-due"_L1, @"clock.badge.exclamationmark"},
259 {"task-past-due"_L1, @"clock.badge.xmark"},
260 {"user-available"_L1, @"person.crop.circle.badge.checkmark"},
261 {"user-away"_L1, @"person.crop.circle.badge.clock"},
262 //{"user-idle"_L1, @""},
263 {"user-offline"_L1, @"person.crop.circle.badge.xmark"},
264 //{"user-trash-full"_L1, @""},
265 {"weather-clear"_L1, @"sun.max"},
266 {"weather-clear-night"_L1, @"moon"},
267 {"weather-few-clouds"_L1, @"cloud.sun"},
268 {"weather-few-clouds-night"_L1, @"cloud.moon"},
269 {"weather-fog"_L1, @"cloud.fog"},
270 {"weather-overcast"_L1, @"cloud"},
271 //{"weather-severe-alert"_L1, @""},
272 {"weather-showers"_L1, @"cloud.rain"},
273 //{"weather-showers-scattered"_L1, @""},
274 {"weather-snow"_L1, @"cloud.snow"},
275 {"weather-storm"_L1, @"tropicalstorm"},
276 };
277 const auto it = std::find_if(std::begin(iconMap), std::end(iconMap), [iconName](const auto &c){
278 return c.first == iconName;
279 });
280 NSString *systemIconName = it != std::end(iconMap) ? it->second : iconName.toNSString();
281#if defined(Q_OS_MACOS)
282 return [NSImage imageWithSystemSymbolName:systemIconName accessibilityDescription:nil];
283#elif defined(QT_PLATFORM_UIKIT)
284 return [UIImage systemImageNamed:systemIconName];
285#endif
286}
287}
288
290 : m_iconName(iconName), m_image(loadImage(iconName))
291{
292 if (m_image)
293 [m_image retain];
294}
295
297{
298 if (m_image)
299 [m_image release];
300}
301
303{
304 return new QAppleIconEngine(m_iconName);
305}
306
308{
309 return u"QAppleIconEngine"_s;
310}
311
313{
314 return m_iconName;
315}
316
318{
319 return m_image == nullptr;
320}
321
322QList<QSize> QAppleIconEngine::availableIconSizes(double aspectRatio)
323{
324 const qreal devicePixelRatio = qGuiApp->devicePixelRatio();
325 const QList<QSize> sizes = {
326 {qRound(16 * devicePixelRatio), qRound(16. * devicePixelRatio / aspectRatio)},
327 {qRound(32 * devicePixelRatio), qRound(32. * devicePixelRatio / aspectRatio)},
328 {qRound(64 * devicePixelRatio), qRound(64. * devicePixelRatio / aspectRatio)},
329 {qRound(128 * devicePixelRatio), qRound(128. * devicePixelRatio / aspectRatio)},
330 {qRound(256 * devicePixelRatio), qRound(256. * devicePixelRatio / aspectRatio)},
331 };
332 return sizes;
333}
334
336{
337 const double aspectRatio = isNull() ? 1.0 : m_image.size.width / m_image.size.height;
338 return availableIconSizes(aspectRatio);
339}
340
342{
343 const double inputAspectRatio = isNull() ? 1.0 : m_image.size.width / m_image.size.height;
344 const double outputAspectRatio = size.width() / size.height();
345 QSize result = size;
346 if (outputAspectRatio > inputAspectRatio)
347 result.rwidth() = result.height() * inputAspectRatio;
348 else
349 result.rheight() = result.width() / inputAspectRatio;
350 return result;
351}
352
357
358namespace {
359#if defined(Q_OS_MACOS)
360auto *configuredImage(const NSImage *image, const QColor &color)
361{
362 auto *config = [NSImageSymbolConfiguration configurationWithPointSize:48
363 weight:NSFontWeightRegular
364 scale:NSImageSymbolScaleLarge];
365 if (@available(macOS 12, *)) {
366 auto *primaryColor = [NSColor colorWithSRGBRed:color.redF()
367 green:color.greenF()
368 blue:color.blueF()
369 alpha:color.alphaF()];
370
371 auto *colorConfig = [NSImageSymbolConfiguration configurationWithHierarchicalColor:primaryColor];
372 config = [config configurationByApplyingConfiguration:colorConfig];
373 }
374
375 return [image imageWithSymbolConfiguration:config];
376}
377#elif defined(QT_PLATFORM_UIKIT)
378auto *configuredImage(const UIImage *image, const QColor &color)
379{
380 auto *config = [UIImageSymbolConfiguration configurationWithPointSize:48
381 weight:UIImageSymbolWeightRegular
382 scale:UIImageSymbolScaleLarge];
383
384 if (@available(iOS 15, *)) {
385 auto *primaryColor = [UIColor colorWithRed:color.redF()
386 green:color.greenF()
387 blue:color.blueF()
388 alpha:color.alphaF()];
389
390 auto *colorConfig = [UIImageSymbolConfiguration configurationWithHierarchicalColor:primaryColor];
391 config = [config configurationByApplyingConfiguration:colorConfig];
392 }
393 return [image imageByApplyingSymbolConfiguration:config];
394}
395#endif
396}
397
399{
400 const quint64 cacheKey = calculateCacheKey(mode, state);
401 if (cacheKey != m_cacheKey || m_pixmap.size() != size || m_pixmap.devicePixelRatio() != scale) {
402 const QSize paintSize = actualSize(size, mode, state);
403 const QSize paintOffset = paintSize != size
404 ? (QSizeF(size - paintSize) * 0.5).toSize()
405 : QSize();
406
407 m_pixmap = QPixmap(size * scale);
408 m_pixmap.setDevicePixelRatio(scale);
409 m_pixmap.fill(Qt::transparent);
410
411 QPainter painter(&m_pixmap);
412 paint(&painter, QRect(paintOffset.width(), paintOffset.height(),
413 paintSize.width(), paintSize.height()), mode, state);
414
415 m_cacheKey = cacheKey;
416 }
417 return m_pixmap;
418}
419
421{
423
425 const QPalette palette;
426 switch (mode) {
427 case QIcon::Normal:
429 break;
430 case QIcon::Disabled:
432 break;
433 case QIcon::Active:
435 break;
436 case QIcon::Selected:
438 break;
439 }
440 const auto *image = configuredImage(m_image, color);
441
443
444#if defined(Q_OS_MACOS)
445 NSGraphicsContext *gc = [NSGraphicsContext graphicsContextWithCGContext:ctx flipped:YES];
446 [NSGraphicsContext saveGraphicsState];
447 [NSGraphicsContext setCurrentContext:gc];
448
449 const NSSize pixmapSize = NSMakeSize(rect.width(), rect.height());
450 [image setSize:pixmapSize];
451 const NSRect sourceRect = NSMakeRect(0, 0, pixmapSize.width, pixmapSize.height);
452 const NSRect iconRect = NSMakeRect(rect.x(), rect.y(), pixmapSize.width, pixmapSize.height);
453
454 [image drawInRect:iconRect fromRect:sourceRect operation:NSCompositingOperationSourceOver fraction:1.0 respectFlipped:YES hints:nil];
455 [NSGraphicsContext restoreGraphicsState];
456#elif defined(QT_PLATFORM_UIKIT)
457 UIGraphicsPushContext(ctx);
458 const CGRect cgrect = CGRectMake(rect.x(), rect.y(), rect.width(), rect.height());
459 [image drawInRect:cgrect];
460 UIGraphicsPopContext();
461#endif
462}
463
static QList< QSize > availableIconSizes(double aspectRatio=1.0)
void paint(QPainter *painter, const QRect &rect, QIcon::Mode mode, QIcon::State state) override
Uses the given painter to paint the icon with the required mode and state into the rectangle rect.
QSize actualSize(const QSize &size, QIcon::Mode mode, QIcon::State state) override
Returns the actual size of the icon the engine provides for the requested size, mode and state.
bool isNull() override
QIconEngine * clone() const override
Reimplement this method to return a clone of this icon engine.
QList< QSize > availableSizes(QIcon::Mode, QIcon::State) override
QAppleIconEngine(const QString &iconName)
QPixmap pixmap(const QSize &size, QIcon::Mode mode, QIcon::State state) override
Returns the icon as a pixmap with the required size, mode, and state.
QString iconName() override
QPixmap scaledPixmap(const QSize &size, QIcon::Mode mode, QIcon::State state, qreal scale) override
QString key() const override
\variable QIconEngine::ScaledPixmapArgument::size
The QColor class provides colors based on RGB, HSV or CMYK values.
Definition qcolor.h:31
The QIconEngine class provides an abstract base class for QIcon renderers.
Definition qiconengine.h:15
Mode
This enum type describes the mode for which a pixmap is intended to be used.
Definition qicon.h:22
@ Disabled
Definition qicon.h:22
@ Selected
Definition qicon.h:22
@ Normal
Definition qicon.h:22
@ Active
Definition qicon.h:22
State
This enum describes the state for which a pixmap is intended to be used.
Definition qicon.h:23
qsizetype size() const noexcept
Definition qlist.h:397
The QPainter class performs low-level painting on widgets and other paint devices.
Definition qpainter.h:46
The QPalette class contains color groups for each widget state.
Definition qpalette.h:19
const QColor & color(ColorGroup cg, ColorRole cr) const
Returns the color in the specified color group, used for the given color role.
Definition qpalette.h:67
@ Inactive
Definition qpalette.h:49
@ Disabled
Definition qpalette.h:49
@ HighlightedText
Definition qpalette.h:53
Returns a copy of the pixmap that is transformed using the given transformation transform and transfo...
Definition qpixmap.h:27
QSize size() const
Returns the size of the pixmap.
Definition qpixmap.cpp:493
void setDevicePixelRatio(qreal scaleFactor)
Sets the device pixel ratio for the pixmap.
Definition qpixmap.cpp:604
void fill(const QColor &fillColor=Qt::white)
Fills the pixmap with the given color.
Definition qpixmap.cpp:850
qreal devicePixelRatio() const
Returns the device pixel ratio for the pixmap.
Definition qpixmap.cpp:576
\inmodule QtCore\reentrant
Definition qrect.h:30
\inmodule QtCore
Definition qsize.h:208
\inmodule QtCore
Definition qsize.h:25
constexpr int height() const noexcept
Returns the height.
Definition qsize.h:133
constexpr int width() const noexcept
Returns the width.
Definition qsize.h:130
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
EGLContext ctx
QPainter paint
QSet< QString >::iterator it
rect
[4]
else opt state
[0]
Combined button and popup list for selecting options.
@ transparent
Definition qnamespace.h:47
Definition image.cpp:4
EGLConfig config
int qRound(qfloat16 d) noexcept
Definition qfloat16.h:327
#define qGuiApp
static QByteArray cacheKey(Args &&...args)
GLenum mode
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLuint GLuint GLfloat weight
GLuint color
[2]
GLbyte GLbyte blue
Definition qopenglext.h:385
const GLubyte * c
GLuint GLsizei const GLuint const GLintptr const GLsizeiptr * sizes
GLuint64EXT * result
[6]
GLfloat GLfloat GLfloat alpha
Definition qopenglext.h:418
GLbyte green
Definition qopenglext.h:385
GLenum GLenum GLenum GLenum GLenum scale
static QImage loadImage(const QString &inPath, bool flipVertical)
void gc(QV4::ExecutionEngine &engine, GCFlags flags)
Definition qmlutils.cpp:118
#define Q_UNUSED(x)
unsigned long long quint64
Definition qtypes.h:61
double qreal
Definition qtypes.h:187
sem release()
QPainter painter(this)
[7]