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.

osxplatform.cpp 595 B

8 years ago
8 years ago
8 years ago
12345678910111213141516171819202122232425262728293031
  1. #include "osxplatform.h"
  2. #include <QtMac>
  3. OsxPlatform::OsxPlatform()
  4. {
  5. }
  6. long OsxPlatform::showNotify(const QString &title, const QString &content, const QString & fellowIp)
  7. {
  8. return mNotify.show(title, content, fellowIp);
  9. }
  10. void OsxPlatform::hideAllNotify()
  11. {
  12. mNotify.hideAll();
  13. }
  14. void OsxPlatform::setBadgeNumber(int number)
  15. {
  16. if (number == 0)
  17. QtMac::setBadgeLabelText("");
  18. else
  19. QtMac::setBadgeLabelText(QString::number(number));
  20. }
  21. void OsxPlatform::setMainWnd(MainWindow *mainWnd)
  22. {
  23. IPlatform::setMainWnd(mainWnd);
  24. mNotify.setMainWnd(mainWnd);
  25. }

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

Contributors (1)