QtMobility Reference Documentation

QSystemStorageInfo Class Reference

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.

Public Types

enum DriveType { NoDrive, InternalDrive, RemovableDrive, RemoteDrive, ..., RamDrive }
enum StorageState { UnknownStorageState, NormalStorageState, LowStorageState, VeryLowStorageState, CriticalStorageState }

Properties

  • 1 property inherited from QObject

Public Functions

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 )
  • 29 public functions inherited from QObject

Signals

void logicalDriveChanged ( bool added, const QString & drive )
void storageStateChanged ( const QString & drive, QSystemStorageInfo::StorageState state )

Static Public Members

QStringList logicalDrives ()
  • 4 static public members inherited from QObject

Additional Inherited Members

  • 1 public slot inherited from QObject
  • 1 public variable inherited from QObject
  • 7 protected functions inherited from QObject
  • 2 protected variables inherited from QObject

Detailed Description

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.

Note: In Symbian platform this class is not reentrant since Symbian Belle (Qt Mobility version 1.2).

Warning: On Symbian this class does not support QObject::moveToThread().

Member Type Documentation

enum QSystemStorageInfo::DriveType

This enum describes the type of drive or volume

ConstantValueDescription
QSystemStorageInfo::NoDrive0Drive type undetermined.
QSystemStorageInfo::InternalDrive1Is internal mass storage drive like a hard drive.
QSystemStorageInfo::RemovableDrive2Is a removable disk like MMC.
QSystemStorageInfo::RemoteDrive3Is a network drive.
QSystemStorageInfo::CdromDrive4Is a cd rom drive.
QSystemStorageInfo::InternalFlashDrive5Is an internal flash disk, or Phone Memory. Since 1.2
QSystemStorageInfo::RamDrive6Is a virtual drive made in RAM memory. Since 1.2

enum QSystemStorageInfo::StorageState

This enum describes the state of the storage level of drive or volume.

ConstantValueDescription
QSystemStorageInfo::UnknownStorageState0Storage level indicates an error, offline or unknown.
QSystemStorageInfo::NormalStorageState1Storage level indicates normal.
QSystemStorageInfo::LowStorageState2Storage level indicates below 40%.
QSystemStorageInfo::VeryLowStorageState3Storage level indicates below 10%.
QSystemStorageInfo::CriticalStorageState4Storage level indicates below 2%.

Property Documentation

logicalDrives : const QStringList

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 )

Member Function Documentation

QSystemStorageInfo::QSystemStorageInfo ( QObject * parent = 0 )

Constructs a QSystemStorageInfo with the given parent.

QSystemStorageInfo::~QSystemStorageInfo ()

Destroys the QSystemStorageInfo object.

qlonglong QSystemStorageInfo::availableDiskSpace ( const QString & drive )

Returns the amount of available free space on the drive, in bytes.

QSystemStorageInfo::StorageState QSystemStorageInfo::getStorageState ( const QString & drive )

Returns the storage state of the given drive.

This function was introduced in Qt Mobility 1.2.

void QSystemStorageInfo::logicalDriveChanged ( bool added, const QString & drive ) [signal]

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.

void QSystemStorageInfo::storageStateChanged ( const QString & drive, QSystemStorageInfo::StorageState state ) [signal]

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.

qlonglong QSystemStorageInfo::totalDiskSpace ( const QString & drive )

Returns the amount of total space on the drive, in bytes.

QSystemStorageInfo::DriveType QSystemStorageInfo::typeForDrive ( const QString & drive )

Returns the type of the give drive.

QString QSystemStorageInfo::uriForDrive ( const QString & drive )

Returns the URI, or unique identifier for the given drive.

This function was introduced in Qt Mobility 1.2.

X

Thank you for giving your feedback.

Make sure it is related to this specific page. For more general bugs and requests, please use the Qt Bug Tracker.