/QFramer/mainwindow/settingmenucontroller.cpp

https://github.com/yiminyangguang520/qt · C++ · 71 lines · 40 code · 10 blank · 21 comment · 0 complexity · 244be480116f44f8a5d1a3e9b85ddbd3 MD5 · raw file

  1. /****************************************************************************
  2. **
  3. ** Copyright (C) 2014 dragondjf
  4. **
  5. ** QFramer is a frame based on Qt5.3, you will be more efficient with it.
  6. ** As an Qter, Qt give us a nice coding experience. With user interactive experience(UE)
  7. ** become more and more important in modern software, deveployers should consider business and UE.
  8. ** So, QFramer is born. QFramer's goal is to be a mature solution
  9. ** which you only need to be focus on your business but UE for all Qters.
  10. **
  11. ** Version : 0.2.5.0
  12. ** Author : dragondjf
  13. ** Website : https://github.com/dragondjf
  14. ** Project : https://github.com/dragondjf/QCFramer
  15. ** Blog : http://my.oschina.net/dragondjf/home/?ft=atme
  16. ** Wiki : https://github.com/dragondjf/QCFramer/wiki
  17. ** Lincence: LGPL V2
  18. ** QQ: 465398889
  19. ** Email: dragondjf@gmail.com, ding465398889@163.com, 465398889@qq.com
  20. **
  21. ****************************************************************************/
  22. #include "mainwindow.h"
  23. #include "dialogs/aboutdialog.h"
  24. #include "settingmenucontroller.h"
  25. #include "dialogs/settingdialog.h"
  26. #include <QUrl>
  27. #include <QApplication>
  28. #include <QDesktopServices>
  29. SettingMenuController::SettingMenuController(QObject *parent)
  30. : QObject(parent)
  31. {
  32. }
  33. void SettingMenuController::showSettingDialog()
  34. {
  35. MainWindow::getInstance()->show();
  36. SettingDialog* settingDialog = new SettingDialog;
  37. settingDialog->exec();
  38. }
  39. void SettingMenuController::checkUpdate()
  40. {
  41. QDesktopServices::openUrl(QUrl("https://github.com/dragondjf/QCFramer"));
  42. }
  43. void SettingMenuController::onlineHelp()
  44. {
  45. QDesktopServices::openUrl(QUrl("https://github.com/dragondjf/QCFramer"));
  46. }
  47. void SettingMenuController::visitOfficialSite()
  48. {
  49. QDesktopServices::openUrl(QUrl("https://github.com/dragondjf/QCFramer"));
  50. }
  51. void SettingMenuController::showAboutUs()
  52. {
  53. MainWindow::getInstance()->show();
  54. AboutDialog* aboutDialog = new AboutDialog;
  55. aboutDialog->exec();
  56. }
  57. void SettingMenuController::closeMainWindow()
  58. {
  59. MainWindow* p = MainWindow::getInstance();
  60. p->animationClose();
  61. }