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
qcocoatheme.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 QPLATFORMTHEME_COCOA_H
5#define QPLATFORMTHEME_COCOA_H
6
7#include <QtCore/QHash>
8#include <qpa/qplatformtheme.h>
9
10#include <QtCore/private/qcore_mac_p.h>
11
13
14class QPalette;
16{
17public:
20
21 void reset();
22
24 QPlatformMenu* createPlatformMenu() const override;
26
27#ifndef QT_NO_SYSTEMTRAYICON
29#endif
30
31 bool usePlatformNativeDialog(DialogType dialogType) const override;
33
34 const QPalette *palette(Palette type = SystemPalette) const override;
35 const QFont *font(Font type = SystemFont) const override;
36 QPixmap standardPixmap(StandardPixmap sp, const QSizeF &size) const override;
37 QIcon fileIcon(const QFileInfo &fileInfo, QPlatformTheme::IconOptions options = {}) const override;
38 QIconEngine *createIconEngine(const QString &iconName) const override;
39
40 QVariant themeHint(ThemeHint hint) const override;
41 Qt::ColorScheme colorScheme() const override;
42 QString standardButtonText(int button) const override;
43 QKeySequence standardButtonShortcut(int button) const override;
44
45 static const char *name;
46
47 void requestColorScheme(Qt::ColorScheme scheme) override;
49
50#ifndef QT_NO_SHORTCUT
51 QList<QKeySequence> keyBindings(QKeySequence::StandardKey key) const override;
52#endif
53
54private:
55 mutable QPalette *m_systemPalette;
56 QMacNotificationObserver m_systemColorObserver;
57 mutable QHash<QPlatformTheme::Palette, QPalette*> m_palettes;
58 QMacKeyValueObserver m_appearanceObserver;
59
61 void updateColorScheme();
62};
63
65
66#endif
QIcon fileIcon(const QFileInfo &fileInfo, QPlatformTheme::IconOptions options={}) const override
Return an icon for fileInfo, observing iconOptions.
Qt::ColorScheme colorScheme() const override
QString standardButtonText(int button) const override
Returns the text of a standard button.
QPlatformDialogHelper * createPlatformDialogHelper(DialogType dialogType) const override
QPlatformMenu * createPlatformMenu() const override
static const char * name
Definition qcocoatheme.h:45
void handleSystemThemeChange()
QIconEngine * createIconEngine(const QString &iconName) const override
Factory function for the QIconEngine used by QIcon::fromTheme().
QPlatformMenuBar * createPlatformMenuBar() const override
QList< QKeySequence > keyBindings(QKeySequence::StandardKey key) const override
bool usePlatformNativeDialog(DialogType dialogType) const override
QKeySequence standardButtonShortcut(int button) const override
QPlatformSystemTrayIcon * createPlatformSystemTrayIcon() const override
Factory function for QSystemTrayIcon.
QPixmap standardPixmap(StandardPixmap sp, const QSizeF &size) const override
void requestColorScheme(Qt::ColorScheme scheme) override
QVariant themeHint(ThemeHint hint) const override
QPlatformMenuItem * createPlatformMenuItem() const override
\reentrant
Definition qfont.h:22
The QIconEngine class provides an abstract base class for QIcon renderers.
Definition qiconengine.h:15
The QIcon class provides scalable icons in different modes and states.
Definition qicon.h:20
The QKeySequence class encapsulates a key sequence as used by shortcuts.
The QPalette class contains color groups for each widget state.
Definition qpalette.h:19
Returns a copy of the pixmap that is transformed using the given transformation transform and transfo...
Definition qpixmap.h:27
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.
\inmodule QtCore
Definition qsize.h:208
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qvariant.h:65
QPushButton * button
[2]
Combined button and popup list for selecting options.
ColorScheme
Definition qnamespace.h:50
GLuint64 key
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum type
static QT_BEGIN_NAMESPACE QVariant hint(QPlatformIntegration::StyleHint h)
#define sp