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

kget

  • sources
  • kde-4.14
  • kdenetwork
  • kget
  • transfer-plugins
  • bittorrent
  • advanceddetails
iwfilelistmodel.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 KTIWFILELISTMODEL_H
22 #define KTIWFILELISTMODEL_H
23 
24 #include "torrentfilelistmodel.h"
25 
26 namespace kt
27 {
28 
35  class IWFileListModel : public TorrentFileListModel
36  {
37  Q_OBJECT
38  public:
39  IWFileListModel(bt::TorrentInterface* tc,QObject* parent);
40  virtual ~IWFileListModel();
41 
42  virtual int columnCount(const QModelIndex & parent) const;
43  virtual QVariant headerData(int section, Qt::Orientation orientation,int role) const;
44  virtual QVariant data(const QModelIndex & index, int role) const;
45  virtual bool setData(const QModelIndex & index, const QVariant & value, int role);
46  void update();
47 
48  void filePercentageChanged(bt::TorrentFileInterface* file,float percentage);
49  void filePreviewChanged(bt::TorrentFileInterface* file,bool preview);
50 
51  private:
52  QVariant displayData(const QModelIndex & index) const;
53  QVariant sortData(const QModelIndex & index) const;
54 
55  private:
56  bool preview;
57  bool mmfile;
58  double percentage;
59  };
60 
61 }
62 
63 #endif
QModelIndex
kt::IWFileListModel::update
void update()
Update gui if necessary.
Definition: iwfilelistmodel.cpp:259
kt::TorrentFileListModel
Model for displaying file trees of a torrent.
Definition: torrentfilelistmodel.h:33
kt::TorrentFileModel::tc
bt::TorrentInterface * tc
Definition: torrentfilemodel.h:141
QObject
kt::IWFileListModel::filePreviewChanged
void filePreviewChanged(bt::TorrentFileInterface *file, bool preview)
Definition: iwfilelistmodel.cpp:252
kt::IWFileListModel
Definition: iwfilelistmodel.h:35
kt::IWFileListModel::data
virtual QVariant data(const QModelIndex &index, int role) const
Definition: iwfilelistmodel.cpp:88
torrentfilelistmodel.h
kt::IWFileListModel::~IWFileListModel
virtual ~IWFileListModel()
Definition: iwfilelistmodel.cpp:44
kt::IWFileListModel::IWFileListModel
IWFileListModel(bt::TorrentInterface *tc, QObject *parent)
Definition: iwfilelistmodel.cpp:35
kt::IWFileListModel::columnCount
virtual int columnCount(const QModelIndex &parent) const
Definition: iwfilelistmodel.cpp:48
kt::TorrentFileListModel::index
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const
Definition: torrentfilelistmodel.cpp:146
kt::IWFileListModel::filePercentageChanged
void filePercentageChanged(bt::TorrentFileInterface *file, float percentage)
Definition: iwfilelistmodel.cpp:245
kt::IWFileListModel::headerData
virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const
Definition: iwfilelistmodel.cpp:56
kt::IWFileListModel::setData
virtual bool setData(const QModelIndex &index, const QVariant &value, int role)
Definition: iwfilelistmodel.cpp:220
QObject::parent
QObject * parent() const
QVariant
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:28:43 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