#include "filelistitem.h" #include FileListItem::FileListItem( QListView * parent, QString label1, QString label2, QString aSize, QString label4, QString label5, QString label6, QString label7,QString label8 ) : QListViewItem(parent, label1,label2,bytes_to_units(aSize),label4,label5,label6,label7,label8) { size = aSize.toInt(); } int FileListItem::compare(QListViewItem * i, int col, bool ascending ) const { if( col == 2 ) { FileListItem *p = (FileListItem*)i; if( size < p->Size() ) return -1; if( size > p->Size() ) return 1; return 0; } else return QListViewItem::compare(i,col,ascending); } // TODO: fix this shit! void FileListItem::paintCell ( QPainter * p, const QColorGroup & cg, int column, int width, int align) { p->setPen(QColor(0xff,00,0xff)); QListViewItem::paintCell(p,cg,column,width,align); }