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
39 QPixmap standardPixmap(StandardPixmap sp, const QSizeF &size) const override;
40 QIcon fileIcon(const QFileInfo &fileInfo,
41 QPlatformTheme::IconOptions iconOptions = { }) const override;
42
43 QIconEngine *createIconEngine(const QString &iconName) const override;
44
45#if QT_CONFIG(shortcut)
46 QList<QKeySequence> keyBindings(QKeySequence::StandardKey key) const override;
47#endif
48
49 QString standardButtonText(int button) const override;
50
51private:
52 QScopedPointer<QXdgDesktopPortalThemePrivate> d_ptr;
53 Q_DISABLE_COPY_MOVE(QXdgDesktopPortalTheme)
54};
55
56QT_END_NAMESPACE
57
58#endif // QXDGDESKTOPPORTALTHEME_H
59

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