• 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
peerview.h
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2007 by Joris Guisson *
3  * joris.guisson@gmail.com *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *
19  ***************************************************************************/
20 #ifndef KT_PEERVIEW_HH
21 #define KT_PEERVIEW_HH
22 
23 
24 #include <QTreeWidget>
25 #include <util/ptrmap.h>
26 #include <interfaces/peerinterface.h>
27 #include <ksharedconfig.h>
28 
29 class KMenu;
30 
31 namespace kt
32 {
33  class PeerViewModel;
34 
38  class PeerView : public QTreeView
39  {
40  Q_OBJECT
41  public:
42  PeerView(QWidget* parent);
43  virtual ~PeerView();
44 
46  void peerAdded(bt::PeerInterface* peer);
47 
49  void peerRemoved(bt::PeerInterface* peer);
50 
52  void update();
53 
55  void removeAll();
56 
57  void saveState(KSharedConfigPtr cfg);
58  void loadState(KSharedConfigPtr cfg);
59 
60  private slots:
61  void showContextMenu(const QPoint& pos);
62  void banPeer();
63  void kickPeer();
64 
65  private:
66  KMenu* context_menu;
67  PeerViewModel* model;
68  };
69 }
70 
71 #endif
kt::PeerView
View which shows a list of peers, of a torrent.
Definition: peerview.h:38
QWidget
kt::PeerView::removeAll
void removeAll()
Remove all items.
Definition: peerview.cpp:112
kt::PeerView::~PeerView
virtual ~PeerView()
Definition: peerview.cpp:58
kt::PeerView::saveState
void saveState(KSharedConfigPtr cfg)
Definition: peerview.cpp:117
QTreeView
kt::PeerView::peerRemoved
void peerRemoved(bt::PeerInterface *peer)
A peer has been removed.
Definition: peerview.cpp:102
kt::PeerViewModel
Definition: peerviewmodel.h:36
kt::PeerView::PeerView
PeerView(QWidget *parent)
Definition: peerview.cpp:40
kt::PeerView::update
void update()
Check to see if the GUI needs to be updated.
Definition: peerview.cpp:107
kt::PeerView::loadState
void loadState(KSharedConfigPtr cfg)
Definition: peerview.cpp:124
kt::PeerView::peerAdded
void peerAdded(bt::PeerInterface *peer)
A peer has been added.
Definition: peerview.cpp:97
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