Solid::Ifaces::OpticalDrive Class
class Solid::Ifaces::OpticalDriveHeader: | #include <OpticalDrive> |
CMake: | find_package(KF6 REQUIRED COMPONENTS Solid) target_link_libraries(mytarget PRIVATE KF6::Solid) |
Inherits: | Solid::Ifaces::StorageDrive |
Public Functions
virtual | ~OpticalDrive() override |
virtual bool | eject() = 0 |
virtual int | readSpeed() const = 0 |
virtual Solid::OpticalDrive::MediumTypes | supportedMedia() const = 0 |
virtual int | writeSpeed() const = 0 |
virtual QList<int> | writeSpeeds() const = 0 |
Protected Functions
virtual void | ejectPressed(const QString &udi) = 0 |
Detailed Description
This device interface is available on CD-ROM drives.
A Cdrom is a storage that can handle optical discs.
Member Function Documentation
[override virtual noexcept]
OpticalDrive::~OpticalDrive()
Destroys a Cdrom object.
[pure virtual]
bool OpticalDrive::eject()
Ejects any disc that could be contained in this drive. If this drive is empty, but has a tray it'll be opened
@return
[pure virtual protected]
void OpticalDrive::ejectPressed(const QString &udi)
This signal is emitted when the eject button is pressed on the drive.
Please note that some (broken) drives doesn't report this event. @param udi the UDI of the drive
[pure virtual]
int OpticalDrive::readSpeed() const
Retrieves the maximum read speed of this drive in kilobytes.
@return the maximum read speed
[pure virtual]
Solid::OpticalDrive::MediumTypes OpticalDrive::supportedMedia() const
Retrieves the medium types this drive supports.
@return the flag set indicating the supported medium types
[pure virtual]
int OpticalDrive::writeSpeed() const
Retrieves the maximum write speed of this drive in kilobytes.
@return the maximum write speed
[pure virtual]
QList<int> OpticalDrive::writeSpeeds() const
Retrieves the list of supported write speeds of this drive in kilobytes.
@return the list of supported write speeds