tizenconfigurations.h 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138
  1. /****************************************************************************
  2. **
  3. ** Copyright (C) 2013 Jarek Pelczar <jpelczar@gmail.com>
  4. ** Copyright (C) 2014 Tomasz Olszak <olszak.tomasz@gmail.com>
  5. **
  6. ** This file is part of Qt Creator.
  7. **
  8. ** Commercial License Usage
  9. ** Licensees holding valid commercial Qt licenses may use this file in
  10. ** accordance with the commercial license agreement provided with the
  11. ** Software or, alternatively, in accordance with the terms contained in
  12. ** a written agreement between you and Digia. For licensing terms and
  13. ** conditions see http://qt.digia.com/licensing. For further information
  14. ** use the contact form at http://qt.digia.com/contact-us.
  15. **
  16. ** GNU Lesser General Public License Usage
  17. ** Alternatively, this file may be used under the terms of the GNU Lesser
  18. ** General Public License version 2.1 as published by the Free Software
  19. ** Foundation and appearing in the file LICENSE.LGPL included in the
  20. ** packaging of this file. Please review the following information to
  21. ** ensure the GNU Lesser General Public License version 2.1 requirements
  22. ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
  23. **
  24. ** In addition, as a special exception, Digia gives you certain additional
  25. ** rights. These rights are described in the Digia Qt LGPL Exception
  26. ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
  27. **
  28. ****************************************************************************/
  29. #ifndef TIZEN_TIZENCONFIGURATIONS_H
  30. #define TIZEN_TIZENCONFIGURATIONS_H
  31. #include <QLoggingCategory>
  32. #include <utils/fileutils.h>
  33. #include <projectexplorer/abi.h>
  34. QT_BEGIN_NAMESPACE
  35. class QSettings;
  36. QT_END_NAMESPACE
  37. namespace ProjectExplorer { class Project; }
  38. namespace Tizen {
  39. class TizenPlugin;
  40. namespace Internal {
  41. class TizenConfig
  42. {
  43. public:
  44. TizenConfig();
  45. void load(const QSettings &settings);
  46. void save(QSettings &settings) const;
  47. Utils::FileName sdkLocation() const;
  48. void setSdkLocation(const Utils::FileName &sdkLocation);
  49. Utils::FileName sdkDataLocation() const;
  50. void setSdkDataLocation(const Utils::FileName &sdkDataLocation);
  51. // Utils::FileName sbiLocation() const;
  52. // void setSbiLocation(const Utils::FileName &sbiLocation);
  53. Utils::FileName sdbLocation() const;
  54. void setSdbLocation(const Utils::FileName &sdbLocation);
  55. int sdbPort() const;
  56. void setSdbPort(int port);
  57. Utils::FileName nativePackagingLocation() const;
  58. void setNativePackagingLocation(const Utils::FileName &nativePackaging);
  59. Utils::FileName authorCertificateLocation() const;
  60. void setAuthorCertificateLocation(const Utils::FileName &authorCertificateLocation);
  61. QString authorCertificatePassword() const;
  62. void setAuthorCertificatePassword(const QString &authorCertificatePassword);
  63. static ProjectExplorer::Abi::Architecture architectureForToolChainPrefix(const QString &toolchainprefix);
  64. private:
  65. Utils::FileName m_sdkLocation;
  66. Utils::FileName m_sdkDataLocation;
  67. // Utils::FileName m_sbiLocation;
  68. Utils::FileName m_sdbLocation;
  69. Utils::FileName m_nativePackagingLocation;
  70. Utils::FileName m_authorCertificateLocation;
  71. QString m_authorCertificatePassword;
  72. int m_sdbPort;
  73. };
  74. class TizenConfigurations : public QObject
  75. {
  76. friend class Tizen::TizenPlugin;
  77. Q_OBJECT
  78. public:
  79. TizenConfigurations(QObject *parent = 0);
  80. ~TizenConfigurations();
  81. static TizenConfigurations *instance() {return m_instance;}
  82. static TizenConfig currentConfig();
  83. static void setConfig(const TizenConfig &config);
  84. // static void updateTizenDevice();
  85. // static TizenDeviceInfo showDeviceDialog(ProjectExplorer::Project *project, int apiLevel, const QString &abi);
  86. // static void setDefaultDevice(ProjectExplorer::Project *project, const QString &abi, const QString &serialNumber); // serial number or avd name
  87. // static QString defaultDevice(ProjectExplorer::Project *project, const QString &abi); // serial number or avd name
  88. public slots:
  89. static void clearDefaultDevices(ProjectExplorer::Project *);
  90. static void updateAutomaticKitList();
  91. signals:
  92. void updated();
  93. private:
  94. TizenConfigurations();
  95. void load();
  96. void save();
  97. static TizenConfigurations * m_instance;
  98. TizenConfig m_config;
  99. //QMap<ProjectExplorer::Project *, QMap<QString, QString> > m_defaultDeviceForAbi;
  100. };
  101. } // namespace Internal
  102. } // namespace Tizen
  103. #endif // TIZEN_TIZENCONFIGURATIONS_H