Qt 6.x
The Qt SDK
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
39 QVariant themeHint(ThemeHint hint) const override;
40 Qt::ColorScheme colorScheme() const override;
41 QString standardButtonText(int button) const override;
42 QKeySequence standardButtonShortcut(int button) const override;
43
44 static const char *name;
45
47
48#ifndef QT_NO_SHORTCUT
50#endif
51
52private:
53 mutable QPalette *m_systemPalette;
54 QMacNotificationObserver m_systemColorObserver;
56 QMacKeyValueObserver m_appearanceObserver;
57};
58
60
61#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:44
void handleSystemThemeChange()
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
QVariant themeHint(ThemeHint hint) const override
QPlatformMenuItem * createPlatformMenuItem() const override
\inmodule QtCore \reentrant
Definition qfileinfo.h:22
\reentrant
Definition qfont.h:20
\inmodule QtCore
Definition qhash.h:818
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.
Definition qlist.h:74
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:207
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:127
\inmodule QtCore
Definition qvariant.h:64
QPushButton * button
[2]
Combined button and popup list for selecting options.
ColorScheme
Definition qnamespace.h:49
GLuint64 key
GLenum GLuint GLintptr GLsizeiptr size
[1]
GLenum type
static QT_BEGIN_NAMESPACE QVariant hint(QPlatformIntegration::StyleHint h)
#define sp