iblrig.gui.tools.DiskSpaceIndicator

Inheritance diagram of DiskSpaceIndicator

class iblrig.gui.tools.DiskSpaceIndicator[source]

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

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

Initialize the DiskSpaceIndicator with the specified directory and threshold percentage.

Parameters:
  • *args (tuple) – Variable length argument list (passed to QProgressBar).

  • directory (Path or None) – The directory path to monitor for disk space usage.

  • 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).

Parameters:
  • directory (Path | None)

  • percent_threshold (int)

update_data()[source]

Update the disk space information.

property critical: bool

True if the disk space usage is above the given threshold percentage.