41 #ifndef YQPkgDiskUsageList_h
42 #define YQPkgDiskUsageList_h
44 #include <zypp/DiskUsageCounter.h>
45 #include <QY2DiskUsageList.h>
50 typedef zypp::DiskUsageCounter::MountPoint ZyppPartitionDu;
213 QMap<QString, YQPkgDiskUsageListItem*> _items;
238 ZyppPartitionDu
partitionDu()
const {
return _partitionDu; }
264 virtual QString
name()
const;
271 virtual QString
deviceName()
const {
return ""; }
285 ZyppPartitionDu _partitionDu;
291 #endif // ifndef YQPkgDiskUsageList_h
Helper class to manage warnings that are to be issued when a value enters a predefined range,...
virtual FSize totalSize() const
The total size of this partition.
void clear()
Clear the current values, i.e.
void clearHistory()
Clear everything, including all history values such as if a warning has been posted.
virtual QSize sizeHint() const
Suggest reasonable default size.
void checkRemainingDiskSpace()
Check the remaining disk space of this partition based on percentage and absolute free MB.
YQPkgWarningRangeNotifier overflowWarning
Warning range notifier about disk space overflow warning.
bool inRange() const
Check if the value is in range, i.e.
YQPkgDiskUsageListItem(YQPkgDiskUsageList *parent, const ZyppPartitionDu &partitionDu)
Constructor.
virtual void keyPressEvent(QKeyEvent *ev)
Event handler for keyboard input - for debugging and testing.
YQPkgDiskUsageList(QWidget *parent, int thresholdPercent=0)
Constructor.
virtual QString name() const
The name to display for this partition ( the mount point ).
void updateDiskUsage()
Update all statistical data in the list.
virtual QString deviceName() const
The device name of this partition.
YQPkgWarningRangeNotifier runningOutWarning
Warning range notifier about running out of disk space warning.
YQPkgWarningRangeNotifier()
Constructor.
bool needWarning() const
Check if a warning should be posted, i.e.
ZyppPartitionDu partitionDu() const
Returns the corresponding disk usage data.
List of disk usage of all attached partitions.
virtual ~YQPkgDiskUsageList()
Destructor.
void enterRange()
Notification that the inner range is entered.
virtual FSize usedSize() const
The currently used size of this partition.
bool leavingProximity() const
Check if the value is leaving the proximity range.
virtual ~YQPkgDiskUsageListItem()
Destructor.
void enterProximity()
Notification that the proximity range is entered, i.e.
void updateDuData(const ZyppPartitionDu &fromData)
Update the disk usage data.
void postPendingWarnings()
Post all pending disk space warnings based on the warning range notifiers.
void warningPostedNotify()
Notification that a warning has been posted.