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
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
4#ifndef QIOSTHEME_H
5#define QIOSTHEME_H
6
7#import <UIKit/UIKit.h>
8
9#include <QtCore/QHash>
10#include <QtGui/QPalette>
11#include <qpa/qplatformtheme.h>
12
13#include <QtCore/private/qcore_mac_p.h>
14
16
18{
19public:
20 QIOSTheme();
21 ~QIOSTheme();
22
23 const QPalette *palette(Palette type = SystemPalette) const override;
24 QVariant themeHint(ThemeHint hint) const override;
25
26 Qt::ColorScheme colorScheme() const override;
27 void requestColorScheme(Qt::ColorScheme scheme) override;
28
29#if !defined(Q_OS_TVOS) && !defined(Q_OS_VISIONOS)
31 QPlatformMenu* createPlatformMenu() const override;
32#endif
33
34 bool usePlatformNativeDialog(DialogType type) const override;
36
37 const QFont *font(Font type = SystemFont) const override;
38 QIconEngine *createIconEngine(const QString &iconName) const override;
39
40 static const char *name;
41
42 static void initializeSystemPalette();
43 static void applyTheme(UIWindow *window);
44
45private:
46 static QPalette s_systemPalette;
47 static inline Qt::ColorScheme s_colorSchemeOverride = Qt::ColorScheme::Unknown;
48 QMacNotificationObserver m_contentSizeCategoryObserver;
49};
50
52
53#endif
\reentrant
Definition qfont.h:22
QIconEngine * createIconEngine(const QString &iconName) const override
Factory function for the QIconEngine used by QIcon::fromTheme().
Definition qiostheme.mm:216
QPlatformMenu * createPlatformMenu() const override
Definition qiostheme.mm:95
static const char * name
Definition qiostheme.h:40
QVariant themeHint(ThemeHint hint) const override
Definition qiostheme.mm:136
void requestColorScheme(Qt::ColorScheme scheme) override
Definition qiostheme.mm:177
static void initializeSystemPalette()
Definition qiostheme.mm:55
Qt::ColorScheme colorScheme() const override
Definition qiostheme.mm:148
bool usePlatformNativeDialog(DialogType type) const override
Definition qiostheme.mm:101
QPlatformMenuItem * createPlatformMenuItem() const override
Definition qiostheme.mm:90
static void applyTheme(UIWindow *window)
Definition qiostheme.mm:193
QPlatformDialogHelper * createPlatformDialogHelper(DialogType type) const override
Definition qiostheme.mm:114
The QIconEngine class provides an abstract base class for QIcon renderers.
Definition qiconengine.h:15
The QPalette class contains color groups for each widget state.
Definition qpalette.h:19
The QPlatformDialogHelper class allows for platform-specific customization of dialogs.
The QPlatformTheme class allows customizing the UI based on themes.
ThemeHint
This enum describes the available theme hints.
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qvariant.h:65
Combined button and popup list for selecting options.
ColorScheme
Definition qnamespace.h:50
GLenum type
static QT_BEGIN_NAMESPACE QVariant hint(QPlatformIntegration::StyleHint h)
aWidget window() -> setWindowTitle("New Window Title")
[2]