Solid::DeviceInterface Class
class Solid::DeviceInterfaceBase class of all the device interfaces. More...
Header: | #include <Solid/DeviceInterface> |
CMake: | find_package(KF6 REQUIRED COMPONENTS Solid) target_link_libraries(mytarget PRIVATE KF6::Solid) |
Inherits: | QObject |
Inherited By: | Solid::Battery, Solid::Block, Solid::Camera, Solid::GenericInterface, Solid::NetworkShare, Solid::PortableMediaPlayer, Solid::Processor, Solid::StorageAccess, Solid::StorageDrive, and Solid::StorageVolume |
Public Types
enum | Type { Unknown, GenericInterface, Processor, Block, StorageAccess, …, NetworkShare } |
Public Functions
bool | isValid() const |
Static Public Members
Solid::DeviceInterface::Type | stringToType(const QString &type) |
(since 4.4) QString | typeDescription(Solid::DeviceInterface::Type type) |
QString | typeToString(Solid::DeviceInterface::Type type) |
Detailed Description
A device interface describes what a device can do. A device generally has a set of device interfaces.
Member Type Documentation
enum DeviceInterface::Type
This enum type defines the type of device interface that a Device can have.
Constant | Value | Description |
---|---|---|
Solid::DeviceInterface::Unknown | 0 | An undetermined device interface |
Solid::DeviceInterface::GenericInterface | 1 | |
Solid::DeviceInterface::Processor | 2 | A processor |
Solid::DeviceInterface::Block | 3 | A block device |
Solid::DeviceInterface::StorageAccess | 4 | A mechanism to access data on a storage device |
Solid::DeviceInterface::StorageDrive | 5 | A storage drive |
Solid::DeviceInterface::OpticalDrive | 6 | An optical drive (CD-ROM, DVD, ...) |
Solid::DeviceInterface::StorageVolume | 7 | A volume |
Solid::DeviceInterface::OpticalDisc | 8 | An optical disc |
Solid::DeviceInterface::Camera | 9 | A digital camera |
Solid::DeviceInterface::PortableMediaPlayer | 10 | A portable media player |
Solid::DeviceInterface::Battery | 12 | |
Solid::DeviceInterface::NetworkShare | 14 | A network share interface |
Member Function Documentation
bool DeviceInterface::isValid() const
Indicates if this device interface is valid.
A device interface is considered valid if the device it is referring is available in the system.
Returns true
if this device interface's device is available, false
otherwise
[static]
Solid::DeviceInterface::Type DeviceInterface::stringToType(const QString &type)
Returns the device interface type for the given class name
[static, since 4.4]
QString DeviceInterface::typeDescription(Solid::DeviceInterface::Type type)
Returns a description suitable to display in the UI of the device interface type
This function was introduced in 4.4.
[static]
QString DeviceInterface::typeToString(Solid::DeviceInterface::Type type)
Returns the class name of the device interface type