Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qiostheme.h
Go to the documentation of this file.
1// Copyright (C) 2016 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#ifndef QIOSTHEME_H
6#define QIOSTHEME_H
7
8#import <UIKit/UIKit.h>
9
10#include <QtCore/QHash>
11#include <QtGui/QPalette>
12#include <qpa/qplatformtheme.h>
13
14#include <QtCore/private/qcore_mac_p.h>
15
17
19{
20public:
21 QIOSTheme();
22 ~QIOSTheme();
23
24 const QPalette *palette(Palette type = SystemPalette) const override;
25 QVariant themeHint(ThemeHint hint) const override;
26
27 Qt::ColorScheme colorScheme() const override;
28 void requestColorScheme(Qt::ColorScheme scheme) override;
29
30#if !defined(Q_OS_TVOS) && !defined(Q_OS_VISIONOS)
32 QPlatformMenu* createPlatformMenu() const override;
33#endif
34
35 bool usePlatformNativeDialog(DialogType type) const override;
36 QPlatformDialogHelper *createPlatformDialogHelper(DialogType type) const override;
37
38 const QFont *font(Font type = SystemFont) const override;
39 QIconEngine *createIconEngine(const QString &iconName) const override;
40 QIcon fileIcon(const QFileInfo &fileInfo, QPlatformTheme::IconOptions options = {}) const override;
41
42 static const char *name;
43
44 static void initializeSystemPalette();
45 static void applyTheme(UIWindow *window);
46
47private:
48 static QPalette s_systemPalette;
49 static inline Qt::ColorScheme s_colorSchemeOverride = Qt::ColorScheme::Unknown;
50 QMacNotificationObserver m_contentSizeCategoryObserver;
51};
52
53QT_END_NAMESPACE
54
55#endif
QVariant styleHint(StyleHint hint) const override
QPlatformTheme * createPlatformTheme(const QString &name) const override
void beep() const override
static QIOSIntegration * instance()
void setApplicationBadge(qint64 number) override
QPointingDevice * touchDevice()
QStringList themeNames() const override
QPlatformNativeInterface * nativeInterface() const override
QAbstractEventDispatcher * createEventDispatcher() const override
Factory function for the GUI event dispatcher.
QPlatformServices * services() const override
QPlatformInputContext * inputContext() const override
Returns the platforms input context.
QPlatformFontDatabase * fontDatabase() const override
Accessor for the platform integration's fontdatabase.
QIconEngine * createIconEngine(const QString &iconName) const override
Factory function for the QIconEngine used by QIcon::fromTheme().
Definition qiostheme.mm:228
QPlatformMenu * createPlatformMenu() const override
Definition qiostheme.mm:105
QIcon fileIcon(const QFileInfo &fileInfo, QPlatformTheme::IconOptions options={}) const override
Return an icon for fileInfo, observing iconOptions.
Definition qiostheme.mm:233
const QFont * font(Font type=SystemFont) const override
Definition qiostheme.mm:221
static const char * name
Definition qiostheme.h:42
QVariant themeHint(ThemeHint hint) const override
Definition qiostheme.mm:146
void requestColorScheme(Qt::ColorScheme scheme) override
Definition qiostheme.mm:189
static void initializeSystemPalette()
Definition qiostheme.mm:57
Qt::ColorScheme colorScheme() const override
Definition qiostheme.mm:160
bool usePlatformNativeDialog(DialogType type) const override
Definition qiostheme.mm:111
QPlatformMenuItem * createPlatformMenuItem() const override
Definition qiostheme.mm:100
static void applyTheme(UIWindow *window)
Definition qiostheme.mm:205
const QPalette * palette(Palette type=SystemPalette) const override
Return a color palette for type type.
Definition qiostheme.mm:92
QPlatformDialogHelper * createPlatformDialogHelper(DialogType type) const override
Definition qiostheme.mm:124
#define QIosOptionalPluginInterface_iid