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;
264 virtual QString
name()
const;
300 void init(
bool allFields );
306 void setText(
int column,
const QString & text )
307 { QTreeWidgetItem::setText( column, text ); }
314 void setText(
int column,
double size );
320 ZyppPartitionDu _partitionDu;
326 #endif // ifndef YQPkgDiskUsageList_h YQPkgWarningRangeNotifier overflowWarning
Warning range notifier about disk space overflow warning.
YQPkgDiskUsageListItem(YQPkgDiskUsageList *parent, const ZyppPartitionDu &partitionDu)
Constructor.
YQPkgDiskUsageList(QWidget *parent, int thresholdPercent=0)
Constructor.
void postPendingWarnings()
Post all pending disk space warnings based on the warning range notifiers.
void checkRemainingDiskSpace()
Check the remaining disk space of this partition based on percentage and absolute free MB...
bool leavingProximity() const
Check if the value is leaving the proximity range.
virtual void keyPressEvent(QKeyEvent *ev)
Event handler for keyboard input - for debugging and testing.
virtual QSize sizeHint() const
Suggest reasonable default size.
void updateDiskUsage()
Update all statistical data in the list.
bool needWarning() const
Check if a warning should be posted, i.e.
virtual QString name() const
The name to display for this partition ( the mount point ).
virtual FSize totalSize() const
The total size of this partition.
bool inRange() const
Check if the value is in range, i.e.
void enterProximity()
Notification that the proximity range is entered, i.e.
YQPkgWarningRangeNotifier()
Constructor.
virtual QString deviceName() const
The device name of this partition.
virtual ~YQPkgDiskUsageList()
Destructor.
void clear()
Clear the current values, i.e.
virtual void updateStatus()
Update this item's status ( here: the numeric fields ).
YQPkgWarningRangeNotifier runningOutWarning
Warning range notifier about running out of disk space warning.
void enterRange()
Notification that the inner range is entered.
void clearHistory()
Clear everything, including all history values such as if a warning has been posted.
virtual void updateData()
Update this item's data completely.
virtual FSize usedSize() const
The currently used size of this partition.
ZyppPartitionDu partitionDu() const
Returns the corresponding disk usage data.
void warningPostedNotify()
Notification that a warning has been posted.
virtual ~YQPkgDiskUsageListItem()
Destructor.
void setText(int column, const QString &text)
Re-declare ordinary setText() method so the compiler doesn't get confused which one to use...
Helper class to manage warnings that are to be issued when a value enters a predefined range...
List of disk usage of all attached partitions.
void updateDuData(const ZyppPartitionDu &fromData)
Update the disk usage data.