tizendevicefactory.cpp 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /****************************************************************************
  2. **
  3. ** Copyright (C) 2013 Jarek Pelczar <jpelczar@gmail.com>
  4. **
  5. ** This file is part of Qt Creator.
  6. **
  7. ** Commercial License Usage
  8. ** Licensees holding valid commercial Qt licenses may use this file in
  9. ** accordance with the commercial license agreement provided with the
  10. ** Software or, alternatively, in accordance with the terms contained in
  11. ** a written agreement between you and Digia. For licensing terms and
  12. ** conditions see http://qt.digia.com/licensing. For further information
  13. ** use the contact form at http://qt.digia.com/contact-us.
  14. **
  15. ** GNU Lesser General Public License Usage
  16. ** Alternatively, this file may be used under the terms of the GNU Lesser
  17. ** General Public License version 2.1 as published by the Free Software
  18. ** Foundation and appearing in the file LICENSE.LGPL included in the
  19. ** packaging of this file. Please review the following information to
  20. ** ensure the GNU Lesser General Public License version 2.1 requirements
  21. ** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
  22. **
  23. ** In addition, as a special exception, Digia gives you certain additional
  24. ** rights. These rights are described in the Digia Qt LGPL Exception
  25. ** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
  26. **
  27. ****************************************************************************/
  28. #include "tizendevicefactory.h"
  29. #include "tizendevice.h"
  30. #include "tizenconstants.h"
  31. using namespace ProjectExplorer;
  32. namespace Tizen {
  33. TizenDeviceFactory::TizenDeviceFactory(QObject * parent) :
  34. IDeviceFactory(parent)
  35. {
  36. }
  37. TizenDeviceFactory::~TizenDeviceFactory()
  38. {
  39. }
  40. QString TizenDeviceFactory::displayNameForId(Core::Id type) const
  41. {
  42. if(type == Constants::TIZEN_DEVICE_TYPE)
  43. return tr("Tizen Device");
  44. return QString();
  45. }
  46. QList<Core::Id> TizenDeviceFactory::availableCreationIds() const
  47. {
  48. return QList<Core::Id>() << Constants::TIZEN_DEVICE_TYPE;
  49. }
  50. bool TizenDeviceFactory::canCreate() const
  51. {
  52. return true;
  53. }
  54. ProjectExplorer::IDevice::Ptr TizenDeviceFactory::create(Core::Id id) const
  55. {
  56. Q_UNUSED(id);
  57. return IDevice::Ptr();
  58. }
  59. bool TizenDeviceFactory::canRestore(const QVariantMap &map) const
  60. {
  61. return IDevice::typeFromMap(map) == Constants::TIZEN_DEVICE_TYPE;
  62. }
  63. ProjectExplorer::IDevice::Ptr TizenDeviceFactory::restore(const QVariantMap &map) const
  64. {
  65. Q_UNUSED(map);
  66. return IDevice::Ptr(new TizenDevice());
  67. }
  68. } // namespace Tizen