author | mickeyl <mickeyl> | 2004-08-24 11:53:43 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-08-24 11:53:43 (UTC) |
commit | b06390cb17114692a9fd5233d77620b385252480 (patch) (unidiff) | |
tree | 91de2ed5b0eb6ed739eb6bd0126e2ad004d6a9bd /noncore/net/wellenreiter/gui/graphwindow.cpp | |
parent | 94611edc1942717faa15861adef25418e40ea626 (diff) | |
download | opie-b06390cb17114692a9fd5233d77620b385252480.zip opie-b06390cb17114692a9fd5233d77620b385252480.tar.gz opie-b06390cb17114692a9fd5233d77620b385252480.tar.bz2 |
apply megapatch courtesy Holger 'Zecke' Freyther:
- bump version to 1.0.3-cvs
- fix compile warnings
- fix PacketViewer not to scroll, when watching in "real time"
- fix appending text to log view
- update statistics when tab is getting activated
Diffstat (limited to 'noncore/net/wellenreiter/gui/graphwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/graphwindow.cpp | 34 |
1 files changed, 29 insertions, 5 deletions
diff --git a/noncore/net/wellenreiter/gui/graphwindow.cpp b/noncore/net/wellenreiter/gui/graphwindow.cpp index b4174d3..d53421c 100644 --- a/noncore/net/wellenreiter/gui/graphwindow.cpp +++ b/noncore/net/wellenreiter/gui/graphwindow.cpp | |||
@@ -19,6 +19,33 @@ | |||
19 | #include <qpixmap.h> | 19 | #include <qpixmap.h> |
20 | #include <qtimer.h> | 20 | #include <qtimer.h> |
21 | 21 | ||
22 | /* XPM */ | ||
23 | static char * background[] = { | ||
24 | "16 16 6 1", | ||
25 | " c None", | ||
26 | ".c #52676E", | ||
27 | "+c #3F545B", | ||
28 | "@c #394E56", | ||
29 | "#c #2F454C", | ||
30 | "$c #364B52", | ||
31 | ".+++++++++++++++", | ||
32 | "@###############", | ||
33 | "+$$$$$$$$$$$$$$$", | ||
34 | "@###############", | ||
35 | "+$$$$$$$$$$$$$$$", | ||
36 | "@###############", | ||
37 | "+$$$$$$$$$$$$$$$", | ||
38 | "@###############", | ||
39 | "+$$$$$$$$$$$$$$$", | ||
40 | "@###############", | ||
41 | "+$$$$$$$$$$$$$$$", | ||
42 | "@###############", | ||
43 | "+$$$$$$$$$$$$$$$", | ||
44 | "@###############", | ||
45 | "+$$$$$$$$$$$$$$$", | ||
46 | "@###############"}; | ||
47 | |||
48 | |||
22 | MFrequencySpectrum::MFrequencySpectrum( int channels, QWidget* parent, const char* name, WFlags f) | 49 | MFrequencySpectrum::MFrequencySpectrum( int channels, QWidget* parent, const char* name, WFlags f) |
23 | :QWidget( parent, name,f ), _channels( channels ) | 50 | :QWidget( parent, name,f ), _channels( channels ) |
24 | { | 51 | { |
@@ -85,7 +112,7 @@ void MFrequencySpectrum::drawBar( QPainter* p, int x, int y, int width, int heig | |||
85 | } | 112 | } |
86 | 113 | ||
87 | 114 | ||
88 | void MFrequencySpectrum::paintEvent( QPaintEvent* e ) | 115 | void MFrequencySpectrum::paintEvent( QPaintEvent* ) |
89 | { | 116 | { |
90 | QPixmap pm( size() ); | 117 | QPixmap pm( size() ); |
91 | QPainter p; | 118 | QPainter p; |
@@ -118,7 +145,6 @@ void MFrequencySpectrum::mousePressEvent( QMouseEvent* e ) | |||
118 | int xmargin = 5; | 145 | int xmargin = 5; |
119 | int ymargin = 2; | 146 | int ymargin = 2; |
120 | int y = size().height() - 2 * ymargin; | 147 | int y = size().height() - 2 * ymargin; |
121 | int x = 0; | ||
122 | int width = ( size().width() - 2 * xmargin ) / _channels; | 148 | int width = ( size().width() - 2 * xmargin ) / _channels; |
123 | 149 | ||
124 | QPoint pos = e->pos(); | 150 | QPoint pos = e->pos(); |
@@ -142,8 +168,6 @@ Legende::Legende( int channels, QWidget* parent, const char* name, WFlags f ) | |||
142 | void Legende::drawContents( QPainter* p ) | 168 | void Legende::drawContents( QPainter* p ) |
143 | { | 169 | { |
144 | int xmargin = 5; | 170 | int xmargin = 5; |
145 | int ymargin = 2; | ||
146 | int x = 0; | ||
147 | int width = ( contentsRect().width() - 2 * xmargin ) / _channels; | 171 | int width = ( contentsRect().width() - 2 * xmargin ) / _channels; |
148 | 172 | ||
149 | for ( int i = 0; i < _channels; ++i ) | 173 | for ( int i = 0; i < _channels; ++i ) |
@@ -170,7 +194,7 @@ void MGraphWindow::testGraph() | |||
170 | } | 194 | } |
171 | 195 | ||
172 | 196 | ||
173 | void MGraphWindow::timerEvent( QTimerEvent* e ) | 197 | void MGraphWindow::timerEvent( QTimerEvent* ) |
174 | { | 198 | { |
175 | for ( int i = 0; i < 14; i++ ) | 199 | for ( int i = 0; i < 14; i++ ) |
176 | { | 200 | { |