-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathpandaplatformtheme.h
More file actions
39 lines (31 loc) · 900 Bytes
/
pandaplatformtheme.h
File metadata and controls
39 lines (31 loc) · 900 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef PANDAPLATFORMTHEME_H
#define PANDAPLATFORMTHEME_H
#include <qpa/qplatformtheme.h>
#include "hintsettings.h"
#include "systemtrayicon.h"
#include <QHash>
#include <QKeySequence>
class QIconEngine;
class QWindow;
class X11Integration;
class PandaPlatformTheme : public QPlatformTheme
{
public:
PandaPlatformTheme();
~PandaPlatformTheme() override;
QVariant themeHint(ThemeHint hint) const override;
QPlatformMenuBar *createPlatformMenuBar() const override;
QPlatformSystemTrayIcon *createPlatformSystemTrayIcon() const override {
auto trayIcon = new SystemTrayIcon;
if (trayIcon->isSystemTrayAvailable())
return trayIcon;
else {
delete trayIcon;
return nullptr;
}
}
private:
HintsSettings *m_hints;
QScopedPointer<X11Integration> m_x11Integration;
};
#endif // PANDAPLATFORMTHEME_H