-
Notifications
You must be signed in to change notification settings - Fork 88
/
platformdepend.h
43 lines (32 loc) · 880 Bytes
/
platformdepend.h
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
40
41
42
43
#ifndef PLATFORMDEPEND_H
#define PLATFORMDEPEND_H
#include <QString>
class MainWindow;
class IPlatform
{
public:
virtual ~IPlatform(){}
virtual long showNotify(const QString& title, const QString& content, const QString & fellowIp) = 0;
virtual void hideAllNotify() = 0;
virtual void setBadgeNumber(int number) = 0;
virtual void setMainWnd(MainWindow* mainWnd)
{
Q_UNUSED(mainWnd);
}
};
class PlatformDepend : public IPlatform
{
private:
PlatformDepend();
~PlatformDepend();
public:
static PlatformDepend& instance();
public:
long showNotify(const QString& title, const QString& content, const QString & fellowIp) override;
void hideAllNotify() override;
void setBadgeNumber(int number) override;
void setMainWnd(MainWindow* mainWnd) override;
private:
IPlatform* mImpl;
};
#endif // PLATFORMDEPEND_H