kget
iwfiletreemodel.h
Go to the documentation of this file.00001
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023 #ifndef KTIWFILETREEMODEL_H
00024 #define KTIWFILETREEMODEL_H
00025
00026 #include "torrentfiletreemodel.h"
00027
00028 namespace kt
00029 {
00030
00037 class IWFileTreeModel : public TorrentFileTreeModel
00038 {
00039 Q_OBJECT
00040 public:
00041 IWFileTreeModel(bt::TorrentInterface* tc,QObject* parent);
00042 virtual ~IWFileTreeModel();
00043
00044 virtual int columnCount(const QModelIndex & parent) const;
00045 virtual QVariant headerData(int section, Qt::Orientation orientation,int role) const;
00046 virtual QVariant data(const QModelIndex & index, int role) const;
00047 virtual bool setData(const QModelIndex & index, const QVariant & value, int role);
00048 virtual void update();
00049
00050 private slots:
00051 void onPercentageUpdated(float p);
00052 void onPreviewAvailable(bool av);
00053
00054 private:
00055 void update(const QModelIndex & index,bt::TorrentFileInterface* file,int col);
00056
00057 private:
00058 bool preview;
00059 bool mmfile;
00060 double percentage;
00061 };
00062
00063 }
00064
00065 #endif