summaryrefslogtreecommitdiff
path: root/src/plugins/remotelinux/linuxdeviceconfiguration.h
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@nokia.com>2012-03-05 12:37:32 +0100
committerChristian Kandeler <christian.kandeler@nokia.com>2012-03-07 12:18:44 +0100
commiteffe56ef1228ec372a0d7b5a3bda0a1db25f39b4 (patch)
tree2c140dfde2173a3af530ff6d726685b8ffc15381 /src/plugins/remotelinux/linuxdeviceconfiguration.h
parentbe1afbd6bb59d50c8d5ed1e69ea27a6fe0fee945 (diff)
downloadqt-creator-effe56ef1228ec372a0d7b5a3bda0a1db25f39b4.tar.gz
RemoteLinux: More preparations for introducing an abstract device class.
- Introduce clone() method. - Rename "osType" to "type" and "deviceType" to "machineType". - Move machine type display out of generic settings widget. - Put only immutable attributes into the device constructor and set the others via setters. As part of this, also give the SshConnectionParameters a default proxy type. The necessity to give one to the constructor explicitly was for historical reasons. Change-Id: I84757b1b2d6371544b9ab1f3290973e5498176ce Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Diffstat (limited to 'src/plugins/remotelinux/linuxdeviceconfiguration.h')
-rw-r--r--src/plugins/remotelinux/linuxdeviceconfiguration.h26
1 files changed, 12 insertions, 14 deletions
diff --git a/src/plugins/remotelinux/linuxdeviceconfiguration.h b/src/plugins/remotelinux/linuxdeviceconfiguration.h
index 70227cdf4d..77ee781c4d 100644
--- a/src/plugins/remotelinux/linuxdeviceconfiguration.h
+++ b/src/plugins/remotelinux/linuxdeviceconfiguration.h
@@ -67,7 +67,7 @@ public:
typedef quint64 Id;
- enum DeviceType { Hardware, Emulator };
+ enum MachineType { Hardware, Emulator };
enum Origin { ManuallyAdded, AutoDetected };
~LinuxDeviceConfiguration();
@@ -75,8 +75,8 @@ public:
Utils::PortList freePorts() const;
Utils::SshConnectionParameters sshParameters() const;
QString displayName() const;
- QString osType() const;
- DeviceType deviceType() const;
+ QString type() const;
+ MachineType machineType() const;
Id internalId() const;
bool isAutoDetected() const;
QVariantHash attributes() const;
@@ -92,22 +92,18 @@ public:
static const Id InvalidId;
static Ptr create();
- static Ptr create(const QString &name, const QString &osType, DeviceType deviceType,
- const Utils::PortList &freePorts, const Utils::SshConnectionParameters &sshParams,
- const QVariantHash &attributes = QVariantHash(), Origin origin = ManuallyAdded);
+ static Ptr create(const QString &name, const QString &type, MachineType machineType,
+ Origin origin = ManuallyAdded);
private:
LinuxDeviceConfiguration();
- LinuxDeviceConfiguration(const QString &name, const QString &osType, DeviceType deviceType,
- const Utils::PortList &freePorts, const Utils::SshConnectionParameters &sshParams,
- const QVariantHash &attributes, Origin origin);
+ LinuxDeviceConfiguration(const QString &name, const QString &type, MachineType machineType,
+ Origin origin);
LinuxDeviceConfiguration(const QSettings &settings);
- LinuxDeviceConfiguration(const ConstPtr &other);
- LinuxDeviceConfiguration(const LinuxDeviceConfiguration &);
+ LinuxDeviceConfiguration(const LinuxDeviceConfiguration &other);
LinuxDeviceConfiguration &operator=(const LinuxDeviceConfiguration &);
static Ptr create(const QSettings &settings);
- static Ptr create(const ConstPtr &other);
void setDisplayName(const QString &name);
void setInternalId(Id id);
@@ -116,6 +112,8 @@ private:
void fromMap(const QVariantMap &map);
QVariantMap toMap() const;
+ Ptr clone() const;
+
Internal::LinuxDeviceConfigurationPrivate *d;
};
@@ -205,12 +203,12 @@ public:
/*!
Returns true iff this factory supports the given device type.
*/
- virtual bool supportsOsType(const QString &osType) const = 0;
+ virtual bool supportsDeviceType(const QString &type) const = 0;
/*!
Returns a human-readable string for the given OS type, if this factory supports that type.
*/
- virtual QString displayNameForOsType(const QString &osType) const = 0;
+ virtual QString displayType(const QString &type) const = 0;
/*!
Returns a list of ids representing actions that can be run on device configurations