Solid::OpticalDrive Class
class Solid::OpticalDriveThis device interface is available on CD-R*,DVD*,Blu-Ray,HD-DVD drives. More...
Header: | #include <Solid/OpticalDrive> |
CMake: | find_package(KF6 REQUIRED COMPONENTS Solid) target_link_libraries(mytarget PRIVATE KF6::Solid) |
Inherits: | Solid::StorageDrive |
Public Types
enum | MediumType { UnknownMediumType, Cdr, Cdrw, Dvd, Dvdr, …, HdDvdrw } |
flags | MediumTypes |
Properties
- readSpeed : const int
- supportedMedia : const MediumTypes
- writeSpeed : const int
- writeSpeeds : const QList<int>
Public Functions
bool | eject() |
int | readSpeed() const |
Solid::OpticalDrive::MediumTypes | supportedMedia() const |
int | writeSpeed() const |
QList<int> | writeSpeeds() const |
Signals
void | ejectDone(Solid::ErrorType error, QVariant errorData, const QString &udi) |
void | ejectPressed(const QString &udi) |
void | ejectRequested(const QString &udi) |
Static Public Members
Solid::DeviceInterface::Type | deviceInterfaceType() |
Detailed Description
An OpticalDrive is a storage that can handle optical discs.
Member Type Documentation
enum OpticalDrive::MediumType
flags OpticalDrive::MediumTypes
This enum type defines the type of medium an optical drive supports.
Constant | Value | Description |
---|---|---|
Solid::OpticalDrive::UnknownMediumType | 0x00000 | |
Solid::OpticalDrive::Cdr | 0x00001 | A Recordable Compact Disc (CD-R) |
Solid::OpticalDrive::Cdrw | 0x00002 | A ReWritable Compact Disc (CD-RW) |
Solid::OpticalDrive::Dvd | 0x00004 | A Digital Versatile Disc (DVD) |
Solid::OpticalDrive::Dvdr | 0x00008 | A Recordable Digital Versatile Disc (DVD-R) |
Solid::OpticalDrive::Dvdrw | 0x00010 | A ReWritable Digital Versatile Disc (DVD-RW) |
Solid::OpticalDrive::Dvdram | 0x00020 | A Random Access Memory Digital Versatile Disc (DVD-RAM) |
Solid::OpticalDrive::Dvdplusr | 0x00040 | A Recordable Digital Versatile Disc (DVD+R) |
Solid::OpticalDrive::Dvdplusrw | 0x00080 | A ReWritable Digital Versatile Disc (DVD+RW) |
Solid::OpticalDrive::Dvdplusdl | 0x00100 | A Dual Layer Digital Versatile Disc (DVD+R DL) |
Solid::OpticalDrive::Dvdplusdlrw | 0x00200 | A Dual Layer Digital Versatile Disc (DVD+RW DL) |
Solid::OpticalDrive::Bd | 0x00400 | A Blu-ray Disc (BD) |
Solid::OpticalDrive::Bdr | 0x00800 | A Blu-ray Disc Recordable (BD-R) |
Solid::OpticalDrive::Bdre | 0x01000 | A Blu-ray Disc Recordable and Eraseable (BD-RE) |
Solid::OpticalDrive::HdDvd | 0x02000 | A High Density Digital Versatile Disc (HD DVD) |
Solid::OpticalDrive::HdDvdr | 0x04000 | A High Density Digital Versatile Disc Recordable (HD DVD-R) |
Solid::OpticalDrive::HdDvdrw | 0x08000 | A High Density Digital Versatile Disc ReWritable (HD DVD-RW) |
The MediumTypes type is a typedef for QFlags<MediumType>. It stores an OR combination of MediumType values.
Property Documentation
[read-only]
readSpeed : const int
Access functions:
int | readSpeed() const |
[read-only]
supportedMedia : const MediumTypes
Access functions:
Solid::OpticalDrive::MediumTypes | supportedMedia() const |
[read-only]
writeSpeed : const int
Access functions:
int | writeSpeed() const |
[read-only]
writeSpeeds : const QList<int>
Access functions:
QList<int> | writeSpeeds() const |
Member Function Documentation
[static]
Solid::DeviceInterface::Type OpticalDrive::deviceInterfaceType()
Get the Solid::DeviceInterface::Type of the OpticalDrive device interface.
Returns the OpticalDrive device interface type
See also Solid::Ifaces::Enums::DeviceInterface::Type.
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.
Returns the status of the eject operation
[signal]
void OpticalDrive::ejectDone(Solid::ErrorType error, QVariant errorData, const QString &udi)
This signal is emitted when the attempted eject process on this drive is completed. The signal might be spontaneous, i.e. it can be triggered by another process.
error type of error that occurred, if any
errorData more information about the error, if any
udi the UDI of the volume
[signal]
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.
udi the UDI of the drive
[signal]
void OpticalDrive::ejectRequested(const QString &udi)
This signal is emitted when eject on this drive is requested. The signal might be spontaneous, i.e. it can be triggered by another process.
udi the UDI of the volume
int OpticalDrive::readSpeed() const
Retrieves the maximum read speed of this drive in kilobytes per second.
Returns the maximum read speed
Note: Getter function for property readSpeed.
Solid::OpticalDrive::MediumTypes OpticalDrive::supportedMedia() const
Retrieves the medium types this drive supports.
Returns the flag set indicating the supported medium types
Note: Getter function for property supportedMedia.
int OpticalDrive::writeSpeed() const
Retrieves the maximum write speed of this drive in kilobytes per second.
Returns the maximum write speed
Note: Getter function for property writeSpeed.
QList<int> OpticalDrive::writeSpeeds() const
Retrieves the list of supported write speeds of this drive in kilobytes per second.
Returns the list of supported write speeds
Note: Getter function for property writeSpeeds.