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

kget

  • sources
  • kde-4.12
  • kdenetwork
  • kget
  • transfer-plugins
  • bittorrent
  • advanceddetails
torrentfilelistmodel.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2007 by Joris Guisson and Ivan Vasic *
3  * joris.guisson@gmail.com *
4  * ivasic@gmail.com *
5  * *
6  * This program is free software; you can redistribute it and/or modify *
7  * it under the terms of the GNU General Public License as published by *
8  * the Free Software Foundation; either version 2 of the License, or *
9  * (at your option) any later version. *
10  * *
11  * This program is distributed in the hope that it will be useful, *
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
14  * GNU General Public License for more details. *
15  * *
16  * You should have received a copy of the GNU General Public License *
17  * along with this program; if not, write to the *
18  * Free Software Foundation, Inc., *
19  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
20  ***************************************************************************/
21 #ifndef KTTORRENTFILELISTMODEL_H
22 #define KTTORRENTFILELISTMODEL_H
23 
24 #include "torrentfilemodel.h"
25 
26 namespace kt
27 {
28 
33  class TorrentFileListModel : public TorrentFileModel
34  {
35  Q_OBJECT
36  public:
37  TorrentFileListModel(bt::TorrentInterface* tc,DeselectMode mode,QObject* parent);
38  virtual ~TorrentFileListModel();
39 
40  virtual int rowCount(const QModelIndex & parent) const;
41  virtual int columnCount(const QModelIndex & parent) const;
42  virtual QVariant headerData(int section, Qt::Orientation orientation,int role) const;
43  virtual QVariant data(const QModelIndex & index, int role) const;
44  virtual QModelIndex parent(const QModelIndex & index) const;
45  virtual QModelIndex index(int row,int column,const QModelIndex & parent) const;
46  virtual bool setData(const QModelIndex & index, const QVariant & value, int role);
47  virtual void checkAll();
48  virtual void uncheckAll();
49  virtual void invertCheck();
50  virtual bt::Uint64 bytesToDownload();
51  virtual bt::TorrentFileInterface* indexToFile(const QModelIndex & idx);
52  virtual QString dirPath(const QModelIndex & idx);
53  virtual void changePriority(const QModelIndexList & indexes,bt::Priority newpriority);
54 
55  private:
56  void invertCheck(const QModelIndex & idx);
57  };
58 
59 }
60 
61 #endif
kt::TorrentFileModel::mode
DeselectMode mode
Definition: torrentfilemodel.h:142
kt::TorrentFileListModel::data
virtual QVariant data(const QModelIndex &index, int role) const
Definition: torrentfilelistmodel.cpp:76
kt::TorrentFileListModel
Model for displaying file trees of a torrent.
Definition: torrentfilelistmodel.h:33
kt::TorrentFileListModel::columnCount
virtual int columnCount(const QModelIndex &parent) const
Definition: torrentfilelistmodel.cpp:54
kt::TorrentFileModel::tc
bt::TorrentInterface * tc
Definition: torrentfilemodel.h:141
kt::TorrentFileListModel::indexToFile
virtual bt::TorrentFileInterface * indexToFile(const QModelIndex &idx)
Convert a model index to a file.
Definition: torrentfilelistmodel.cpp:260
torrentfilemodel.h
kt::TorrentFileListModel::setData
virtual bool setData(const QModelIndex &index, const QVariant &value, int role)
Definition: torrentfilelistmodel.cpp:157
kt::TorrentFileListModel::changePriority
virtual void changePriority(const QModelIndexList &indexes, bt::Priority newpriority)
Change the priority of a bunch of items.
Definition: torrentfilelistmodel.cpp:284
QObject
kt::TorrentFileListModel::headerData
virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const
Definition: torrentfilelistmodel.cpp:62
kt::TorrentFileListModel::rowCount
virtual int rowCount(const QModelIndex &parent) const
Definition: torrentfilelistmodel.cpp:46
kt::TorrentFileListModel::invertCheck
virtual void invertCheck()
Invert the check of each file of the torrent.
Definition: torrentfilelistmodel.cpp:226
kt::TorrentFileListModel::checkAll
virtual void checkAll()
Check all the files in the torrent.
Definition: torrentfilelistmodel.cpp:208
kt::TorrentFileListModel::dirPath
virtual QString dirPath(const QModelIndex &idx)
Get the path of a directory (root directory not included)
Definition: torrentfilelistmodel.cpp:272
kt::TorrentFileModel::DeselectMode
DeselectMode
Definition: torrentfilemodel.h:43
kt::TorrentFileListModel::index
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const
Definition: torrentfilelistmodel.cpp:146
kt::TorrentFileListModel::parent
virtual QModelIndex parent(const QModelIndex &index) const
Definition: torrentfilelistmodel.cpp:140
kt::TorrentFileListModel::uncheckAll
virtual void uncheckAll()
Uncheck all files in the torrent.
Definition: torrentfilelistmodel.cpp:217
kt::TorrentFileListModel::TorrentFileListModel
TorrentFileListModel(bt::TorrentInterface *tc, DeselectMode mode, QObject *parent)
Definition: torrentfilelistmodel.cpp:37
kt::TorrentFileListModel::bytesToDownload
virtual bt::Uint64 bytesToDownload()
Calculate the number of bytes to download.
Definition: torrentfilelistmodel.cpp:243
kt::TorrentFileListModel::~TorrentFileListModel
virtual ~TorrentFileListModel()
Definition: torrentfilelistmodel.cpp:43
kt::TorrentFileModel
Definition: torrentfilemodel.h:39
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:53:17 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