1
/***************************************************************************
2
* Copyright © 2007 by Krzysztof Kundzicz *
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. *
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. *
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 ConnsTabPage_H_
21
#define ConnsTabPage_H_
28
#include <interfaces/plugin.h>
29
#include <torrent/globals.h>
30
#include <dht/dhtbase.h>
31
#include <interfaces/coreinterface.h>
32
#include <interfaces/torrentinterface.h>
33
#include <torrent/queuemanager.h>
40
#include <PluginPage.h>
41
#include <drawer/ChartDrawer.h>
42
#include <drawer/PlainChartDrawer.h>
43
#include <drawer/KPlotWgtDrawer.h>
44
#include <statspluginsettings.h>
48
/** \brief Connections tab
49
\author Krzysztof Kundzicz <athantor@gmail.com>
51
class ConnsTabPage : public PluginPage
57
std::auto_ptr<Ui::ConnsWgt> pmConnsUi;
59
///Connections chart widget
60
std::auto_ptr<ChartDrawer> pmConnsChtWgt;
62
std::auto_ptr<ChartDrawer> pmDhtChtWgt;
64
/** \brief Leechers in swarms dataset UUID
66
Used for identification whether this dataset is already shown on the chart and if it needs to be removed or added on settings chage
68
const std::auto_ptr<QUuid> pmLhrSwnUuid;
69
/** \brief Seeds in swarms dataset UUID
71
Used for identification whether this dataset is already shown on the chart and if it needs to be removed or added on settings chage
73
const std::auto_ptr<QUuid> pmSesSwnUuid;
75
/** \brief Gathers data about connections
76
\param pP kt::Plugin interface
78
void GatherConnStats(Plugin *);
79
/** \brief Gathers data about DHT
80
\param pP kt::Plugin interface
82
void GatherDhtStats();
86
/** \brief Constructor
89
ConnsTabPage(QWidget * p);
96
void UpdateAllCharts();
97
void GatherData(Plugin *);
98
void ResetAvg(ChartDrawer *);