1 Star 0 Fork 9

fuyb/linux_feiq

forked from uenigma/linux_feiq 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
platformdepend.cpp 1.12 KB
一键复制 编辑 原始数据 按行查看 历史
lpx 提交于 2021-12-16 21:35 +08:00 . 格式化代码
#include "platformdepend.h"
#ifdef Q_OS_OSX
#include "osx/osxplatform.h"
#endif
class MockPlatform : public IPlatform
{
public:
long showNotify(const QString &title, const QString &content, const QString &data)
{
(void)title;
(void)content;
(void)data;
return 0;
}
void hideAllNotify()
{
}
void setBadgeNumber(int number)
{
(void)number;
}
};
PlatformDepend::PlatformDepend()
{
#ifdef Q_OS_OSX
mImpl = new OsxPlatform();
#else
mImpl = new MockPlatform();
#endif
}
PlatformDepend::~PlatformDepend()
{
delete mImpl;
}
PlatformDepend &PlatformDepend::instance()
{
static PlatformDepend me;
return me;
}
long PlatformDepend::showNotify(const QString &title, const QString &content, const QString &fellowIp)
{
return mImpl->showNotify(title, content, fellowIp);
}
void PlatformDepend::hideAllNotify()
{
mImpl->hideAllNotify();
}
void PlatformDepend::setBadgeNumber(int number)
{
mImpl->setBadgeNumber(number);
}
void PlatformDepend::setMainWnd(MainWindow *mainWnd)
{
IPlatform::setMainWnd(mainWnd);
mImpl->setMainWnd(mainWnd);
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/HALOBING/linux_feiq.git
git@gitee.com:HALOBING/linux_feiq.git
HALOBING
linux_feiq
linux_feiq
master

搜索帮助