• 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
webseedsmodel.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2008 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 KTWEBSEEDSMODEL_H
22 #define KTWEBSEEDSMODEL_H
23 
24 #include <QAbstractTableModel>
25 #include <util/constants.h>
26 
27 namespace bt
28 {
29  class TorrentInterface;
30 }
31 
32 namespace kt
33 {
34 
38  class WebSeedsModel : public QAbstractTableModel
39  {
40  Q_OBJECT
41 
42  public:
43  WebSeedsModel(QObject* parent);
44  virtual ~WebSeedsModel();
45 
46 
51  void changeTC(bt::TorrentInterface* tc);
52 
56  bool update();
57 
58  virtual int rowCount(const QModelIndex & parent) const;
59  virtual int columnCount(const QModelIndex & parent) const;
60  virtual QVariant headerData(int section, Qt::Orientation orientation,int role) const;
61  virtual QVariant data(const QModelIndex & index, int role) const;
62 
63  private:
64  struct Item
65  {
66  QString status;
67  bt::Uint64 downloaded;
68  bt::Uint32 speed;
69  };
70  bt::TorrentInterface* curr_tc;
71  QList<Item> items;
72  };
73 
74 }
75 
76 #endif
kt::WebSeedsModel::columnCount
virtual int columnCount(const QModelIndex &parent) const
Definition: webseedsmodel.cpp:109
kt::WebSeedsModel::WebSeedsModel
WebSeedsModel(QObject *parent)
Definition: webseedsmodel.cpp:32
kt::WebSeedsModel
Definition: webseedsmodel.h:38
kt::WebSeedsModel::~WebSeedsModel
virtual ~WebSeedsModel()
Definition: webseedsmodel.cpp:38
QObject
kt::WebSeedsModel::update
bool update()
See if we need to update the model.
Definition: webseedsmodel.cpp:61
kt::WebSeedsModel::data
virtual QVariant data(const QModelIndex &index, int role) const
Definition: webseedsmodel.cpp:132
kt::WebSeedsModel::rowCount
virtual int rowCount(const QModelIndex &parent) const
Definition: webseedsmodel.cpp:101
kt::WebSeedsModel::changeTC
void changeTC(bt::TorrentInterface *tc)
Change the current torrent.
Definition: webseedsmodel.cpp:42
kt::WebSeedsModel::headerData
virtual QVariant headerData(int section, Qt::Orientation orientation, int role) const
Definition: webseedsmodel.cpp:117
QAbstractTableModel
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