iblqt.widgets.DiskSpaceIndicator

class iblqt.widgets.DiskSpaceIndicator[source]

Bases: ThresholdProgressBar

A progress bar widget that indicates the disk space usage of a directory.

__init__(directory=None, percent_threshold=90, **kwargs)[source]

Initialize DiskSpaceIndicator.

Parameters:
  • directory (Path, str, optional) – The directory to monitor for disk space usage. Default is the root of the current working directory.

  • percent_threshold (int, optional) – The threshold percentage at which the progress bar changes color to red. Default is 90.

  • **kwargs (dict) – Arbitrary keyword arguments (passed to QProgressBar).

Return type:

None

directory()[source]

Get the directory being monitored for disk space usage.

Returns:

The path of the directory being monitored.

Return type:

str

setDirectory(directory)[source]

Set the directory to monitor for disk space usage.

Parameters:

directory (Path, str) – The directory path to monitor.

Return type:

None

updateData()[source]

Update the disk space information.

Return type:

None