/src/native/qgsnative.cpp

https://github.com/ricardogsilva/Quantum-GIS · C++ · 96 lines · 58 code · 23 blank · 15 comment · 0 complexity · f7b11db88293b2528e408a4092ae8138 MD5 · raw file

  1. /***************************************************************************
  2. qgsnative.cpp - abstracted interface to native system calls
  3. -------------------
  4. begin : January 2017
  5. copyright : (C) 2017 by Matthias Kuhn
  6. email : matthias@opengis.ch
  7. ***************************************************************************/
  8. /***************************************************************************
  9. * *
  10. * This program is free software; you can redistribute it and/or modify *
  11. * it under the terms of the GNU General Public License as published by *
  12. * the Free Software Foundation; either version 2 of the License, or *
  13. * (at your option) any later version. *
  14. * *
  15. ***************************************************************************/
  16. #include "qgsnative.h"
  17. #include <QString>
  18. #include <QDesktopServices>
  19. #include <QUrl>
  20. #include <QFileInfo>
  21. void QgsNative::cleanup()
  22. {}
  23. QgsNative::Capabilities QgsNative::capabilities() const
  24. {
  25. return QgsNative::Capabilities();
  26. }
  27. void QgsNative::initializeMainWindow( QWindow *,
  28. const QString &,
  29. const QString &,
  30. const QString & )
  31. {
  32. }
  33. void QgsNative::currentAppActivateIgnoringOtherApps()
  34. {
  35. }
  36. void QgsNative::openFileExplorerAndSelectFile( const QString &path )
  37. {
  38. const QFileInfo fi( path );
  39. const QString folder = fi.path();
  40. QDesktopServices::openUrl( QUrl::fromLocalFile( folder ) );
  41. }
  42. void QgsNative::showFileProperties( const QString & )
  43. {
  44. }
  45. void QgsNative::showUndefinedApplicationProgress()
  46. {
  47. }
  48. void QgsNative::setApplicationProgress( double )
  49. {
  50. }
  51. void QgsNative::hideApplicationProgress()
  52. {
  53. }
  54. void QgsNative::setApplicationBadgeCount( int )
  55. {
  56. }
  57. bool QgsNative::hasDarkTheme()
  58. {
  59. return false;
  60. }
  61. bool QgsNative::openTerminalAtPath( const QString & )
  62. {
  63. return false;
  64. }
  65. QgsNative::NotificationResult QgsNative::showDesktopNotification( const QString &, const QString &, const NotificationSettings & )
  66. {
  67. NotificationResult result;
  68. result.successful = false;
  69. return result;
  70. }
  71. void QgsNative::onRecentProjectsChanged( const std::vector<QgsNative::RecentProjectProperties> & )
  72. {
  73. }