28 #ifndef QY2DiskUsageList_h 29 #define QY2DiskUsageList_h 31 #include <QY2ListView.h> 32 #include <yui/FSize.h> 64 int nameCol()
const {
return _nameCol; }
65 int percentageBarCol()
const {
return _percentageBarCol; }
66 int usedSizeCol()
const {
return _usedSizeCol; }
67 int freeSizeCol()
const {
return _freeSizeCol; }
68 int totalSizeCol()
const {
return _totalSizeCol; }
69 int deviceNameCol()
const {
return _deviceNameCol; }
72 virtual void drawRow ( QPainter * painter,
const QStyleOptionViewItem & option,
const QModelIndex & index )
const;
75 QTreeWidgetItem * itemFromIndex (
const QModelIndex & index )
const 76 {
return QY2ListView::itemFromIndex(index); }
81 int _percentageBarCol;
124 virtual FSize usedSize()
const = 0;
131 virtual FSize totalSize()
const = 0;
140 virtual FSize freeSize()
const;
149 virtual int usedPercent()
const;
158 virtual QString name()
const = 0;
175 virtual void updateStatus();
183 virtual void updateData();
189 void setText(
int column,
const QString & text )
190 { QTreeWidgetItem::setText( column, text ); }
195 void setText(
int column,
const FSize & size );
201 virtual bool operator< (
const QTreeWidgetItem & other )
const;
205 int nameCol()
const {
return _diskUsageList->nameCol(); }
206 int percentageBarCol()
const {
return _diskUsageList->percentageBarCol(); }
207 int usedSizeCol()
const {
return _diskUsageList->usedSizeCol(); }
208 int freeSizeCol()
const {
return _diskUsageList->freeSizeCol(); }
209 int totalSizeCol()
const {
return _diskUsageList->totalSizeCol(); }
210 int deviceNameCol()
const {
return _diskUsageList->deviceNameCol(); }
219 void init(
bool allFields );
229 void paintPercentageBar( QPainter * painter,
230 QStyleOptionViewItem option,
231 const QColor & fillColor);
246 #endif // ifndef QY2DiskUsageList_h QY2DiskUsageList(QWidget *parent, bool addStdColumns=true)
Constructor.
virtual QString deviceName() const
The device name of this partition.
Abstract base class for one partition ( mount point ) to display in a QY2DiskUsageList.
Generic scrollable list of disk usage for any number of partitions.
void setText(int column, const QString &text)
Re-declare ordinary setText() method so the compiler doesn't get confused which one to use...
Enhanced QTreeWidgetItem.
virtual ~QY2DiskUsageList()
Destructor.