1// Copyright (C) 2017 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 QXDGDESKTOPPORTALTHEME_H
5#define QXDGDESKTOPPORTALTHEME_H
6
7#include <qpa/qplatformtheme.h>
8
9QT_BEGIN_NAMESPACE
10
11class QXdgDesktopPortalThemePrivate;
12
13class QXdgDesktopPortalTheme : public QPlatformTheme
14{
15 Q_DECLARE_PRIVATE(QXdgDesktopPortalTheme)
16public:
17 QXdgDesktopPortalTheme();
18
19 QPlatformMenuItem *createPlatformMenuItem() const override;
20 QPlatformMenu *createPlatformMenu() const override;
21 QPlatformMenuBar *createPlatformMenuBar() const override;
22 void showPlatformMenuBar() override;
23
24 bool usePlatformNativeDialog(DialogType type) const override;
25 QPlatformDialogHelper *createPlatformDialogHelper(DialogType type) const override;
26
27#ifndef QT_NO_SYSTEMTRAYICON
28 QPlatformSystemTrayIcon *createPlatformSystemTrayIcon() const override;
29#endif
30
31 const QPalette *palette(Palette type = SystemPalette) const override;
32
33 const QFont *font(Font type = SystemFont) const override;
34
35 QVariant themeHint(ThemeHint hint) const override;
36
37 Qt::ColorScheme colorScheme() const override;
38 Qt::ContrastPreference contrastPreference() const override;
39
40 QPixmap standardPixmap(StandardPixmap sp, const QSizeF &size) const override;
41 QIcon fileIcon(const QFileInfo &fileInfo,
42 QPlatformTheme::IconOptions iconOptions = { }) const override;
43
44 QIconEngine *createIconEngine(const QString &iconName) const override;
45
46#if QT_CONFIG(shortcut)
47 QList<QKeySequence> keyBindings(QKeySequence::StandardKey key) const override;
48#endif
49
50 QString standardButtonText(int button) const override;
51
52 static bool isXdgPlugin(const QString &key);
53
54private:
55 QScopedPointer<QXdgDesktopPortalThemePrivate> d_ptr;
56 Q_DISABLE_COPY_MOVE(QXdgDesktopPortalTheme)
57};
58
59QT_END_NAMESPACE
60
61#endif // QXDGDESKTOPPORTALTHEME_H
62

source code of qtbase/src/plugins/platformthemes/xdgdesktopportal/qxdgdesktopportaltheme.h