Solid
Go to the documentation of this file. 24 #include <solid/ifaces/deviceinterface.h> 26 #include <QtCore/QMetaEnum> 34 d->setBackendObject(backendObject);
47 return d->backendObject()!=0;
52 int index = staticMetaObject.indexOfEnumerator(
"Type");
53 QMetaEnum metaEnum = staticMetaObject.enumerator(index);
54 return QString(metaEnum.valueToKey((
int)type));
59 int index = staticMetaObject.indexOfEnumerator(
"Type");
60 QMetaEnum metaEnum = staticMetaObject.enumerator(index);
61 return (
Type)metaEnum.keyToValue(type.toUtf8());
69 return QObject::tr(
"Unknown",
"Unknown device type");
71 return QObject::tr(
"Generic Interface",
"Generic Interface device type");
73 return QObject::tr(
"Processor",
"Processor device type");
75 return QObject::tr(
"Block",
"Block device type");
77 return QObject::tr(
"Storage Access",
"Storage Access device type");
79 return QObject::tr(
"Storage Drive",
"Storage Drive device type");
81 return QObject::tr(
"Optical Drive",
"Optical Drive device type");
83 return QObject::tr(
"Storage Volume",
"Storage Volume device type");
85 return QObject::tr(
"Optical Disc",
"Optical Disc device type");
87 return QObject::tr(
"Camera",
"Camera device type");
89 return QObject::tr(
"Portable Media Player",
"Portable Media Player device type");
91 return QObject::tr(
"Network Interface",
"Network Interface device type");
93 return QObject::tr(
"Ac Adapter",
"Ac Adapter device type");
95 return QObject::tr(
"Battery",
"Battery device type");
97 return QObject::tr(
"Button",
"Button device type");
99 return QObject::tr(
"Audio Interface",
"Audio Interface device type");
101 return QObject::tr(
"Dvb Interface",
"Dvb Interface device type");
103 return QObject::tr(
"Video",
"Video device type");
105 return QObject::tr(
"Serial Interface",
"Serial Interface device type");
107 return QObject::tr(
"Smart Card Reader",
"Smart Card Reader device type");
109 return QObject::tr(
"Internet Gateway Device",
"Internet Gateway device type");
111 return QObject::tr(
"Network Share",
"Network Share device type");
131 return m_backendObject.data();
136 m_backendObject = object;
141 return m_devicePrivate;
149 #include "deviceinterface.moc"
virtual ~DeviceInterface()
Destroys a DeviceInterface object.
bool isValid() const
Indicates if this device interface is valid.
static QString typeToString(Type type)
void setBackendObject(QObject *object)
DevicePrivate * devicePrivate() const
DeviceInterfacePrivate * d_ptr
Base class of all the device interfaces.
Type
This enum type defines the type of device interface that a Device can have.
void setDevicePrivate(DevicePrivate *devicePrivate)
QObject * backendObject() const
static Type stringToType(const QString &type)
static QString typeDescription(Type type)
virtual ~DeviceInterfacePrivate()
DeviceInterface(DeviceInterfacePrivate &dd, QObject *backendObject)
This file is part of the KDE documentation.
Documentation copyright © 1996-2017 The KDE developers.
Generated on Sat May 13 2017 06:40:59 by
doxygen 1.8.13 written
by
Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.