The QSystemStorageInfo class provides access to disk storage information from the system. More...
#include <QSystemStorageInfo>
Inherits: QObject.
Note: All functions in this class are reentrant.
This class was introduced in Qt Mobility 1.1.
enum | DriveType { NoDrive, InternalDrive, RemovableDrive, RemoteDrive, ..., RamDrive } |
enum | StorageState { UnknownStorageState, NormalStorageState, LowStorageState, VeryLowStorageState, CriticalStorageState } |
QSystemStorageInfo ( QObject * parent = 0 ) | |
~QSystemStorageInfo () | |
qlonglong | availableDiskSpace ( const QString & drive ) |
QSystemStorageInfo::StorageState | getStorageState ( const QString & drive ) |
qlonglong | totalDiskSpace ( const QString & drive ) |
QSystemStorageInfo::DriveType | typeForDrive ( const QString & drive ) |
QString | uriForDrive ( const QString & drive ) |
void | logicalDriveChanged ( bool added, const QString & drive ) |
void | storageStateChanged ( const QString & drive, QSystemStorageInfo::StorageState state ) |
QStringList | logicalDrives () |
The QSystemStorageInfo class provides access to disk storage information from the system.
Note: Most functions in this class are reentrant on all platforms. The exceptions are listed below.
Warning: On Symbian this class does not support QObject::moveToThread().
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 hard drive. |
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. Since 1.2 |
QSystemStorageInfo::RamDrive | 6 | Is a virtual drive made in RAM memory. Since 1.2 |
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 list of logical drives.
Returns a QStringList of drives or volumes, or an empty list if no drives are found.
Warning: On Symbian this function is not reentrant and must be used from main thread only.
Access functions:
QStringList | logicalDrives () |
Notifier signal:
void | logicalDriveChanged ( bool added, const QString & drive ) |
Constructs a QSystemStorageInfo with the given parent.
Destroys the QSystemStorageInfo object.
Returns the amount of available free space on the drive, in bytes.
Returns the storage state of the given drive.
This function was introduced in Qt Mobility 1.2.
This signal gets emitted when a new drive storage has been added or removed. If added is true, it means a new drive is found, otherwise a drive is removed.
This function was introduced in Qt Mobility 1.1.
This signal gets emitted when the storage state of a drive has changed to state. Note that the polling time may be different for different platforms.
This function was introduced in Qt Mobility 1.2.
Returns the amount of total space on the drive, in bytes.
Returns the type of the give drive.
Returns the URI, or unique identifier for the given drive.
This function was introduced in Qt Mobility 1.2.
© 2008-2011 Nokia Corporation and/or its subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation in Finland and/or other countries worldwide.
All other trademarks are property of their respective owners. Privacy Policy
Licensees holding valid Qt Commercial licenses may use this document in accordance with the Qt Commercial License Agreement provided with the Software or, alternatively, in accordance with the terms contained in a written agreement between you and Nokia.
Alternatively, this document may be used under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation.