• 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
iwfiletreemodel.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 KTIWFILETREEMODEL_H
22 #define KTIWFILETREEMODEL_H
23 
24 #include "torrentfiletreemodel.h"
25 
26 namespace kt
27 {
28 
35  class IWFileTreeModel : public TorrentFileTreeModel
36  {
37  Q_OBJECT
38  public:
39  IWFileTreeModel(bt::TorrentInterface* tc,QObject* parent);
40  virtual ~IWFileTreeModel();
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  virtual void update();
47 
48  void filePercentageChanged(bt::TorrentFileInterface* file,float percentage);
49  void filePreviewChanged(bt::TorrentFileInterface* file,bool preview);
50 
51  private:
52  void update(const QModelIndex & index,bt::TorrentFileInterface* file,int col);
53  QVariant displayData(Node* n,const QModelIndex & index) const;
54  QVariant sortData(Node* n,const QModelIndex & index) const;
55 
56  private:
57  bool preview;
58  bool mmfile;
59  double percentage;
60  };
61 
62 }
63 
64 #endif
kt::TorrentFileModel::tc
bt::TorrentInterface * tc
Definition: torrentfilemodel.h:141
kt::IWFileTreeModel::IWFileTreeModel
IWFileTreeModel(bt::TorrentInterface *tc, QObject *parent)
Definition: iwfiletreemodel.cpp:35
QObject
kt::IWFileTreeModel::filePercentageChanged
void filePercentageChanged(bt::TorrentFileInterface *file, float percentage)
Definition: iwfiletreemodel.cpp:271
kt::TorrentFileTreeModel::parent
virtual QModelIndex parent(const QModelIndex &index) const
Definition: torrentfiletreemodel.cpp:436
kt::IWFileTreeModel::headerData
virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const
Definition: iwfiletreemodel.cpp:60
kt::TorrentFileTreeModel::index
virtual QModelIndex index(int row, int column, const QModelIndex &parent) const
Definition: torrentfiletreemodel.cpp:452
kt::TorrentFileTreeModel::Node
Definition: torrentfiletreemodel.h:46
kt::TorrentFileTreeModel
Model for displaying file trees of a torrent.
Definition: torrentfiletreemodel.h:42
kt::IWFileTreeModel
Definition: iwfiletreemodel.h:35
kt::IWFileTreeModel::columnCount
virtual int columnCount(const QModelIndex &parent) const
Definition: iwfiletreemodel.cpp:55
kt::IWFileTreeModel::~IWFileTreeModel
virtual ~IWFileTreeModel()
Definition: iwfiletreemodel.cpp:51
kt::IWFileTreeModel::data
virtual QVariant data(const QModelIndex &index, int role) const
Definition: iwfiletreemodel.cpp:92
torrentfiletreemodel.h
kt::IWFileTreeModel::filePreviewChanged
void filePreviewChanged(bt::TorrentFileInterface *file, bool preview)
Definition: iwfiletreemodel.cpp:277
kt::IWFileTreeModel::update
virtual void update()
Update gui if necessary.
Definition: iwfiletreemodel.cpp:320
kt::IWFileTreeModel::setData
virtual bool setData(const QModelIndex &index, const QVariant &value, int role)
Definition: iwfiletreemodel.cpp:232
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