~ubuntu-branches/ubuntu/lucid/ktorrent/lucid

« back to all changes in this revision

Viewing changes to plugins/stats/StatsCon.h

  • Committer: Bazaar Package Importer
  • Author(s): Richard Birnie
  • Date: 2008-06-03 20:32:46 UTC
  • mfrom: (1.1.20 upstream)
  • Revision ID: james.westby@ubuntu.com-20080603203246-dfyemn010uhsf433
Tags: 3.1~rc1+dfsg.1-1ubuntu1
* New upstream development release      
 - Dropped 01_support_external_libbtcore.diffm,
   97_fix_target_link_libraries.diff,
   99_libbtcore_scramble_soname.diff

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/***************************************************************************
2
 
 *   Copyright © 2007 by Krzysztof Kundzicz                                *
3
 
 *   athantor@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
 
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
19
 
 ***************************************************************************/
20
 
 
21
 
#ifndef STATSCON_H_
22
 
#define STATSCON_H_
23
 
 
24
 
#include <qwidget.h>
25
 
#include <qlayout.h>
26
 
#include <qtabwidget.h>
27
 
#include <qgroupbox.h>
28
 
 
29
 
#include "statspluginsettings.h"
30
 
#include "statsconwgt.h"
31
 
#include "ChartDrawer.h"
32
 
 
33
 
namespace kt {
34
 
 
35
 
class StatsCon : public StatsConWgt
36
 
{
37
 
        Q_OBJECT
38
 
        private:
39
 
                ///Layout of peers connections
40
 
                QVBoxLayout * pmPeersConLay;
41
 
                ///Layout of DHT stats
42
 
                QVBoxLayout * pmDHTLay;
43
 
                
44
 
                ///Chart widget of peers connted
45
 
                ChartDrawer * pmPeersConCht;
46
 
                ///Chart widget of DHT
47
 
                ChartDrawer * pmDHTCht;
48
 
        
49
 
        public:
50
 
                StatsCon(QWidget * p = 0);
51
 
                virtual ~StatsCon();
52
 
                /**
53
 
                \brief Adds value to peers connections chart
54
 
                \param idx Dataset index
55
 
                \param val Value
56
 
                */
57
 
                void AddPeersConVal(const size_t idx, const double val);
58
 
                /**
59
 
                \brief Adds value to DHT chart
60
 
                \param idx Dataset index
61
 
                \param val Value
62
 
                */
63
 
                void AddDHTVal(const size_t idx, const double val);
64
 
                
65
 
                /**
66
 
                \brief Zeroes data on given idx @ peers connections chart
67
 
                \param idx Dataset index
68
 
                */
69
 
                void ZeroPeersConn(const size_t idx);
70
 
                
71
 
                /**
72
 
                \brief Changes connections chart's measurments count
73
 
                \param cnt Measurements
74
 
                */
75
 
                void ChangeConnMsmtCnt(const size_t cnt);
76
 
                /**
77
 
                \brief Changes DHT chart's measurments count
78
 
                \param cnt Measurements
79
 
                */
80
 
                void ChangeDHTMsmtCnt(const size_t cnt);
81
 
                /**
82
 
                \brief Changes charts OY axis maximum mode
83
 
                \param mm Mode
84
 
                */
85
 
                void ChangeChartsMaxMode(const ChartDrawer::MaxMode mm);
86
 
        public slots:
87
 
                ///Updates charts
88
 
                void UpdateCharts();
89
 
        
90
 
};
91
 
 
92
 
} // NS
93
 
 
94
 
#endif