KVIrc  4.9.2
DeveloperAPIs
libkviiograph.h
Go to the documentation of this file.
1 #ifndef _LIBKVIIOGRAPH_H_
2 #define _LIBKVIIOGRAPH_H_
3 //=============================================================================
4 //
5 // File : libkviiograph.cpp
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 <QQueue>
28 
29 #include "KviMainWindow.h"
30 #include "kvi_inttypes.h"
31 #include "KviModuleExtension.h"
32 #include "KviWindow.h"
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 
39 class KviIOGraphWidget : public QWidget
40 {
41  Q_OBJECT
42 public:
43  KviIOGraphWidget(QWidget * parent);
45 
46 protected:
47  QQueue<unsigned int> m_sendRates;
48  QQueue<unsigned int> m_recvRates;
49  unsigned int m_maxRate;
52 
53 protected:
54  virtual void timerEvent(QTimerEvent * e);
55  virtual void paintEvent(QPaintEvent * e);
56 };
57 
59 {
60  Q_OBJECT
61 public:
62  KviIOGraphWindow(const char * name);
64 
65 private:
67  virtual void updatePseudoTransparency();
68 
69 protected:
70  virtual QPixmap * myIconPtr();
71  virtual void fillCaptionBuffers();
72  virtual void resizeEvent(QResizeEvent * e);
73  virtual void die();
74  virtual void moveEvent(QMoveEvent *);
75  virtual void paintEvent(QPaintEvent * e);
76 };
77 
78 #endif
virtual QPixmap * myIconPtr()
Definition: libkviiograph.cpp:61
KviIOGraphWindow(const char *name)
Definition: libkviiograph.cpp:45
kvi_u64_t m_uLastSentBytes
Definition: libkviiograph.h:50
QQueue< unsigned int > m_recvRates
Definition: libkviiograph.h:48
Definition: libkviiograph.h:58
unsigned int m_maxRate
Definition: libkviiograph.h:49
KviIOGraphWidget(QWidget *parent)
Definition: libkviiograph.cpp:125
kvi_u64_t m_uLastRecvBytes
Definition: libkviiograph.h:51
virtual void paintEvent(QPaintEvent *e)
Definition: libkviiograph.cpp:95
virtual void resizeEvent(QResizeEvent *e)
Definition: libkviiograph.cpp:66
virtual void moveEvent(QMoveEvent *)
Definition: libkviiograph.cpp:88
#define e
Definition: detector.cpp:69
virtual void fillCaptionBuffers()
Definition: libkviiograph.cpp:71
Definition: libkviiograph.h:39
~KviIOGraphWindow()
Definition: libkviiograph.cpp:52
unsigned long long int kvi_u64_t
Definition: kvi_inttypes.h:66
~KviIOGraphWidget()
Definition: libkviiograph.h:44
virtual void die()
Definition: libkviiograph.cpp:76
QQueue< unsigned int > m_sendRates
Definition: libkviiograph.h:44
Base class for all windows in KVIrc.
Definition: KviWindow.h:74
virtual void timerEvent(QTimerEvent *e)
Definition: libkviiograph.cpp:151
virtual void updatePseudoTransparency()
Definition: libkviiograph.cpp:81
QString name()
Definition: KviRuntimeInfo.cpp:655
Contains the KviWindow class.
virtual void paintEvent(QPaintEvent *e)
Definition: libkviiograph.cpp:199
KviIOGraphWidget * m_pIOGraph
Definition: libkviiograph.h:66