KVIrc 5.2.0
Developer APIs
libkviiograph.h
Go to the documentation of this file.
1#ifndef _LIBKVIIOGRAPH_H_
2#define _LIBKVIIOGRAPH_H_
3//=============================================================================
4//
5// File : libkviiograph.h
6// Creation date : Tue Oct 31 2000 00:14:12 CEST by Szymon Stefanek
7//
8// This file is part of the KVIrc IRC client distribution
9// Copyright (C) 2000-2010 Szymon Stefanek (pragma at kvirc dot net)
10//
11// This program is FREE software. You can redistribute it and/or
12// modify it under the terms of the GNU General Public License
13// as published by the Free Software Foundation; either version 2
14// of the License, or (at your option) any later version.
15//
16// This program is distributed in the HOPE that it will be USEFUL,
17// but WITHOUT ANY WARRANTY; without even the implied warranty of
18// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
19// See the GNU General Public License for more details.
20//
21// You should have received a copy of the GNU General Public License
22// along with this program. If not, write to the Free Software Foundation,
23// Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24//
25//=============================================================================
26
27#include "kvi_inttypes.h"
28#include "KviMainWindow.h"
29#include "KviModuleExtension.h"
30#include "KviWindow.h"
31
32#include <QQueue>
33
34#define KVI_IOGRAPH_NUMBER_POINTS 60
35#define KVI_IOGRAPH_HORIZ_SEGMENTS 10
36#define KVI_IOGRAPH_VERT_SEGMENTS 10
37#define IOGRAPH_MODULE_EXTENSION_NAME "IO graph extension"
38
39class KviIOGraphWidget : public QWidget
40{
41 Q_OBJECT
42public:
43 KviIOGraphWidget(QWidget * parent);
45
46protected:
47 QQueue<unsigned int> m_sendRates;
48 QQueue<unsigned int> m_recvRates;
49 unsigned int m_maxRate;
52
53protected:
54 void timerEvent(QTimerEvent * e) override;
55 void paintEvent(QPaintEvent * e) override;
56};
57
59{
60 Q_OBJECT
61public:
62 KviIOGraphWindow(const char * name);
64
65private:
67 virtual void updatePseudoTransparency();
68
69protected:
70 QPixmap * myIconPtr() override;
71 void fillCaptionBuffers() override;
72 void resizeEvent(QResizeEvent * e) override;
73 virtual void die();
74 void moveEvent(QMoveEvent *) override;
75 void paintEvent(QPaintEvent * e) override;
76};
77
78#endif
Contains the KviWindow class.
Definition libkviiograph.h:40
unsigned int m_maxRate
Definition libkviiograph.h:49
kvi_u64_t m_uLastSentBytes
Definition libkviiograph.h:50
kvi_u64_t m_uLastRecvBytes
Definition libkviiograph.h:51
~KviIOGraphWidget()
Definition libkviiograph.h:44
QQueue< unsigned int > m_recvRates
Definition libkviiograph.h:48
void paintEvent(QPaintEvent *e) override
Definition libkviiograph.cpp:200
QQueue< unsigned int > m_sendRates
Definition libkviiograph.h:47
void timerEvent(QTimerEvent *e) override
Definition libkviiograph.cpp:152
Definition libkviiograph.h:59
void paintEvent(QPaintEvent *e) override
Definition libkviiograph.cpp:96
void fillCaptionBuffers() override
Definition libkviiograph.cpp:72
virtual void die()
Definition libkviiograph.cpp:77
void moveEvent(QMoveEvent *) override
Definition libkviiograph.cpp:89
KviIOGraphWidget * m_pIOGraph
Definition libkviiograph.h:66
QPixmap * myIconPtr() override
Definition libkviiograph.cpp:62
void resizeEvent(QResizeEvent *e) override
Definition libkviiograph.cpp:67
virtual void updatePseudoTransparency()
Definition libkviiograph.cpp:82
~KviIOGraphWindow()
Definition libkviiograph.cpp:53
Base class for all windows in KVIrc.
Definition KviWindow.h:75
#define e
Definition detector.cpp:70
unsigned long long int kvi_u64_t
Definition kvi_inttypes.h:66