You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

platformdepend.h 880 B

8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
8 years ago
12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. #ifndef PLATFORMDEPEND_H
  2. #define PLATFORMDEPEND_H
  3. #include <QString>
  4. class MainWindow;
  5. class IPlatform
  6. {
  7. public:
  8. virtual ~IPlatform(){}
  9. virtual long showNotify(const QString& title, const QString& content, const QString & fellowIp) = 0;
  10. virtual void hideAllNotify() = 0;
  11. virtual void setBadgeNumber(int number) = 0;
  12. virtual void setMainWnd(MainWindow* mainWnd)
  13. {
  14. Q_UNUSED(mainWnd);
  15. }
  16. };
  17. class PlatformDepend : public IPlatform
  18. {
  19. private:
  20. PlatformDepend();
  21. ~PlatformDepend();
  22. public:
  23. static PlatformDepend& instance();
  24. public:
  25. long showNotify(const QString& title, const QString& content, const QString & fellowIp) override;
  26. void hideAllNotify() override;
  27. void setBadgeNumber(int number) override;
  28. void setMainWnd(MainWindow* mainWnd) override;
  29. private:
  30. IPlatform* mImpl;
  31. };
  32. #endif // PLATFORMDEPEND_H

mac下的“飞秋”大多数只是飞鸽传书协议,而且未发现令人满意的开源项目,所以基于c++与qt实现了基础的飞秋协议。

Contributors (1)