Commit 06ed0718 authored by Joerg Bornemann's avatar Joerg Bornemann

Long live the Windows RT plugin!

Done-with: Andrew Knight <andrew.knight@digia.com>
Done-with: Friedemann Kleint <friedemann.kleint@digia.com>

Change-Id: I4772938e775056d6a36a7e75f868921a74007862
Reviewed-by: default avatarChristian Kandeler <christian.kandeler@digia.com>
Reviewed-by: default avatarEike Ziller <eike.ziller@digia.com>
parent 7695df58
......@@ -2,7 +2,7 @@
# in case MS VS compilers are used.
CDB_PATH=""
win32-msvc* {
win32-msvc*|winrt {
CDB_PATH="$$(CDB_PATH)"
isEmpty(CDB_PATH):CDB_PATH="$$(ProgramFiles)/Debugging Tools For Windows/sdk"
!exists($$CDB_PATH):CDB_PATH="$$(ProgramFiles)/Debugging Tools For Windows (x86)/sdk"
......
......@@ -51,6 +51,10 @@ SUBDIRS = \
ios \
beautifier
minQtVersion(5, 0, 0) {
SUBDIRS += winrt
}
# prefer qmake variable set on command line over env var
isEmpty(LLVM_INSTALL_DIR):LLVM_INSTALL_DIR=$$(LLVM_INSTALL_DIR)
!isEmpty(LLVM_INSTALL_DIR) {
......
......@@ -60,6 +60,7 @@ Project {
"updateinfo/updateinfo.qbs",
"valgrind/valgrind.qbs",
"vcsbase/vcsbase.qbs",
"welcome/welcome.qbs"
"welcome/welcome.qbs",
"winrt/winrt.qbs"
].concat(project.additionalPlugins)
}
......@@ -70,12 +70,16 @@ const char FEATURE_DESKTOP[] = "QtSupport.Wizards.FeatureDesktop";
const char DESKTOP_PLATFORM[] = "Desktop";
const char EMBEDDED_LINUX_PLATFORM[] = "Embedded Linux";
const char WINDOWS_CE_PLATFORM[] = "Windows CE";
const char WINDOWS_RT_PLATFORM[] = "Windows Runtime";
const char WINDOWS_PHONE_PLATFORM[] = "Windows Phone";
const char ANDROID_PLATFORM[] = "Android";
const char IOS_PLATFORM[] = "iOS";
const char DESKTOP_PLATFORM_TR[] = QT_TRANSLATE_NOOP("QtSupport", "Desktop");
const char EMBEDDED_LINUX_PLATFORM_TR[] = QT_TRANSLATE_NOOP("QtSupport", "Embedded Linux");
const char WINDOWS_CE_PLATFORM_TR[] = QT_TRANSLATE_NOOP("QtSupport", "Windows CE");
const char WINDOWS_RT_PLATFORM_TR[] = QT_TRANSLATE_NOOP("QtSupport", "Windows Runtime");
const char WINDOWS_PHONE_PLATFORM_TR[] = QT_TRANSLATE_NOOP("QtSupport", "Windows Phone");
const char ANDROID_PLATFORM_TR[] = QT_TRANSLATE_NOOP("QtSupport", "Android");
const char IOS_PLATFORM_TR[] = QT_TRANSLATE_NOOP("QtSupport", "iOS");
......
<plugin name=\"WinRt\" version=\"$$QTCREATOR_VERSION\" compatVersion=\"$$QTCREATOR_VERSION\" experimental=\"true\">
<platform>Windows 8</platform>
<vendor>Digia Plc</vendor>
<copyright>(C) 2014 Digia Plc</copyright>
<license>
Commercial Usage
Licensees holding valid Qt Commercial licenses may use this plugin in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Digia.
GNU Lesser General Public License Usage
Alternatively, this plugin may be used under the terms of the GNU Lesser General Public License version 2.1 as published by the Free Software Foundation. Please review the following information to ensure the GNU Lesser General Public License version 2.1 requirements will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
</license>
<category>Device Support</category>
<description>Helper for Windows Runtime projects</description>
<url>http://www.qt-project.org</url>
$$dependencyList
</plugin>
include(../../qtcreatorplugin.pri)
HEADERS += \
winrtconstants.h \
winrtdeployconfiguration.h \
winrtdevice.h \
winrtdevicefactory.h \
winrtpackagedeploymentstep.h \
winrtphoneqtversion.h \
winrtplugin.h \
winrtqtversion.h \
winrtqtversionfactory.h \
winrtrunconfiguration.h \
winrtrunconfigurationwidget.h \
winrtruncontrol.h \
winrtrunfactories.h
SOURCES += \
winrtdeployconfiguration.cpp \
winrtdevice.cpp \
winrtdevicefactory.cpp \
winrtpackagedeploymentstep.cpp \
winrtphoneqtversion.cpp \
winrtplugin.cpp \
winrtqtversion.cpp \
winrtqtversionfactory.cpp \
winrtrunconfiguration.cpp \
winrtrunconfigurationwidget.cpp \
winrtruncontrol.cpp \
winrtrunfactories.cpp
DEFINES += WINRT_LIBRARY
FORMS += \
winrtrunconfigurationwidget.ui
import qbs.base 1.0
import QtcPlugin
QtcPlugin {
name: "WinRt"
minimumQtVersion: "5.0"
Depends { name: "Core" }
Depends { name: "ProjectExplorer" }
Depends { name: "QtSupport" }
Depends { name: "Qt.gui" }
files: [
"winrtconstants.h",
"winrtdeployconfiguration.cpp",
"winrtdeployconfiguration.h",
"winrtdevice.cpp",
"winrtdevice.h",
"winrtdevicefactory.cpp",
"winrtdevicefactory.h",
"winrtpackagedeploymentstep.cpp",
"winrtpackagedeploymentstep.h",
"winrtphoneqtversion.cpp",
"winrtphoneqtversion.h",
"winrtplugin.cpp",
"winrtplugin.h",
"winrtqtversion.cpp",
"winrtqtversion.h",
"winrtqtversionfactory.cpp",
"winrtqtversionfactory.h",
"winrtrunconfiguration.cpp",
"winrtrunconfiguration.h",
"winrtrunconfigurationwidget.cpp",
"winrtrunconfigurationwidget.h",
"winrtrunconfigurationwidget.ui",
"winrtruncontrol.cpp",
"winrtruncontrol.h",
"winrtrunfactories.cpp",
"winrtrunfactories.h"
]
}
QTC_PLUGIN_NAME = WinRt
QTC_PLUGIN_DEPENDS += \
coreplugin \
projectexplorer \
qtsupport
/****************************************************************************
**
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#ifndef WINRTCONSTANTS_H
#define WINRTCONSTANTS_H
namespace WinRt {
namespace Internal {
namespace Constants {
const char WINRT_DEVICE_TYPE_LOCAL[] = "WinRt.Device.Local";
const char WINRT_DEVICE_TYPE_EMULATOR[] = "WinRt.Device.Emulator";
const char WINRT_DEVICE_TYPE_PHONE[] = "WinRt.Device.Phone";
const char WINRT_BUILD_STEP_DEPLOY[] = "WinRt.BuildStep.Deploy";
const char WINRT_WINRTQT[] = "WinRt.QtVersion.WindowsRuntime";
const char WINRT_WINPHONEQT[] = "WinRt.QtVersion.WindowsPhone";
const char WINRT_QTMAP_SUBKEYNAME[] = "WinRt";
const char WINRT_QTMAP_OSFLAVOR[] = "OsFlavor";
const char WINRT_MANIFEST_EDITOR_ID[] = "WinRTManifestEditorID";
}
} // Internal
} // WinRt
#endif // WINRTCONSTANTS_H
/****************************************************************************
**
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#include "winrtdeployconfiguration.h"
#include "winrtpackagedeploymentstep.h"
#include "winrtconstants.h"
#include <projectexplorer/project.h>
#include <projectexplorer/target.h>
#include <projectexplorer/buildsteplist.h>
#include <projectexplorer/projectexplorerconstants.h>
#include <qtsupport/qtkitinformation.h>
using namespace ProjectExplorer;
namespace WinRt {
namespace Internal {
static const char appxDeployConfigurationC[] = "WinRTAppxDeployConfiguration";
static const char phoneDeployConfigurationC[] = "WinRTPhoneDeployConfiguration";
static const char emulatorDeployConfigurationC[] = "WinRTEmulatorDeployConfiguration";
WinRtDeployConfigurationFactory::WinRtDeployConfigurationFactory(QObject *parent)
: DeployConfigurationFactory(parent)
{
}
QString WinRtDeployConfigurationFactory::displayNameForId(const Core::Id id) const
{
if (id == appxDeployConfigurationC)
return tr("Deploy locally");
if (id == phoneDeployConfigurationC)
return tr("Deploy to Windows Phone");
if (id == emulatorDeployConfigurationC)
return tr("Deploy to Windows Phone Emulator");
return QString();
}
QList<Core::Id> WinRtDeployConfigurationFactory::availableCreationIds(Target *parent) const
{
if (!parent->project()->supportsKit(parent->kit()))
return QList<Core::Id>();
IDevice::ConstPtr device = DeviceKitInformation::device(parent->kit());
if (!device)
return QList<Core::Id>();
if (device->type() == Constants::WINRT_DEVICE_TYPE_LOCAL)
return QList<Core::Id>() << Core::Id(appxDeployConfigurationC);
if (device->type() == Constants::WINRT_DEVICE_TYPE_PHONE)
return QList<Core::Id>() << Core::Id(phoneDeployConfigurationC);
if (device->type() == Constants::WINRT_DEVICE_TYPE_EMULATOR)
return QList<Core::Id>() << Core::Id(emulatorDeployConfigurationC);
return QList<Core::Id>();
}
bool WinRtDeployConfigurationFactory::canCreate(Target *parent, const Core::Id id) const
{
return availableCreationIds(parent).contains(id);
}
DeployConfiguration *WinRtDeployConfigurationFactory::create(Target *parent, const Core::Id id)
{
if (id == appxDeployConfigurationC
|| id == phoneDeployConfigurationC
|| id == emulatorDeployConfigurationC) {
return new WinRtDeployConfiguration(parent, id);
}
return 0;
}
bool WinRtDeployConfigurationFactory::canRestore(Target *parent, const QVariantMap &map) const
{
return canCreate(parent, idFromMap(map));
}
DeployConfiguration *WinRtDeployConfigurationFactory::restore(Target *parent,
const QVariantMap &map)
{
WinRtDeployConfiguration *dc = new WinRtDeployConfiguration(parent, idFromMap(map));
if (!dc->fromMap(map)) {
delete dc;
return 0;
}
return dc;
}
bool WinRtDeployConfigurationFactory::canClone(Target *parent, DeployConfiguration *source) const
{
return availableCreationIds(parent).contains(source->id());
}
DeployConfiguration *WinRtDeployConfigurationFactory::clone(Target *parent,
DeployConfiguration *source)
{
if (source->id() == appxDeployConfigurationC
|| source->id() == phoneDeployConfigurationC
|| source->id() == emulatorDeployConfigurationC) {
return new WinRtDeployConfiguration(parent, source);
}
return 0;
}
QList<Core::Id> WinRtDeployStepFactory::availableCreationIds(BuildStepList *parent) const
{
QList<Core::Id> ids;
if (parent->id() != ProjectExplorer::Constants::BUILDSTEPS_DEPLOY)
return ids;
if (!parent->target()->project()->supportsKit(parent->target()->kit()))
return ids;
if (!parent->contains(Constants::WINRT_BUILD_STEP_DEPLOY))
ids << Constants::WINRT_BUILD_STEP_DEPLOY;
return ids;
}
QString WinRtDeployStepFactory::displayNameForId(const Core::Id id) const
{
if (id == Constants::WINRT_BUILD_STEP_DEPLOY)
return tr("Deploy Qt binaries and application files");
return QString();
}
bool WinRtDeployStepFactory::canCreate(BuildStepList *parent, const Core::Id id) const
{
return availableCreationIds(parent).contains(id);
}
BuildStep *WinRtDeployStepFactory::create(BuildStepList *parent, const Core::Id id)
{
if (id == Constants::WINRT_BUILD_STEP_DEPLOY)
return new WinRtPackageDeploymentStep(parent);
return 0;
}
bool WinRtDeployStepFactory::canRestore(BuildStepList *parent, const QVariantMap &map) const
{
return canCreate(parent, idFromMap(map));
}
BuildStep *WinRtDeployStepFactory::restore(BuildStepList *parent, const QVariantMap &map)
{
BuildStep *bs = create(parent, idFromMap(map));
if (!bs->fromMap(map)) {
delete bs;
bs = 0;
}
return bs;
}
bool WinRtDeployStepFactory::canClone(BuildStepList *parent, BuildStep *source) const
{
Q_UNUSED(parent);
Q_UNUSED(source);
return false;
}
BuildStep *WinRtDeployStepFactory::clone(BuildStepList *parent, BuildStep *source)
{
Q_UNUSED(parent);
Q_UNUSED(source);
return 0;
}
WinRtDeployConfiguration::WinRtDeployConfiguration(Target *target, Core::Id id)
: DeployConfiguration(target, id)
{
if (id == appxDeployConfigurationC)
setDefaultDisplayName(tr("Deploy locally"));
if (id == phoneDeployConfigurationC)
setDefaultDisplayName(tr("Deploy to Windows Phone Device"));
if (id == emulatorDeployConfigurationC)
setDefaultDisplayName(tr("Deploy to Windows Phone Emulator"));
stepList()->insertStep(0, new WinRtPackageDeploymentStep(stepList()));
}
WinRtDeployConfiguration::WinRtDeployConfiguration(Target *target, DeployConfiguration *source)
: DeployConfiguration(target, source)
{
cloneSteps(source);
}
} // namespace Internal
} // namespace WinRt
/****************************************************************************
**
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#ifndef WINRTDEPLOYCONFIGURATION_H
#define WINRTDEPLOYCONFIGURATION_H
#include <projectexplorer/deployconfiguration.h>
#include <projectexplorer/buildstep.h>
namespace WinRt {
namespace Internal {
class WinRtDeployConfigurationFactory : public ProjectExplorer::DeployConfigurationFactory
{
public:
explicit WinRtDeployConfigurationFactory(QObject *parent = 0);
QString displayNameForId(const Core::Id id) const;
QList<Core::Id> availableCreationIds(ProjectExplorer::Target *parent) const;
bool canCreate(ProjectExplorer::Target *parent, const Core::Id id) const;
ProjectExplorer::DeployConfiguration *create(ProjectExplorer::Target *parent, const Core::Id id);
bool canRestore(ProjectExplorer::Target *parent, const QVariantMap &map) const;
ProjectExplorer::DeployConfiguration *restore(ProjectExplorer::Target *parent, const QVariantMap &map);
bool canClone(ProjectExplorer::Target *parent, ProjectExplorer::DeployConfiguration *source) const;
ProjectExplorer::DeployConfiguration *clone(ProjectExplorer::Target *parent,
ProjectExplorer::DeployConfiguration *source);
};
class WinRtDeployStepFactory : public ProjectExplorer::IBuildStepFactory
{
public:
QList<Core::Id> availableCreationIds(ProjectExplorer::BuildStepList *parent) const;
QString displayNameForId(const Core::Id id) const;
bool canCreate(ProjectExplorer::BuildStepList *parent, const Core::Id id) const;
ProjectExplorer::BuildStep *create(ProjectExplorer::BuildStepList *parent, const Core::Id id);
bool canRestore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map) const;
ProjectExplorer::BuildStep *restore(ProjectExplorer::BuildStepList *parent, const QVariantMap &map);
bool canClone(ProjectExplorer::BuildStepList *parent, ProjectExplorer::BuildStep *source) const;
ProjectExplorer::BuildStep *clone(ProjectExplorer::BuildStepList *parent,
ProjectExplorer::BuildStep *source);
};
class WinRtDeployConfiguration : public ProjectExplorer::DeployConfiguration
{
private:
friend class WinRtDeployConfigurationFactory;
explicit WinRtDeployConfiguration(ProjectExplorer::Target *target, Core::Id id);
explicit WinRtDeployConfiguration(ProjectExplorer::Target *target,
ProjectExplorer::DeployConfiguration *source);
};
} // namespace Internal
} // namespace WinRt
#endif // WINRTDEPLOYCONFIGURATION_H
/****************************************************************************
**
** Copyright (C) 2014 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#include "winrtdevice.h"
#include "winrtconstants.h"
#include <projectexplorer/devicesupport/devicemanager.h>
#include <projectexplorer/devicesupport/deviceprocesslist.h>
#include <utils/qtcassert.h>
#include <QFileInfo>
#include <QCoreApplication>
#include <QWizard>
using namespace ProjectExplorer;
namespace WinRt {
namespace Internal {
WinRtDevice::WinRtDevice()
{
}
WinRtDevice::WinRtDevice(Core::Id type, MachineType machineType, Core::Id internalId, int deviceId)
: IDevice(type, AutoDetected, machineType, internalId), m_deviceId(deviceId)
{
}
WinRtDevice::WinRtDevice(const WinRtDevice &other)
: IDevice(other), m_deviceId(other.m_deviceId)
{
}
QString WinRtDevice::displayType() const
{
return displayNameForType(type());
}
IDeviceWidget *WinRtDevice::createWidget()
{
return 0;
}
QList<Core::Id> WinRtDevice::actionIds() const
{
return QList<Core::Id>();
}
QString WinRtDevice::displayNameForActionId(Core::Id actionId) const
{
Q_UNUSED(actionId);
return QString();
}
void WinRtDevice::executeAction(Core::Id actionId, QWidget *parent)
{
Q_UNUSED(actionId);
Q_UNUSED(parent);
}
ProjectExplorer::DeviceProcessSignalOperation::Ptr WinRtDevice::signalOperation() const
{
return DeviceProcessSignalOperation::Ptr();
}
void WinRtDevice::fromMap(const QVariantMap &map)
{
IDevice::fromMap(map);
m_deviceId = map.value(QStringLiteral("WinRtRunnerDeviceId")).toInt();
}
QVariantMap WinRtDevice::toMap() const
{
QVariantMap map = IDevice::toMap();
map.insert(QStringLiteral("WinRtRunnerDeviceId"), m_deviceId);
return map;
}
IDevice::Ptr WinRtDevice::clone() const
{
return IDevice::Ptr(new WinRtDevice(*this));
}
QString WinRtDevice::displayNameForType(Core::Id type)
{
if (type == Constants::WINRT_DEVICE_TYPE_LOCAL)
return QCoreApplication::translate("WinRt::Internal::WinRtDevice",
"Windows Runtime (Local)");
if (type == Constants::WINRT_DEVICE_TYPE_PHONE)
return QCoreApplication::translate("WinRt::Internal::WinRtDevice",
"Windows Phone");
if (type == Constants::WINRT_DEVICE_TYPE_EMULATOR)
return QCoreApplication::translate("WinRt::Internal::WinRtDevice",
"Windows Phone Emulator");
return QString();
}
} // Internal
} // WinRt
/****************************************************************************
**
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
** Contact: http://www.qt-project.org/legal
**
** This file is part of Qt Creator.
**
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and Digia. For licensing terms and
** conditions see http://qt.digia.com/licensing. For further information
** use the contact form at http://qt.digia.com/contact-us.
**
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 as published by the Free Software
** Foundation and appearing in the file LICENSE.LGPL included in the
** packaging of this file. Please review the following information to
** ensure the GNU Lesser General Public License version 2.1 requirements
** will be met: http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html.
**
** In addition, as a special exception, Digia gives you certain additional
** rights. These rights are described in the Digia Qt LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
**
****************************************************************************/
#ifndef WINRTDEVICE_H
#define WINRTDEVICE_H
#include <QList>
#include <QUuid>
#include <QSharedPointer>
#include <projectexplorer/devicesupport/idevice.h>
namespace Debugger {
class DebuggerStartParameters;
} // Debugger
namespace WinRt {
namespace Internal {
class WinRtDevice : public ProjectExplorer::IDevice
{
friend class WinRtDeviceFactory;
public:
typedef QSharedPointer<WinRtDevice> Ptr;
typedef QSharedPointer<const WinRtDevice> ConstPtr;
QString displayType() const;
ProjectExplorer::IDeviceWidget *createWidget();
QList<Core::Id> actionIds() const;
QString displayNameForActionId(Core::Id actionId) const;
void executeAction(Core::Id actionId, QWidget *parent);
ProjectExplorer::DeviceProcessSignalOperation::Ptr signalOperation() const;
void fromMap(const QVariantMap &map);
QVariantMap toMap() const;
ProjectExplorer::IDevice::Ptr clone() const;
static QString displayNameForType(Core::Id type);
int deviceId() const { return m_deviceId; }
protected:
WinRtDevice();
WinRtDevice(Core::Id type, MachineType machineType, Core::Id internalId, int deviceId);
WinRtDevice(const WinRtDevice &other);
private:
int m_deviceId;