1
/****************************************************************************
3
** Copyright (C) 2013 Digia Plc and/or its subsidiary(-ies).
4
** Contact: http://www.qt-project.org/legal
6
** This file is part of Qt Creator.
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.
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.
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.
28
****************************************************************************/
29
#include "maddedevice.h"
31
#include "maddedevicetester.h"
32
#include "maemoconstants.h"
34
#include <remotelinux/linuxdevicetestdialog.h>
35
#include <remotelinux/publickeydeploymentdialog.h>
36
#include <remotelinux/remotelinux_constants.h>
37
#include <utils/qtcassert.h>
39
using namespace ProjectExplorer;
40
using namespace RemoteLinux;
45
MaddeDevice::Ptr MaddeDevice::create()
47
return Ptr(new MaddeDevice);
50
MaddeDevice::Ptr MaddeDevice::create(const QString &name, Core::Id type,
51
MachineType machineType, Origin origin, Core::Id id)
53
return Ptr(new MaddeDevice(name, type, machineType, origin, id));
56
MaddeDevice::MaddeDevice()
60
MaddeDevice::MaddeDevice(const QString &name, Core::Id type, MachineType machineType,
61
Origin origin, Core::Id id)
62
: LinuxDevice(name, type, machineType, origin, id)
66
MaddeDevice::MaddeDevice(const MaddeDevice &other) : LinuxDevice(other)
70
ProjectExplorer::IDevice::Ptr MaddeDevice::clone() const
72
return Ptr(new MaddeDevice(*this));
75
QString MaddeDevice::displayType() const
77
return maddeDisplayType(type());
80
QString MaddeDevice::maddeDisplayType(Core::Id type)
82
if (type == Maemo5OsType)
83
return tr("Maemo5/Fremantle");
84
if (type == HarmattanOsType)
85
return tr("MeeGo 1.2 Harmattan");
86
QTC_ASSERT(false, return QString());
87
return QString(); // For crappy compilers.
90
bool MaddeDevice::allowsRemoteMounts(Core::Id type)
92
return type == Maemo5OsType;
95
bool MaddeDevice::allowsPackagingDisabling(Core::Id type)
97
return type == Maemo5OsType;
100
bool MaddeDevice::allowsQmlDebugging(Core::Id type)
102
return type == HarmattanOsType;
105
QSize MaddeDevice::packageManagerIconSize(Core::Id type)
107
if (type == Maemo5OsType)
108
return QSize(48, 48);
109
if (type == HarmattanOsType)
110
return QSize(64, 64);
114
AbstractLinuxDeviceTester *MaddeDevice::createDeviceTester() const
116
return new MaddeDeviceTester;
119
} // namespace Internal