• Skip to content
  • Skip to link menu
KDE 4.0 API Reference
  • KDE API Reference
  • kdenetwork
  • Sitemap
  • Contact Us
 

kget

kt::TorrentFileListModel

kt::TorrentFileListModel Class Reference

#include <torrentfilelistmodel.h>

Inheritance diagram for kt::TorrentFileListModel:

Inheritance graph
[legend]

List of all members.


Detailed Description

Model for displaying file trees of a torrent.

Author:
Joris Guisson

Definition at line 35 of file torrentfilelistmodel.h.


Public Member Functions

 TorrentFileListModel (bt::TorrentInterface *tc, DeselectMode mode, QObject *parent)
virtual ~TorrentFileListModel ()
virtual int rowCount (const QModelIndex &parent) const
virtual int columnCount (const QModelIndex &parent) const
virtual QVariant headerData (int section, Qt::Orientation orientation, int role) const
virtual QVariant data (const QModelIndex &index, int role) const
virtual QModelIndex parent (const QModelIndex &index) const
virtual QModelIndex index (int row, int column, const QModelIndex &parent) const
virtual Qt::ItemFlags flags (const QModelIndex &index) const
virtual bool setData (const QModelIndex &index, const QVariant &value, int role)
virtual void checkAll ()
virtual void uncheckAll ()
virtual void invertCheck ()
virtual bt::Uint64 bytesToDownload ()
virtual bt::TorrentFileInterface * indexToFile (const QModelIndex &idx)
virtual QString dirPath (const QModelIndex &idx)
virtual void changePriority (const QModelIndexList &indexes, bt::Priority newpriority)

Constructor & Destructor Documentation

kt::TorrentFileListModel::TorrentFileListModel ( bt::TorrentInterface *  tc,
DeselectMode  mode,
QObject *  parent 
)

Definition at line 38 of file torrentfilelistmodel.cpp.

kt::TorrentFileListModel::~TorrentFileListModel (  )  [virtual]

Definition at line 44 of file torrentfilelistmodel.cpp.


Member Function Documentation

int kt::TorrentFileListModel::rowCount ( const QModelIndex &  parent  )  const [virtual]

Definition at line 47 of file torrentfilelistmodel.cpp.

int kt::TorrentFileListModel::columnCount ( const QModelIndex &  parent  )  const [virtual]

Reimplemented in kt::IWFileListModel.

Definition at line 55 of file torrentfilelistmodel.cpp.

QVariant kt::TorrentFileListModel::headerData ( int  section,
Qt::Orientation  orientation,
int  role 
) const [virtual]

Reimplemented in kt::IWFileListModel.

Definition at line 63 of file torrentfilelistmodel.cpp.

QVariant kt::TorrentFileListModel::data ( const QModelIndex &  index,
int  role 
) const [virtual]

Reimplemented in kt::IWFileListModel.

Definition at line 77 of file torrentfilelistmodel.cpp.

QModelIndex kt::TorrentFileListModel::parent ( const QModelIndex &  index  )  const [virtual]

Definition at line 120 of file torrentfilelistmodel.cpp.

QModelIndex kt::TorrentFileListModel::index ( int  row,
int  column,
const QModelIndex &  parent 
) const [virtual]

Definition at line 125 of file torrentfilelistmodel.cpp.

Qt::ItemFlags kt::TorrentFileListModel::flags ( const QModelIndex &  index  )  const [virtual]

Definition at line 136 of file torrentfilelistmodel.cpp.

bool kt::TorrentFileListModel::setData ( const QModelIndex &  index,
const QVariant &  value,
int  role 
) [virtual]

Reimplemented from QAbstractItemModel.

Reimplemented in kt::IWFileListModel.

Definition at line 146 of file torrentfilelistmodel.cpp.

void kt::TorrentFileListModel::checkAll (  )  [virtual]

Check all the files in the torrent.

Implements kt::TorrentFileModel.

Definition at line 172 of file torrentfilelistmodel.cpp.

void kt::TorrentFileListModel::uncheckAll (  )  [virtual]

Uncheck all files in the torrent.

Implements kt::TorrentFileModel.

Definition at line 181 of file torrentfilelistmodel.cpp.

void kt::TorrentFileListModel::invertCheck (  )  [virtual]

Invert the check of each file of the torrent.

Implements kt::TorrentFileModel.

Definition at line 190 of file torrentfilelistmodel.cpp.

bt::Uint64 kt::TorrentFileListModel::bytesToDownload (  )  [virtual]

Calculate the number of bytes to download.

Returns:
Bytes to download

Implements kt::TorrentFileModel.

Definition at line 207 of file torrentfilelistmodel.cpp.

bt::TorrentFileInterface * kt::TorrentFileListModel::indexToFile ( const QModelIndex &  idx  )  [virtual]

Convert a model index to a file.

Parameters:
idx The model index
Returns:
The file index or 0 for a directory

Implements kt::TorrentFileModel.

Definition at line 224 of file torrentfilelistmodel.cpp.

QString kt::TorrentFileListModel::dirPath ( const QModelIndex &  idx  )  [virtual]

Get the path of a directory (root directory not included).

Parameters:
idx The model index
Returns:
The path

Implements kt::TorrentFileModel.

Definition at line 236 of file torrentfilelistmodel.cpp.

void kt::TorrentFileListModel::changePriority ( const QModelIndexList &  indexes,
bt::Priority  newpriority 
) [virtual]

Change the priority of a bunch of items.

Parameters:
indexes The list of items
newpriority The new priority

Implements kt::TorrentFileModel.

Definition at line 248 of file torrentfilelistmodel.cpp.


The documentation for this class was generated from the following files:
  • torrentfilelistmodel.h
  • torrentfilelistmodel.cpp

kget

Skip menu "kget"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

kdenetwork

Skip menu "kdenetwork"
  • kget
  • kopete
  •   kopete
  •   libkopete
  •       libpapillon
  • krfb
Generated for kdenetwork by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal