Home · All Namespaces · All Classes · Grouped Classes · Modules · Functions codeless banner

StorageMonitor Class Reference
[QtBaseModule]

The StorageMonitor class periodically checks filesystems for available space and prompts to start the cleanup wizard if low. More...

    #include <StorageMonitor>

Inherits QObject.

Additional Inherited Members


Detailed Description

The StorageMonitor class periodically checks filesystems for available space and prompts to start the cleanup wizard if low.

Periodically the StorageMonitor class examines the writable filesystems for free space. The polling frequency can be controlled through configuration. If the amount of free space, summed across all writable filesystems, is found to be below a configurable limit, a dialog box is displayed prompting the user to delete unwanted documents. If an application providing the CleanupWizard service is installed, the user can also directly launch the cleanup wizard.

As it is primarily a graphical feature, to preserve power the storage monitor suspends polling while the device's screen is turned off, on the rationale that the user is probably not present or interacting with the device.

The StorageMonitor class is configured through the Trolltech/qpe settings file. The following keys control the configuration.

KeyDescription
StorageMonitor/EnabledSet to false if the storage monitor is to be disabled. By default this value is true and the storage monitor is enabled.
StorageMonitor/UpdatePeriodThe rate, in seconds, at which the storage monitor polls the filesystems. By default this is 60 seconds.
StorageMonitor/MinimalStorageLimitWhen the total free space summed across all writable filesystems is below this value, in percent, the storage monitor dialog will be triggered. By default this is 10 percent. Note that MaxAbsolute and MinAbsolute can override certain aspects of this condition. Setting this value to 0 disables relative storage alarms.
StorageMonitor/MaxAbsoluteThe storage monitor will never be triggered unless the total free space is below this value (no matter what the relative minimalStorageLimit value is set to). This value is measured in megabyte and defaults to 100 MB. Setting this value to 0 causes the monitor to ignore this type of alarm adjustment.
StorageMonitor/MinAbsoluteThe storage monitor will always be triggered if the absolute amount of remaining storage space is below this value (no matter what the relative MinimalStorageLimit value is set to). This value is measured in megabyte and defaults to 1 MB. Setting this value to 0 causes the monitor to ignore this type of alarm adjustment. MinAbsolute takes precedence if MaxAbsolute >= MinAbsolute.

    #Trolltech/qpe.conf
    [StorageMonitor]
    MinimalStorageLimit=7
    MaxAbsolute=200
    MinAbsolute=5

The above example triggers the monitor alarm if the total free space is below 7% but not if the free space is above 200MB (for devices with big file systems). It also triggers the alarm if the device's total free space drops below 5MB even if that equates to more than 7% of the total space (for devices with small file systems).

Polls, by default, every 60 seconds, but pauses when screen is off or there are no writable file systems. Checks for CleanupWizard service.

This class is part of the Qt Extended server and cannot be used by other Qt Extended applications.


Copyright © 2009 Nokia Trademarks
Qt Extended 4.4.3