A class which describes an optical disc drive in the system. More...
Public Member Functions | |
QtlOpticalDrive () | |
Constructor. More... | |
QString | burnerDeviceName () const |
Get the drive device name for burning media. More... | |
bool | canReadBluRay () const |
Check if the drive can read Blu-Ray media. More... | |
bool | canReadCd () const |
Check if the drive can read CD media. More... | |
bool | canReadDvd () const |
Check if the drive can read DVD media. More... | |
bool | canWriteBluRay () const |
Check if the drive can write Blu-Ray media. More... | |
bool | canWriteCd () const |
Check if the drive can write CD media. More... | |
bool | canWriteDvd () const |
Check if the drive can write DVD media. More... | |
QString | deviceName () const |
Get the drive device name. More... | |
bool | isValid () const |
Check if a drive is valid, ie. More... | |
QString | name () const |
Get the drive name. More... | |
QString | productId () const |
Get the device product id. More... | |
QString | productRevision () const |
Get the device product revision. More... | |
QString | vendorId () const |
Get the device vendor id. More... | |
Static Public Member Functions | |
static QtlOpticalDrive | firstBluRayReader () |
Locate the first Blu-Ray reader in the system. More... | |
static QtlOpticalDrive | firstBluRayWriter () |
Locate the first Blu-Ray writer in the system. More... | |
static QtlOpticalDrive | firstCdReader () |
Locate the first CD reader in the system. More... | |
static QtlOpticalDrive | firstCdWriter () |
Locate the first CD writer in the system. More... | |
static QtlOpticalDrive | firstDvdReader () |
Locate the first DVD reader in the system. More... | |
static QtlOpticalDrive | firstDvdWriter () |
Locate the first DVD writer in the system. More... | |
static QList< QtlOpticalDrive > | getAllDrives () |
Get the list of all optical drives in the system. More... | |
static QtlOpticalDrive | getDrive (const QString &name) |
Get the description of a drive. More... | |
Static Private Member Functions | |
static QtlOpticalDrive | firstDriveWithCheck (bool QtlOpticalDrive::*check) |
Locate the first drive in the system matching a boolean member. More... | |
static bool | lessThanByName (const QtlOpticalDrive &o1, const QtlOpticalDrive &o2) |
A function helper to sort optical drives by name. More... | |
static void | updateCapability (QList< QtlOpticalDrive > &drives, const QStringList &fields, bool QtlOpticalDrive::*capability) |
Update a boolean field in all elements in an array of QtlOpticalDrive. More... | |
Private Attributes | |
QString | _burnerDeviceName |
Drive device name for burning operations. More... | |
bool | _canReadBluRay |
The drive can read Blu-Ray media. More... | |
bool | _canReadCd |
The drive can read CD media. More... | |
bool | _canReadDvd |
The drive can read DVD media. More... | |
bool | _canWriteBluRay |
The drive can write Blu-Ray media. More... | |
bool | _canWriteCd |
The drive can write CD media. More... | |
bool | _canWriteDvd |
The drive can write DVD media. More... | |
QString | _deviceName |
Drive device name. More... | |
QString | _name |
Drive name. More... | |
QString | _productId |
Device product id. More... | |
QString | _productRevision |
Device product revision. More... | |
QString | _vendorId |
Device vendor id. More... | |
A class which describes an optical disc drive in the system.
Limitation: Implemented on Windows, Mac and Linux only.
QtlOpticalDrive::QtlOpticalDrive | ( | ) |
Constructor.
|
static |
Get the list of all optical drives in the system.
|
static |
|
inline |
Check if a drive is valid, ie.
contains the description of a real existing drive.
|
inline |
Get the drive name.
All existing drives have a name. But, on Mac, a drive has no device name if the drive is empty. On Mac, a drive has a device name only when a media is inserted and when the media is ejected and another one inserted later, the device name may have changed.
|
inline |
|
inline |
Get the drive device name for burning media.
On some systems like Mac OS X, the general device name of the drive to mount a device deviceName() and the device name to burn a media in the drive is not the same.
|
inline |
Get the device vendor id.
|
inline |
Get the device product id.
|
inline |
Get the device product revision.
|
inline |
Check if the drive can read CD media.
|
inline |
Check if the drive can write CD media.
|
inline |
Check if the drive can read DVD media.
|
inline |
Check if the drive can write DVD media.
|
inline |
Check if the drive can read Blu-Ray media.
|
inline |
Check if the drive can write Blu-Ray media.
|
inlinestatic |
Locate the first CD reader in the system.
|
inlinestatic |
Locate the first CD writer in the system.
|
inlinestatic |
Locate the first DVD reader in the system.
|
inlinestatic |
Locate the first DVD writer in the system.
|
inlinestatic |
Locate the first Blu-Ray reader in the system.
|
inlinestatic |
Locate the first Blu-Ray writer in the system.
|
staticprivate |
Locate the first drive in the system matching a boolean member.
[in] | check | Pointer to bool member to check. Typically one of _canReadBluRay(), _canWriteDvd, etc. |
|
inlinestaticprivate |
A function helper to sort optical drives by name.
[in] | o1 | First object to compare. |
[in] | o2 | Second object to compare. |
|
staticprivate |
Update a boolean field in all elements in an array of QtlOpticalDrive.
[in,out] | drives | Array of QtlOpticalDrive to update. |
[in] | fields | Array of strings, one for each element in
|
[in] | capability | Pointer to bool member to update. Typically one of _canReadBluRay(), _canWriteDvd, etc. |
|
private |
Drive name.
|
private |
Drive device name.
|
private |
Drive device name for burning operations.
|
private |
Device vendor id.
|
private |
Device product id.
|
private |
Device product revision.
|
private |
The drive can read CD media.
|
private |
The drive can write CD media.
|
private |
The drive can read DVD media.
|
private |
The drive can write DVD media.
|
private |
The drive can read Blu-Ray media.
|
private |
The drive can write Blu-Ray media.