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

kget

  • kt
  • TorrentFileListModel
Public Member Functions | List of all members
kt::TorrentFileListModel Class Reference

#include <torrentfilelistmodel.h>

Inheritance diagram for kt::TorrentFileListModel:
Inheritance graph
[legend]

Public Member Functions

 TorrentFileListModel (bt::TorrentInterface *tc, DeselectMode mode, QObject *parent)
 
virtual ~TorrentFileListModel ()
 
virtual bt::Uint64 bytesToDownload ()
 
virtual void changePriority (const QModelIndexList &indexes, bt::Priority newpriority)
 
virtual void checkAll ()
 
virtual int columnCount (const QModelIndex &parent) const
 
virtual QVariant data (const QModelIndex &index, int role) const
 
virtual QString dirPath (const QModelIndex &idx)
 
virtual QVariant headerData (int section, Qt::Orientation orientation, int role) const
 
virtual QModelIndex index (int row, int column, const QModelIndex &parent) const
 
virtual bt::TorrentFileInterface * indexToFile (const QModelIndex &idx)
 
virtual void invertCheck ()
 
virtual QModelIndex parent (const QModelIndex &index) const
 
virtual int rowCount (const QModelIndex &parent) const
 
virtual bool setData (const QModelIndex &index, const QVariant &value, int role)
 
virtual void uncheckAll ()
 
- Public Member Functions inherited from kt::TorrentFileModel
 TorrentFileModel (bt::TorrentInterface *tc, DeselectMode mode, QObject *parent)
 
virtual ~TorrentFileModel ()
 
bool fileNamesEditable () const
 
virtual void filePercentageChanged (bt::TorrentFileInterface *file, float percentage)
 
virtual void filePreviewChanged (bt::TorrentFileInterface *file, bool preview)
 
virtual Qt::ItemFlags flags (const QModelIndex &index) const
 
virtual void loadExpandedState (QSortFilterProxyModel *pm, QTreeView *tv, const QByteArray &state)
 
virtual void missingFilesMarkedDND ()
 
virtual void onCodecChange ()
 
virtual QByteArray saveExpandedState (QSortFilterProxyModel *pm, QTreeView *tv)
 
void setFileNamesEditable (bool on)
 
virtual void update ()
 

Additional Inherited Members

- Public Types inherited from kt::TorrentFileModel
enum  DeselectMode { KEEP_FILES, DELETE_FILES }
 
- Signals inherited from kt::TorrentFileModel
void checkStateChanged ()
 
- Protected Attributes inherited from kt::TorrentFileModel
bool file_names_editable
 
DeselectMode mode
 
bt::TorrentInterface * tc
 

Detailed Description

Model for displaying file trees of a torrent.

Author
Joris Guisson

Definition at line 33 of file torrentfilelistmodel.h.

Constructor & Destructor Documentation

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

Definition at line 37 of file torrentfilelistmodel.cpp.

kt::TorrentFileListModel::~TorrentFileListModel ( )
virtual

Definition at line 43 of file torrentfilelistmodel.cpp.

Member Function Documentation

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

Calculate the number of bytes to download.

Returns
Bytes to download

Implements kt::TorrentFileModel.

Definition at line 243 of file torrentfilelistmodel.cpp.

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

Change the priority of a bunch of items.

Parameters
indexesThe list of items
newpriorityThe new priority

Implements kt::TorrentFileModel.

Definition at line 284 of file torrentfilelistmodel.cpp.

void kt::TorrentFileListModel::checkAll ( )
virtual

Check all the files in the torrent.

Implements kt::TorrentFileModel.

Definition at line 208 of file torrentfilelistmodel.cpp.

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

Reimplemented in kt::IWFileListModel.

Definition at line 54 of file torrentfilelistmodel.cpp.

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

Reimplemented in kt::IWFileListModel.

Definition at line 76 of file torrentfilelistmodel.cpp.

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

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

Parameters
idxThe model index
Returns
The path

Implements kt::TorrentFileModel.

Definition at line 272 of file torrentfilelistmodel.cpp.

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

Reimplemented in kt::IWFileListModel.

Definition at line 62 of file torrentfilelistmodel.cpp.

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

Definition at line 146 of file torrentfilelistmodel.cpp.

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

Convert a model index to a file.

Parameters
idxThe model index
Returns
The file index or 0 for a directory

Implements kt::TorrentFileModel.

Definition at line 260 of file torrentfilelistmodel.cpp.

void kt::TorrentFileListModel::invertCheck ( )
virtual

Invert the check of each file of the torrent.

Implements kt::TorrentFileModel.

Definition at line 226 of file torrentfilelistmodel.cpp.

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

Definition at line 140 of file torrentfilelistmodel.cpp.

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

Definition at line 46 of file torrentfilelistmodel.cpp.

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

Reimplemented in kt::IWFileListModel.

Definition at line 157 of file torrentfilelistmodel.cpp.

void kt::TorrentFileListModel::uncheckAll ( )
virtual

Uncheck all files in the torrent.

Implements kt::TorrentFileModel.

Definition at line 217 of file torrentfilelistmodel.cpp.


The documentation for this class was generated from the following files:
  • torrentfilelistmodel.h
  • torrentfilelistmodel.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:53:18 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kget

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

kdenetwork API Reference

Skip menu "kdenetwork API Reference"
  • kget
  • kopete
  •   kopete
  •   libkopete
  • krdc
  • krfb

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal