The QSystemStorageInfo class provides access to memory and disk information from the system. More...
#include <QSystemStorageInfo>
Inherits QObject.
enum | DriveType { NoDrive, InternalDrive, RemovableDrive, RemoteDrive, ..., RamDrive } |
enum | StorageState { UnknownStorageState, NormalStorageState, LowStorageState, VeryLowStorageState, CriticalStorageState } |
QSystemStorageInfo ( QObject * parent = 0 ) | |
~QSystemStorageInfo () |
void | logicalDriveChanged ( bool added, const QString & vol ) |
void | storageStateChanged ( const QString & vol, QSystemStorageInfo::StorageState state ) |
QStringList | logicalDrives () |
The QSystemStorageInfo class provides access to memory and disk information from the system.
This enum describes the type of drive or volume
Constant | Value | Description |
---|---|---|
QSystemStorageInfo::NoDrive | 0 | Drive type undetermined. |
QSystemStorageInfo::InternalDrive | 1 | Is internal mass storage drive like a harddrive. |
QSystemStorageInfo::RemovableDrive | 2 | Is a removable disk like MMC. |
QSystemStorageInfo::RemoteDrive | 3 | Is a network drive. |
QSystemStorageInfo::CdromDrive | 4 | Is a cd rom drive. |
QSystemStorageInfo::InternalFlashDrive | 5 | Is an internal flash disk, or Phone Memory. |
QSystemStorageInfo::RamDrive | 6 | Is a virtual drive made in RAM memory. |
This enum describes the state of the storage level of drive or volume.
Constant | Value | Description |
---|---|---|
QSystemStorageInfo::UnknownStorageState | 0 | Storage level indicates an error, offline or unknown. |
QSystemStorageInfo::NormalStorageState | 1 | Storage level indicates normal. |
QSystemStorageInfo::LowStorageState | 2 | Storage level indicates below 40%. |
QSystemStorageInfo::VeryLowStorageState | 3 | Storage level indicates below 10%. |
QSystemStorageInfo::CriticalStorageState | 4 | Storage level indicates below 2%. |
This property holds the logical drives.
Returns a QStringList of volumes or partitions, or an empty list if no drives are found.
Access functions:
QStringList | logicalDrives () |
Notifier signal:
void | logicalDriveChanged ( bool added, const QString & vol ) |
Constructs a QSystemStorageInfo with the given parent.
Destroys the QSystemStorageInfo object.
This signal gets emitted when new storage has been added or removed from the system.
This signal gets emitted when a volume has changed from one StorageState to another, \vol
being the volume name, and \state
being the new state..