#ifndef _FILE_TRANSFER_LV_ITEM_H #define _FILE_TRANSFER_LV_ITEM_H #include "file_transfer.h" #include "util.h" #include "dc_parse.h" #include class file_transfer_lv_item : public QListViewItem, public file_transfer { public: file_transfer_lv_item(QListView* parent, int gdl, const QString &nick,const QString &fname,int type) : QListViewItem(parent), file_transfer(gdl, nick,fname) { setText(0,nick); if(type == DOWNLOAD) setText(6,file); else setText(5,file); active = true; } void update(int status, const QString& range) { if( status == STATUS_WAITING ) setText(1,"Wait"); else if( status == STATUS_TRYING ) setText(1,"Trying"); else if( status == STATUS_RUNNING) setText(1,"Run"); setText(7,range); } void update(const QString& fname, int totSize, int recSize, int aRecLast10) { file_transfer::update(fname,totSize,recSize,aRecLast10); } void update(int size, int amount) { file_transfer::update(size,amount); } void SetActive(bool yes) {active = yes;} bool IsActive() {return active;} public: void update_data(); private: bool active; }; #endif