tizendevice.cpp 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  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. #include "tizendevice.h"
  30. #include "tizenconstants.h"
  31. #include "tizensignaloperation.h"
  32. #include "sdbdeviceprocesslist.h"
  33. #include <QCoreApplication>
  34. using namespace ProjectExplorer;
  35. namespace Tizen {
  36. namespace Internal {
  37. TizenDevice::TizenDevice()
  38. : IDevice(Core::Id(Constants::TIZEN_DEVICE_TYPE),
  39. IDevice::AutoDetected,
  40. IDevice::Hardware,
  41. Core::Id(Constants::TIZEN_DEVICE_ID))
  42. {
  43. }
  44. TizenDevice::TizenDevice(Core::Id serial)
  45. : IDevice(Core::Id(Constants::TIZEN_DEVICE_TYPE),
  46. IDevice::AutoDetected,
  47. IDevice::Hardware,
  48. serial)
  49. {
  50. }
  51. TizenDevice::TizenDevice(const TizenDevice &other)
  52. : IDevice(other)
  53. {
  54. }
  55. IDevice::DeviceInfo TizenDevice::deviceInformation() const
  56. {
  57. return IDevice::DeviceInfo();
  58. }
  59. QString TizenDevice::displayType() const
  60. {
  61. return QCoreApplication::translate("Tizen::Internal::TizenDevice", "Tizen");
  62. }
  63. IDeviceWidget *TizenDevice::createWidget()
  64. {
  65. return 0;
  66. }
  67. QList<Core::Id> TizenDevice::actionIds() const
  68. {
  69. return QList<Core::Id>();
  70. }
  71. QString TizenDevice::displayNameForActionId(Core::Id actionId) const
  72. {
  73. Q_UNUSED(actionId)
  74. return QString();
  75. }
  76. void TizenDevice::executeAction(Core::Id actionId, QWidget *parent)
  77. {
  78. Q_UNUSED(actionId)
  79. Q_UNUSED(parent)
  80. }
  81. bool TizenDevice::canAutoDetectPorts() const
  82. {
  83. return false;
  84. }
  85. DeviceProcessSignalOperation::Ptr TizenDevice::signalOperation() const
  86. {
  87. return DeviceProcessSignalOperation::Ptr(new TizenSignalOperation());
  88. }
  89. DeviceProcessList *TizenDevice::createProcessListModel(QObject *parent) const
  90. {
  91. return new SdbDeviceProcessList(IDevice::ConstPtr(this), parent);
  92. }
  93. IDevice::Ptr TizenDevice::clone() const
  94. {
  95. return IDevice::Ptr(new TizenDevice(*this));
  96. }
  97. QString TizenDevice::qmlProfilerHost() const
  98. {
  99. return QLatin1String("localhost");
  100. }
  101. } // namespace Internal
  102. } // namespace Tizen