author | mickeyl <mickeyl> | 2004-03-09 17:59:55 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2004-03-09 17:59:55 (UTC) |
commit | dd34b866c0f3e5041696dd97cf356d86a8d6d212 (patch) (unidiff) | |
tree | fb4c6e414b851a3000d91d34d38a666da1fbf95a | |
parent | 25434cbbcd2d2473c9cd3d486cec7a96a6a6323e (diff) | |
download | opie-dd34b866c0f3e5041696dd97cf356d86a8d6d212.zip opie-dd34b866c0f3e5041696dd97cf356d86a8d6d212.tar.gz opie-dd34b866c0f3e5041696dd97cf356d86a8d6d212.tar.bz2 |
on the way to a new hex window
-rw-r--r-- | noncore/net/wellenreiter/TODO | 7 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/main.cpp | 1 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/mainwindow.cpp | 5 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/packetview.cpp | 48 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/packetview.h | 19 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiter.cpp | 4 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiter.h | 4 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiterbase.cpp | 14 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiterbase.h | 4 |
9 files changed, 75 insertions, 31 deletions
diff --git a/noncore/net/wellenreiter/TODO b/noncore/net/wellenreiter/TODO index f3fd205..5f37ddf 100644 --- a/noncore/net/wellenreiter/TODO +++ b/noncore/net/wellenreiter/TODO | |||
@@ -37,24 +37,31 @@ ENGINE | |||
37 | --------- | 37 | --------- |
38 | 38 | ||
39 | - display interface capabilities (or rewrite networksettings?) | 39 | - display interface capabilities (or rewrite networksettings?) |
40 | 40 | ||
41 | - distinguish wireless bridges (WDS traffic) | 41 | - distinguish wireless bridges (WDS traffic) |
42 | 42 | ||
43 | - add configuration for scrollback buffer in hex window and log window | 43 | - add configuration for scrollback buffer in hex window and log window |
44 | 44 | ||
45 | - revamp hex window, make it more sophisticated than just a QMultiLineEdit | 45 | - revamp hex window, make it more sophisticated than just a QMultiLineEdit |
46 | - tree view | 46 | - tree view |
47 | 47 | ||
48 | - beep over headphone / customizable | 48 | - beep over headphone / customizable |
49 | 49 | ||
50 | - count/display number of wireless networks / APs since last start/stop | 50 | - count/display number of wireless networks / APs since last start/stop |
51 | 51 | ||
52 | --------- | 52 | --------- |
53 | FILES | 53 | FILES |
54 | --------- | 54 | --------- |
55 | 55 | ||
56 | - write kismet-like .network format and format to be importable into AutoRoute | 56 | - write kismet-like .network format and format to be importable into AutoRoute |
57 | 57 | ||
58 | - implement beacon stripping (the first beacon is enough to detect a | 58 | - implement beacon stripping (the first beacon is enough to detect a |
59 | new network - further beacons just blow up the capture file) | 59 | new network - further beacons just blow up the capture file) |
60 | 60 | ||
61 | - write wi-scan format like that: | ||
62 | # $Creator: Wellenreiter II Version 1.0.2 | ||
63 | # $Format: wi-scan | ||
64 | # Latitude Longitude ( SSID ) Type ( BSSID ) Time (GMT) [ SNR Sig Noise ] | ||
65 | # $DateGMT: 2004-02-07 | ||
66 | N 41.1008009 W 8.3893034 ( Porceven ) BBS ( 00:a0:f8:41:91:63 ) 22:32:39 (GMT) [ 21 177 156 ] | ||
67 | |||
diff --git a/noncore/net/wellenreiter/gui/main.cpp b/noncore/net/wellenreiter/gui/main.cpp index be7a528..7dcc583 100644 --- a/noncore/net/wellenreiter/gui/main.cpp +++ b/noncore/net/wellenreiter/gui/main.cpp | |||
@@ -31,48 +31,49 @@ | |||
31 | 31 | ||
32 | int main( int argc, char **argv ) | 32 | int main( int argc, char **argv ) |
33 | { | 33 | { |
34 | #ifdef QWS | 34 | #ifdef QWS |
35 | OApplication a( argc, argv, "Wellenreiter II" ); | 35 | OApplication a( argc, argv, "Wellenreiter II" ); |
36 | #else | 36 | #else |
37 | QApplication a( argc, argv ); | 37 | QApplication a( argc, argv ); |
38 | #endif | 38 | #endif |
39 | WellenreiterMainWindow* w = new WellenreiterMainWindow(); | 39 | WellenreiterMainWindow* w = new WellenreiterMainWindow(); |
40 | #ifdef QWS | 40 | #ifdef QWS |
41 | a.showMainWidget( w ); | 41 | a.showMainWidget( w ); |
42 | #else | 42 | #else |
43 | a.setMainWidget( w ); | 43 | a.setMainWidget( w ); |
44 | w->setCaption( "Wellenreiter II" ); | 44 | w->setCaption( "Wellenreiter II" ); |
45 | w->show(); | 45 | w->show(); |
46 | #endif | 46 | #endif |
47 | 47 | ||
48 | a.processEvents(); // show the window before doing the safety checks | 48 | a.processEvents(); // show the window before doing the safety checks |
49 | int result = -1; | 49 | int result = -1; |
50 | static int killed = false; | 50 | static int killed = false; |
51 | 51 | ||
52 | bool check = true; | 52 | bool check = true; |
53 | for ( int i = 1; i < argc; ++i ) | 53 | for ( int i = 1; i < argc; ++i ) |
54 | { | 54 | { |
55 | qDebug( "Wellenreiter::main() parsing argument %d = '%s'", i, argv[i] ); | ||
55 | if ( !strcmp( "-nocheck", argv[i] ) ) | 56 | if ( !strcmp( "-nocheck", argv[i] ) ) |
56 | { | 57 | { |
57 | qDebug( "-nocheck found" ); | 58 | qDebug( "-nocheck found" ); |
58 | check = false; | 59 | check = false; |
59 | break; | 60 | break; |
60 | } | 61 | } |
61 | } | 62 | } |
62 | 63 | ||
63 | if ( check ) | 64 | if ( check ) |
64 | { | 65 | { |
65 | // root check | 66 | // root check |
66 | if ( getuid() ) | 67 | if ( getuid() ) |
67 | { | 68 | { |
68 | qWarning( QObject::tr( "Wellenreiter: trying to run as non-root!" ) ); | 69 | qWarning( QObject::tr( "Wellenreiter: trying to run as non-root!" ) ); |
69 | result = QMessageBox::warning( w, " - Wellenreiter II - (non-root)", QObject::tr( "You have started Wellenreiter II\n" | 70 | result = QMessageBox::warning( w, " - Wellenreiter II - (non-root)", QObject::tr( "You have started Wellenreiter II\n" |
70 | "as non-root. You will have\nonly limited functionality.\nProceed anyway?" ), | 71 | "as non-root. You will have\nonly limited functionality.\nProceed anyway?" ), |
71 | QMessageBox::Yes, QMessageBox::No ); | 72 | QMessageBox::Yes, QMessageBox::No ); |
72 | if ( result == QMessageBox::No ) return -1; | 73 | if ( result == QMessageBox::No ) return -1; |
73 | } | 74 | } |
74 | 75 | ||
75 | int dhcpid = OProcess::processPID( "dhcpc" ); | 76 | int dhcpid = OProcess::processPID( "dhcpc" ); |
76 | 77 | ||
77 | if ( dhcpid ) | 78 | if ( dhcpid ) |
78 | { | 79 | { |
diff --git a/noncore/net/wellenreiter/gui/mainwindow.cpp b/noncore/net/wellenreiter/gui/mainwindow.cpp index 6f57a7f..5cc0daf 100644 --- a/noncore/net/wellenreiter/gui/mainwindow.cpp +++ b/noncore/net/wellenreiter/gui/mainwindow.cpp | |||
@@ -1,43 +1,43 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Wellenreiter II. | 4 | ** This file is part of Wellenreiter II. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | **********************************************************************/ | 14 | **********************************************************************/ |
15 | 15 | ||
16 | #include "configwindow.h" | 16 | #include "configwindow.h" |
17 | #include "gps.h" | 17 | #include "gps.h" |
18 | #include "logwindow.h" | 18 | #include "logwindow.h" |
19 | #include "hexwindow.h" | 19 | #include "packetview.h" |
20 | #include "mainwindow.h" | 20 | #include "mainwindow.h" |
21 | #include "wellenreiter.h" | 21 | #include "wellenreiter.h" |
22 | #include "scanlist.h" | 22 | #include "scanlist.h" |
23 | 23 | ||
24 | #include <qcombobox.h> | 24 | #include <qcombobox.h> |
25 | #include <qdatastream.h> | 25 | #include <qdatastream.h> |
26 | #include <qfile.h> | 26 | #include <qfile.h> |
27 | #include <qfileinfo.h> | 27 | #include <qfileinfo.h> |
28 | #include <qlabel.h> | 28 | #include <qlabel.h> |
29 | #include <qlayout.h> | 29 | #include <qlayout.h> |
30 | #include <qlineedit.h> | 30 | #include <qlineedit.h> |
31 | #include <qiconset.h> | 31 | #include <qiconset.h> |
32 | #include <qmenubar.h> | 32 | #include <qmenubar.h> |
33 | #include <qmessagebox.h> | 33 | #include <qmessagebox.h> |
34 | #include <qpopupmenu.h> | 34 | #include <qpopupmenu.h> |
35 | #include <qpushbutton.h> | 35 | #include <qpushbutton.h> |
36 | #include <qstatusbar.h> | 36 | #include <qstatusbar.h> |
37 | #include <qspinbox.h> | 37 | #include <qspinbox.h> |
38 | #include <qtextstream.h> | 38 | #include <qtextstream.h> |
39 | #include <qtoolbutton.h> | 39 | #include <qtoolbutton.h> |
40 | #include <qwhatsthis.h> | 40 | #include <qwhatsthis.h> |
41 | 41 | ||
42 | #ifdef QWS | 42 | #ifdef QWS |
43 | #include <qpe/resource.h> | 43 | #include <qpe/resource.h> |
@@ -311,64 +311,67 @@ void WellenreiterMainWindow::fileSaveLog() | |||
311 | 311 | ||
312 | void WellenreiterMainWindow::fileSaveSession() | 312 | void WellenreiterMainWindow::fileSaveSession() |
313 | { | 313 | { |
314 | QString fname = getFileName( true ); | 314 | QString fname = getFileName( true ); |
315 | if ( !fname.isEmpty() ) | 315 | if ( !fname.isEmpty() ) |
316 | { | 316 | { |
317 | 317 | ||
318 | QFile f( fname ); | 318 | QFile f( fname ); |
319 | if ( f.open(IO_WriteOnly) ) | 319 | if ( f.open(IO_WriteOnly) ) |
320 | { | 320 | { |
321 | QDataStream t( &f ); | 321 | QDataStream t( &f ); |
322 | t << *mw->netView(); | 322 | t << *mw->netView(); |
323 | f.close(); | 323 | f.close(); |
324 | qDebug( "Saved session to file '%s'", (const char*) fname ); | 324 | qDebug( "Saved session to file '%s'", (const char*) fname ); |
325 | } | 325 | } |
326 | else | 326 | else |
327 | { | 327 | { |
328 | qDebug( "Problem saving session to file '%s'", (const char*) fname ); | 328 | qDebug( "Problem saving session to file '%s'", (const char*) fname ); |
329 | } | 329 | } |
330 | } | 330 | } |
331 | } | 331 | } |
332 | 332 | ||
333 | void WellenreiterMainWindow::fileSaveHex() | 333 | void WellenreiterMainWindow::fileSaveHex() |
334 | { | 334 | { |
335 | #warning DOES NOT WORK AT THE MOMENT | ||
336 | /* | ||
335 | QString fname = getFileName( true ); | 337 | QString fname = getFileName( true ); |
336 | if ( !fname.isEmpty() ) | 338 | if ( !fname.isEmpty() ) |
337 | { | 339 | { |
338 | QFile f( fname ); | 340 | QFile f( fname ); |
339 | if ( f.open(IO_WriteOnly) ) | 341 | if ( f.open(IO_WriteOnly) ) |
340 | { | 342 | { |
341 | QTextStream t( &f ); | 343 | QTextStream t( &f ); |
342 | t << mw->hexWindow()->getLog(); | 344 | t << mw->hexWindow()->getLog(); |
343 | f.close(); | 345 | f.close(); |
344 | qDebug( "Saved hex log to file '%s'", (const char*) fname ); | 346 | qDebug( "Saved hex log to file '%s'", (const char*) fname ); |
345 | } | 347 | } |
346 | else | 348 | else |
347 | { | 349 | { |
348 | qDebug( "Problem saving hex log to file '%s'", (const char*) fname ); | 350 | qDebug( "Problem saving hex log to file '%s'", (const char*) fname ); |
349 | } | 351 | } |
350 | } | 352 | } |
353 | */ | ||
351 | } | 354 | } |
352 | 355 | ||
353 | void WellenreiterMainWindow::fileLoadSession() | 356 | void WellenreiterMainWindow::fileLoadSession() |
354 | { | 357 | { |
355 | QString fname = getFileName( false ); | 358 | QString fname = getFileName( false ); |
356 | if ( !fname.isEmpty() ) | 359 | if ( !fname.isEmpty() ) |
357 | { | 360 | { |
358 | QFile f( fname ); | 361 | QFile f( fname ); |
359 | if ( f.open(IO_ReadOnly) ) | 362 | if ( f.open(IO_ReadOnly) ) |
360 | { | 363 | { |
361 | QDataStream t( &f ); | 364 | QDataStream t( &f ); |
362 | t >> *mw->netView(); | 365 | t >> *mw->netView(); |
363 | f.close(); | 366 | f.close(); |
364 | qDebug( "Loaded session from file '%s'", (const char*) fname ); | 367 | qDebug( "Loaded session from file '%s'", (const char*) fname ); |
365 | } | 368 | } |
366 | else | 369 | else |
367 | { | 370 | { |
368 | qDebug( "Problem loading session from file '%s'", (const char*) fname ); | 371 | qDebug( "Problem loading session from file '%s'", (const char*) fname ); |
369 | } | 372 | } |
370 | } | 373 | } |
371 | } | 374 | } |
372 | 375 | ||
373 | 376 | ||
374 | void WellenreiterMainWindow::fileNew() | 377 | void WellenreiterMainWindow::fileNew() |
diff --git a/noncore/net/wellenreiter/gui/packetview.cpp b/noncore/net/wellenreiter/gui/packetview.cpp index e986b49..ef5d020 100644 --- a/noncore/net/wellenreiter/gui/packetview.cpp +++ b/noncore/net/wellenreiter/gui/packetview.cpp | |||
@@ -1,44 +1,68 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Wellenreiter II. | 4 | ** This file is part of Wellenreiter II. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | **********************************************************************/ | 14 | **********************************************************************/ |
15 | 15 | ||
16 | #include "packetview.h" | 16 | #include "packetview.h" |
17 | #include <qmultilineedit.h> | 17 | |
18 | /* OPIE */ | ||
19 | #include <opie2/opcap.h> | ||
20 | |||
21 | /* QT */ | ||
22 | #include <qtextview.h> | ||
23 | #include <qspinbox.h> | ||
24 | #include <qlabel.h> | ||
25 | #include <qlayout.h> | ||
26 | #include <qlist.h> | ||
18 | 27 | ||
19 | PacketView::PacketView( QWidget * parent, const char * name, WFlags f ) | 28 | PacketView::PacketView( QWidget * parent, const char * name, WFlags f ) |
20 | :QVBox( parent, name, f ) | 29 | :QFrame( parent, name, f ) |
21 | { | 30 | { |
22 | ledit = new QMultiLineEdit( this ); | 31 | _number = new QSpinBox( this ); |
23 | ledit->setFont( QFont( "fixed", 10 ) ); | 32 | _number->setPrefix( "Packet # " ); |
24 | ledit->setReadOnly( true ); | 33 | _label = new QLabel( this ); |
34 | _label->setText( "eth0 2004/03/08 - 00:00:21" ); | ||
35 | _list = new QLabel( this ); | ||
36 | _hex = new QTextView( this ); | ||
37 | |||
38 | QVBoxLayout* vb = new QVBoxLayout( this, 2, 2 ); | ||
39 | QHBoxLayout* hb = new QHBoxLayout( vb, 2 ); | ||
40 | hb->addWidget( _label ); | ||
41 | hb->addWidget( _number ); | ||
42 | vb->addWidget( _list ); | ||
43 | vb->addWidget( _hex ); | ||
44 | |||
45 | _packets.setAutoDelete( true ); | ||
46 | |||
47 | _list->setText( "<b>[ 802.11 [ LLC [ IP [ UDP [ DHCP ] ] ] ] ]</b>" ); | ||
25 | }; | 48 | }; |
26 | 49 | ||
27 | void PacketView::log( const QString& text ) | 50 | void PacketView::add( OPacket* p ) |
28 | { | 51 | { |
29 | int col; | 52 | _packets.append( p ); |
30 | int row; | ||
31 | ledit->getCursorPosition( &col, &row ); | ||
32 | ledit->insertAt( text, col, row ); | ||
33 | }; | 53 | }; |
34 | 54 | ||
35 | const QString PacketView::getLog() const | 55 | const QString PacketView::getLog() const |
36 | { | 56 | { |
37 | return ledit->text(); | ||
38 | } | 57 | } |
39 | 58 | ||
40 | void PacketView::clear() | 59 | void PacketView::clear() |
41 | { | 60 | { |
42 | ledit->clear(); | 61 | _packets.clear(); |
62 | _number->setMinValue( 0 ); | ||
63 | _number->setMaxValue( 0 ); | ||
64 | _label->setText( "---" ); | ||
65 | _list->setText( " <b>-- no Packet available --</b> " ); | ||
66 | _hex->setText( " <i>-- no Packet available --</i> " ); | ||
43 | } | 67 | } |
44 | 68 | ||
diff --git a/noncore/net/wellenreiter/gui/packetview.h b/noncore/net/wellenreiter/gui/packetview.h index ee3cf3a..b5f2b26 100644 --- a/noncore/net/wellenreiter/gui/packetview.h +++ b/noncore/net/wellenreiter/gui/packetview.h | |||
@@ -1,40 +1,49 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Wellenreiter II. | 4 | ** This file is part of Wellenreiter II. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | **********************************************************************/ | 14 | **********************************************************************/ |
15 | 15 | ||
16 | #ifndef PACKETVIEW_H | 16 | #ifndef PACKETVIEW_H |
17 | #define PACKETVIEW_H | 17 | #define PACKETVIEW_H |
18 | 18 | ||
19 | #include <qvbox.h> | 19 | #include <qlist.h> |
20 | #include <qframe.h> | ||
20 | 21 | ||
21 | class QString; | 22 | class QString; |
22 | class QMultiLineEdit; | 23 | class QSpinBox; |
24 | class QLabel; | ||
25 | class QTextView; | ||
26 | class OPacket; | ||
23 | 27 | ||
24 | class PacketView: public QVBox | 28 | class PacketView: public QFrame |
25 | { | 29 | { |
26 | 30 | ||
27 | public: | 31 | public: |
28 | PacketView( QWidget * parent = 0, const char * name = "PacketView", WFlags f = 0 ); | 32 | PacketView( QWidget * parent = 0, const char * name = "PacketView", WFlags f = 0 ); |
29 | 33 | ||
30 | void log( const QString& text ); | 34 | void add( OPacket* p ); |
31 | const QString getLog() const; | 35 | const QString getLog() const; |
32 | void clear(); | 36 | void clear(); |
33 | 37 | ||
34 | protected: | 38 | protected: |
35 | QMultiLineEdit* ledit; | 39 | |
40 | QSpinBox* _number; | ||
41 | QLabel* _label; | ||
42 | QLabel* _list; | ||
43 | QTextView* _hex; | ||
44 | QList<OPacket> _packets; | ||
36 | 45 | ||
37 | }; | 46 | }; |
38 | 47 | ||
39 | #endif | 48 | #endif |
40 | 49 | ||
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp index 67e3940..ce416e5 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp | |||
@@ -1,44 +1,44 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file may be distributed and/or modified under the terms of the | 4 | ** This file may be distributed and/or modified under the terms of the |
5 | ** GNU General Public License version 2 as published by the Free Software | 5 | ** GNU General Public License version 2 as published by the Free Software |
6 | ** Foundation and appearing in the file LICENSE.GPL included in the | 6 | ** Foundation and appearing in the file LICENSE.GPL included in the |
7 | ** packaging of this file. | 7 | ** packaging of this file. |
8 | ** | 8 | ** |
9 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 9 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
10 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 10 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
11 | ** | 11 | ** |
12 | ***********************************************************************/ | 12 | ***********************************************************************/ |
13 | 13 | ||
14 | // Local | 14 | // Local |
15 | 15 | ||
16 | #include "gps.h" | 16 | #include "gps.h" |
17 | #include "wellenreiter.h" | 17 | #include "wellenreiter.h" |
18 | #include "scanlist.h" | 18 | #include "scanlist.h" |
19 | #include "logwindow.h" | 19 | #include "logwindow.h" |
20 | #include "hexwindow.h" | 20 | #include "packetview.h" |
21 | #include "configwindow.h" | 21 | #include "configwindow.h" |
22 | #include "statwindow.h" | 22 | #include "statwindow.h" |
23 | #include "graphwindow.h" | 23 | #include "graphwindow.h" |
24 | #include "protolistview.h" | 24 | #include "protolistview.h" |
25 | 25 | ||
26 | // Opie | 26 | // Opie |
27 | 27 | ||
28 | #ifdef QWS | 28 | #ifdef QWS |
29 | #include <opie2/oapplication.h> | 29 | #include <opie2/oapplication.h> |
30 | #include <opie2/odevice.h> | 30 | #include <opie2/odevice.h> |
31 | #else | 31 | #else |
32 | #include <qapplication.h> | 32 | #include <qapplication.h> |
33 | #endif | 33 | #endif |
34 | #include <opie2/omanufacturerdb.h> | 34 | #include <opie2/omanufacturerdb.h> |
35 | #include <opie2/onetwork.h> | 35 | #include <opie2/onetwork.h> |
36 | #include <opie2/opcap.h> | 36 | #include <opie2/opcap.h> |
37 | #include <qpe/qcopenvelope_qws.h> | 37 | #include <qpe/qcopenvelope_qws.h> |
38 | using namespace Opie; | 38 | using namespace Opie; |
39 | 39 | ||
40 | // Qt | 40 | // Qt |
41 | 41 | ||
42 | #include <qcheckbox.h> | 42 | #include <qcheckbox.h> |
43 | #include <qcombobox.h> | 43 | #include <qcombobox.h> |
44 | #include <qdatetime.h> | 44 | #include <qdatetime.h> |
@@ -359,49 +359,49 @@ bool Wellenreiter::checkDumpPacket( OPacket* p ) | |||
359 | { | 359 | { |
360 | QString name = it.current()->name(); | 360 | QString name = it.current()->name(); |
361 | if ( configwindow->capturePackets->isProtocolChecked( name ) ) | 361 | if ( configwindow->capturePackets->isProtocolChecked( name ) ) |
362 | { | 362 | { |
363 | QString action = configwindow->capturePackets->protocolAction( name ); | 363 | QString action = configwindow->capturePackets->protocolAction( name ); |
364 | qDebug( "capturePackets-action for '%s' seems to be '%s'", (const char*) name, (const char*) action ); | 364 | qDebug( "capturePackets-action for '%s' seems to be '%s'", (const char*) name, (const char*) action ); |
365 | if ( action == "Discard" ) | 365 | if ( action == "Discard" ) |
366 | { | 366 | { |
367 | logwindow->log( QString().sprintf( "(i) dump-discarding of '%s' packet requested.", (const char*) name ) ); | 367 | logwindow->log( QString().sprintf( "(i) dump-discarding of '%s' packet requested.", (const char*) name ) ); |
368 | return false; | 368 | return false; |
369 | } | 369 | } |
370 | } | 370 | } |
371 | else | 371 | else |
372 | { | 372 | { |
373 | qDebug( "protocol '%s' not checked in capturePackets.", (const char*) name ); | 373 | qDebug( "protocol '%s' not checked in capturePackets.", (const char*) name ); |
374 | } | 374 | } |
375 | ++it; | 375 | ++it; |
376 | } | 376 | } |
377 | return true; | 377 | return true; |
378 | } | 378 | } |
379 | 379 | ||
380 | 380 | ||
381 | void Wellenreiter::receivePacket( OPacket* p ) | 381 | void Wellenreiter::receivePacket( OPacket* p ) |
382 | { | 382 | { |
383 | hexWindow()->log( p->dump( 8 ) ); | 383 | hexWindow()->add( p ); |
384 | 384 | ||
385 | if ( checkDumpPacket( p ) ) | 385 | if ( checkDumpPacket( p ) ) |
386 | { | 386 | { |
387 | pcap->dump( p ); | 387 | pcap->dump( p ); |
388 | } | 388 | } |
389 | 389 | ||
390 | // check for a management frame | 390 | // check for a management frame |
391 | OWaveLanManagementPacket* manage = static_cast<OWaveLanManagementPacket*>( childIfToParse( p, "802.11 Management" ) ); | 391 | OWaveLanManagementPacket* manage = static_cast<OWaveLanManagementPacket*>( childIfToParse( p, "802.11 Management" ) ); |
392 | if ( manage ) | 392 | if ( manage ) |
393 | { | 393 | { |
394 | handleManagementFrame( p, manage ); | 394 | handleManagementFrame( p, manage ); |
395 | return; | 395 | return; |
396 | } | 396 | } |
397 | 397 | ||
398 | // check for a control frame | 398 | // check for a control frame |
399 | OWaveLanControlPacket* control = static_cast<OWaveLanControlPacket*>( childIfToParse( p, "802.11 Control" ) ); | 399 | OWaveLanControlPacket* control = static_cast<OWaveLanControlPacket*>( childIfToParse( p, "802.11 Control" ) ); |
400 | if ( control ) | 400 | if ( control ) |
401 | { | 401 | { |
402 | handleControlFrame( p, control ); | 402 | handleControlFrame( p, control ); |
403 | return; | 403 | return; |
404 | } | 404 | } |
405 | 405 | ||
406 | OMacAddress source; | 406 | OMacAddress source; |
407 | OMacAddress dest; | 407 | OMacAddress dest; |
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.h b/noncore/net/wellenreiter/gui/wellenreiter.h index 745486f..d02813b 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.h +++ b/noncore/net/wellenreiter/gui/wellenreiter.h | |||
@@ -12,64 +12,64 @@ | |||
12 | **********************************************************************/ | 12 | **********************************************************************/ |
13 | 13 | ||
14 | #ifndef WELLENREITER_H | 14 | #ifndef WELLENREITER_H |
15 | #define WELLENREITER_H | 15 | #define WELLENREITER_H |
16 | 16 | ||
17 | #include "wellenreiterbase.h" | 17 | #include "wellenreiterbase.h" |
18 | 18 | ||
19 | #ifdef QWS | 19 | #ifdef QWS |
20 | #include <opie2/odevice.h> | 20 | #include <opie2/odevice.h> |
21 | using namespace Opie; | 21 | using namespace Opie; |
22 | #endif | 22 | #endif |
23 | 23 | ||
24 | class QTimerEvent; | 24 | class QTimerEvent; |
25 | class QPixmap; | 25 | class QPixmap; |
26 | class OPacket; | 26 | class OPacket; |
27 | class OWaveLanManagementPacket; | 27 | class OWaveLanManagementPacket; |
28 | class OWaveLanControlPacket; | 28 | class OWaveLanControlPacket; |
29 | class OWaveLanDataPacket; | 29 | class OWaveLanDataPacket; |
30 | class OEthernetPacket; | 30 | class OEthernetPacket; |
31 | class OARPPacket; | 31 | class OARPPacket; |
32 | class OMacAddress; | 32 | class OMacAddress; |
33 | class OIPPacket; | 33 | class OIPPacket; |
34 | class OPacketCapturer; | 34 | class OPacketCapturer; |
35 | class OWirelessNetworkInterface; | 35 | class OWirelessNetworkInterface; |
36 | class PacketView; | ||
36 | class WellenreiterConfigWindow; | 37 | class WellenreiterConfigWindow; |
37 | class MLogWindow; | 38 | class MLogWindow; |
38 | class MHexWindow; | ||
39 | class GPS; | 39 | class GPS; |
40 | 40 | ||
41 | class Wellenreiter : public WellenreiterBase { | 41 | class Wellenreiter : public WellenreiterBase { |
42 | Q_OBJECT | 42 | Q_OBJECT |
43 | 43 | ||
44 | public: | 44 | public: |
45 | Wellenreiter( QWidget* parent = 0 ); | 45 | Wellenreiter( QWidget* parent = 0 ); |
46 | ~Wellenreiter(); | 46 | ~Wellenreiter(); |
47 | 47 | ||
48 | void setConfigWindow( WellenreiterConfigWindow* cw ); | 48 | void setConfigWindow( WellenreiterConfigWindow* cw ); |
49 | MScanListView* netView() const { return netview; }; | 49 | MScanListView* netView() const { return netview; }; |
50 | MLogWindow* logWindow() const { return logwindow; }; | 50 | MLogWindow* logWindow() const { return logwindow; }; |
51 | MHexWindow* hexWindow() const { return hexwindow; }; | 51 | PacketView* hexWindow() const { return hexwindow; }; |
52 | bool isDaemonRunning() const { return sniffing; }; | 52 | bool isDaemonRunning() const { return sniffing; }; |
53 | QString captureFileName() const { return dumpname; }; | 53 | QString captureFileName() const { return dumpname; }; |
54 | 54 | ||
55 | public: | 55 | public: |
56 | bool sniffing; | 56 | bool sniffing; |
57 | 57 | ||
58 | protected: | 58 | protected: |
59 | virtual void timerEvent( QTimerEvent* ); | 59 | virtual void timerEvent( QTimerEvent* ); |
60 | 60 | ||
61 | public slots: | 61 | public slots: |
62 | void initialTimer(); | 62 | void initialTimer(); |
63 | 63 | ||
64 | void channelHopped(int); | 64 | void channelHopped(int); |
65 | void receivePacket(OPacket*); | 65 | void receivePacket(OPacket*); |
66 | void startClicked(); | 66 | void startClicked(); |
67 | void stopClicked(); | 67 | void stopClicked(); |
68 | 68 | ||
69 | void joinNetwork(const QString&,const QString&,int,const QString&); | 69 | void joinNetwork(const QString&,const QString&,int,const QString&); |
70 | 70 | ||
71 | signals: | 71 | signals: |
72 | void startedSniffing(); | 72 | void startedSniffing(); |
73 | void stoppedSniffing(); | 73 | void stoppedSniffing(); |
74 | 74 | ||
75 | private: | 75 | private: |
diff --git a/noncore/net/wellenreiter/gui/wellenreiterbase.cpp b/noncore/net/wellenreiter/gui/wellenreiterbase.cpp index f57dba2..3d0595d 100644 --- a/noncore/net/wellenreiter/gui/wellenreiterbase.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiterbase.cpp | |||
@@ -1,109 +1,109 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Wellenreiter II. | 4 | ** This file is part of Wellenreiter II. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | ***********************************************************************/ | 14 | ***********************************************************************/ |
15 | 15 | ||
16 | #include "wellenreiterbase.h" | 16 | #include "wellenreiterbase.h" |
17 | 17 | ||
18 | #include <qlabel.h> | 18 | #include <qlabel.h> |
19 | #include <qlayout.h> | 19 | #include <qlayout.h> |
20 | 20 | ||
21 | #include "logwindow.h" | 21 | #include "logwindow.h" |
22 | #include "hexwindow.h" | 22 | #include "packetview.h" |
23 | #include "scanlist.h" | 23 | #include "scanlist.h" |
24 | #include "statwindow.h" | 24 | #include "statwindow.h" |
25 | #include "graphwindow.h" | 25 | #include "graphwindow.h" |
26 | 26 | ||
27 | #ifdef QWS | 27 | #ifdef QWS |
28 | #include <qpe/resource.h> | 28 | #include <qpe/resource.h> |
29 | #include <opie2/otabwidget.h> | 29 | #include <opie2/otabwidget.h> |
30 | using namespace Opie; | 30 | using namespace Opie; |
31 | #else | 31 | #else |
32 | #include "resource.h" | 32 | #include "resource.h" |
33 | #include <qtabwidget.h> | 33 | #include <qtabwidget.h> |
34 | #endif | 34 | #endif |
35 | 35 | ||
36 | 36 | ||
37 | /* | 37 | /* |
38 | * Constructs a WellenreiterBase which is a child of 'parent', with the | 38 | * Constructs a WellenreiterBase which is a child of 'parent', with the |
39 | * name 'name' and widget flags set to 'f' | 39 | * name 'name' and widget flags set to 'f' |
40 | */ | 40 | */ |
41 | WellenreiterBase::WellenreiterBase( QWidget* parent, const char* name, WFlags fl ) | 41 | WellenreiterBase::WellenreiterBase( QWidget* parent, const char* name, WFlags fl ) |
42 | : QWidget( parent, name, fl ) | 42 | : QWidget( parent, name, fl ) |
43 | { | 43 | { |
44 | //ani1 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot0" ) ); | 44 | //ani1 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot0" ) ); |
45 | //ani2 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot90" ) ); | 45 | //ani2 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot90" ) ); |
46 | //ani3 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot180" ) ); | 46 | //ani3 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot180" ) ); |
47 | //ani4 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot270" ) ); | 47 | //ani4 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot270" ) ); |
48 | 48 | ||
49 | if ( !name ) | 49 | if ( !name ) |
50 | setName( "WellenreiterBase" ); | 50 | setName( "WellenreiterBase" ); |
51 | resize( 191, 294 ); | 51 | resize( 191, 294 ); |
52 | #ifdef QWS | 52 | #ifdef QWS |
53 | setCaption( tr( "Wellenreiter/Opie" ) ); | 53 | setCaption( tr( "Wellenreiter/Opie" ) ); |
54 | #else | 54 | #else |
55 | setCaption( tr( "Wellenreiter/X11" ) ); | 55 | setCaption( tr( "Wellenreiter/X11" ) ); |
56 | #endif | 56 | #endif |
57 | WellenreiterBaseLayout = new QVBoxLayout( this ); | 57 | WellenreiterBaseLayout = new QVBoxLayout( this ); |
58 | WellenreiterBaseLayout->setSpacing( 2 ); | 58 | WellenreiterBaseLayout->setSpacing( 2 ); |
59 | WellenreiterBaseLayout->setMargin( 0 ); | 59 | WellenreiterBaseLayout->setMargin( 0 ); |
60 | #ifdef QWS | 60 | #ifdef QWS |
61 | TabWidget = new OTabWidget( this, "TabWidget", OTabWidget::Global ); | 61 | TabWidget = new OTabWidget( this, "TabWidget", OTabWidget::Global ); |
62 | #else | 62 | #else |
63 | TabWidget = new QTabWidget( this, "TabWidget" ); | 63 | TabWidget = new QTabWidget( this, "TabWidget" ); |
64 | #endif | 64 | #endif |
65 | ap = new QWidget( TabWidget, "ap" ); | 65 | ap = new QWidget( TabWidget, "ap" ); |
66 | apLayout = new QVBoxLayout( ap ); | 66 | apLayout = new QVBoxLayout( ap ); |
67 | apLayout->setSpacing( 2 ); | 67 | apLayout->setSpacing( 2 ); |
68 | apLayout->setMargin( 2 ); | 68 | apLayout->setMargin( 2 ); |
69 | 69 | ||
70 | //--------- NETVIEW TAB -------------- | 70 | //--------- NETVIEW TAB -------------- |
71 | 71 | ||
72 | netview = new MScanListView( ap ); | 72 | netview = new MScanListView( ap ); |
73 | apLayout->addWidget( netview ); | 73 | apLayout->addWidget( netview ); |
74 | 74 | ||
75 | //--------- GRAPH TAB -------------- | 75 | //--------- GRAPH TAB -------------- |
76 | 76 | ||
77 | graphwindow = new MGraphWindow( TabWidget, "Graph" ); | 77 | graphwindow = new MGraphWindow( TabWidget, "Graph" ); |
78 | 78 | ||
79 | //--------- LOG TAB -------------- | 79 | //--------- LOG TAB -------------- |
80 | 80 | ||
81 | logwindow = new MLogWindow( TabWidget, "Log" ); | 81 | logwindow = new MLogWindow( TabWidget, "Log" ); |
82 | 82 | ||
83 | //--------- HEX TAB -------------- | 83 | //--------- HEX TAB -------------- |
84 | 84 | ||
85 | hexwindow = new MHexWindow( TabWidget, "Hex" ); | 85 | hexwindow = new PacketView( TabWidget, "Hex" ); |
86 | 86 | ||
87 | //--------- STAT TAB -------------- | 87 | //--------- STAT TAB -------------- |
88 | 88 | ||
89 | statwindow = new MStatWindow( TabWidget, "Stat" ); | 89 | statwindow = new MStatWindow( TabWidget, "Stat" ); |
90 | 90 | ||
91 | //--------- ABOUT TAB -------------- | 91 | //--------- ABOUT TAB -------------- |
92 | 92 | ||
93 | about = new QWidget( TabWidget, "about" ); | 93 | about = new QWidget( TabWidget, "about" ); |
94 | aboutLayout = new QGridLayout( about ); | 94 | aboutLayout = new QGridLayout( about ); |
95 | aboutLayout->setSpacing( 6 ); | 95 | aboutLayout->setSpacing( 6 ); |
96 | aboutLayout->setMargin( 11 ); | 96 | aboutLayout->setMargin( 11 ); |
97 | 97 | ||
98 | PixmapLabel1_3_2 = new QLabel( about, "PixmapLabel1_3_2" ); | 98 | PixmapLabel1_3_2 = new QLabel( about, "PixmapLabel1_3_2" ); |
99 | PixmapLabel1_3_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, PixmapLabel1_3_2->sizePolicy().hasHeightForWidth() ) ); | 99 | PixmapLabel1_3_2->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)0, (QSizePolicy::SizeType)0, PixmapLabel1_3_2->sizePolicy().hasHeightForWidth() ) ); |
100 | PixmapLabel1_3_2->setFrameShape( QLabel::Panel ); | 100 | PixmapLabel1_3_2->setFrameShape( QLabel::Panel ); |
101 | PixmapLabel1_3_2->setFrameShadow( QLabel::Sunken ); | 101 | PixmapLabel1_3_2->setFrameShadow( QLabel::Sunken ); |
102 | PixmapLabel1_3_2->setLineWidth( 2 ); | 102 | PixmapLabel1_3_2->setLineWidth( 2 ); |
103 | PixmapLabel1_3_2->setMargin( 0 ); | 103 | PixmapLabel1_3_2->setMargin( 0 ); |
104 | PixmapLabel1_3_2->setMidLineWidth( 0 ); | 104 | PixmapLabel1_3_2->setMidLineWidth( 0 ); |
105 | PixmapLabel1_3_2->setPixmap( Resource::loadPixmap( "wellenreiter/logo" ) ); | 105 | PixmapLabel1_3_2->setPixmap( Resource::loadPixmap( "wellenreiter/logo" ) ); |
106 | PixmapLabel1_3_2->setScaledContents( TRUE ); | 106 | PixmapLabel1_3_2->setScaledContents( TRUE ); |
107 | PixmapLabel1_3_2->setAlignment( int( QLabel::AlignCenter ) ); | 107 | PixmapLabel1_3_2->setAlignment( int( QLabel::AlignCenter ) ); |
108 | 108 | ||
109 | aboutLayout->addWidget( PixmapLabel1_3_2, 0, 0 ); | 109 | aboutLayout->addWidget( PixmapLabel1_3_2, 0, 0 ); |
@@ -134,44 +134,44 @@ WellenreiterBase::WellenreiterBase( QWidget* parent, const char* name, WFlags f | |||
134 | #else | 134 | #else |
135 | TabWidget->addTab( ap, /* "wellenreiter/networks", */ tr( "Networks" ) ); | 135 | TabWidget->addTab( ap, /* "wellenreiter/networks", */ tr( "Networks" ) ); |
136 | TabWidget->addTab( graphwindow, /* "wellenreiter/graph", */ tr( "Graph" ) ); | 136 | TabWidget->addTab( graphwindow, /* "wellenreiter/graph", */ tr( "Graph" ) ); |
137 | TabWidget->addTab( logwindow, /* "wellenreiter/log", */ tr( "Log" ) ); | 137 | TabWidget->addTab( logwindow, /* "wellenreiter/log", */ tr( "Log" ) ); |
138 | TabWidget->addTab( hexwindow, /* "wellenreiter/hex", */ tr( "Hex" ) ); | 138 | TabWidget->addTab( hexwindow, /* "wellenreiter/hex", */ tr( "Hex" ) ); |
139 | TabWidget->addTab( statwindow, /* "wellenreiter/hex", */ tr( "Stat" ) ); | 139 | TabWidget->addTab( statwindow, /* "wellenreiter/hex", */ tr( "Stat" ) ); |
140 | TabWidget->addTab( about, /* "wellenreiter/about", */ tr( "About" ) ); | 140 | TabWidget->addTab( about, /* "wellenreiter/about", */ tr( "About" ) ); |
141 | #endif | 141 | #endif |
142 | WellenreiterBaseLayout->addWidget( TabWidget ); | 142 | WellenreiterBaseLayout->addWidget( TabWidget ); |
143 | 143 | ||
144 | #ifdef QWS | 144 | #ifdef QWS |
145 | TabWidget->setCurrentTab( tr( "Nets" ) ); | 145 | TabWidget->setCurrentTab( tr( "Nets" ) ); |
146 | #endif | 146 | #endif |
147 | 147 | ||
148 | } | 148 | } |
149 | 149 | ||
150 | /* | 150 | /* |
151 | * Destroys the object and frees any allocated resources | 151 | * Destroys the object and frees any allocated resources |
152 | */ | 152 | */ |
153 | WellenreiterBase::~WellenreiterBase() | 153 | WellenreiterBase::~WellenreiterBase() |
154 | { | 154 | { |
155 | // no need to delete child widgets, Qt does it all for us | 155 | // no need to delete child widgets, Qt does it all for us |
156 | } | 156 | } |
157 | 157 | ||
158 | /* | 158 | /* |
159 | * Main event handler. Reimplemented to handle application | 159 | * Main event handler. Reimplemented to handle application |
160 | * font changes | 160 | * font changes |
161 | */ | 161 | */ |
162 | bool WellenreiterBase::event( QEvent* ev ) | 162 | bool WellenreiterBase::event( QEvent* ev ) |
163 | { | 163 | { |
164 | bool ret = QWidget::event( ev ); | 164 | bool ret = QWidget::event( ev ); |
165 | if ( ev->type() == QEvent::ApplicationFontChange ) { | 165 | if ( ev->type() == QEvent::ApplicationFontChange ) { |
166 | //QFont Log_2_font( Log_2->font() ); | 166 | //QFont Log_2_font( Log_2->font() ); |
167 | //Log_2_font.setFamily( "adobe-courier" ); | 167 | //Log_2_font.setFamily( "adobe-courier" ); |
168 | //Log_2_font.setPointSize( 8 ); | 168 | //Log_2_font.setPointSize( 8 ); |
169 | //Log_2->setFont( Log_2_font ); | 169 | //Log_2->setFont( Log_2_font ); |
170 | QFont TextLabel1_4_2_font( TextLabel1_4_2->font() ); | 170 | QFont TextLabel1_4_2_font( TextLabel1_4_2->font() ); |
171 | TextLabel1_4_2_font.setFamily( "adobe-helvetica" ); | 171 | TextLabel1_4_2_font.setFamily( "adobe-helvetica" ); |
172 | TextLabel1_4_2_font.setPointSize( 10 ); | 172 | TextLabel1_4_2_font.setPointSize( 10 ); |
173 | TextLabel1_4_2->setFont( TextLabel1_4_2_font ); | 173 | TextLabel1_4_2->setFont( TextLabel1_4_2_font ); |
174 | } | 174 | } |
175 | return ret; | 175 | return ret; |
176 | } | 176 | } |
177 | 177 | ||
diff --git a/noncore/net/wellenreiter/gui/wellenreiterbase.h b/noncore/net/wellenreiter/gui/wellenreiterbase.h index 5e00ddc..126aad2 100644 --- a/noncore/net/wellenreiter/gui/wellenreiterbase.h +++ b/noncore/net/wellenreiter/gui/wellenreiterbase.h | |||
@@ -5,73 +5,73 @@ | |||
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
13 | ** | 13 | ** |
14 | **********************************************************************/ | 14 | **********************************************************************/ |
15 | 15 | ||
16 | #ifndef WELLENREITERBASE_H | 16 | #ifndef WELLENREITERBASE_H |
17 | #define WELLENREITERBASE_H | 17 | #define WELLENREITERBASE_H |
18 | 18 | ||
19 | #include <qvariant.h> | 19 | #include <qvariant.h> |
20 | #include <qwidget.h> | 20 | #include <qwidget.h> |
21 | class QVBoxLayout; | 21 | class QVBoxLayout; |
22 | class QHBoxLayout; | 22 | class QHBoxLayout; |
23 | class QGridLayout; | 23 | class QGridLayout; |
24 | class QLabel; | 24 | class QLabel; |
25 | class MScanListView; | 25 | class MScanListView; |
26 | class MScanListItem; | 26 | class MScanListItem; |
27 | class QPushButton; | 27 | class QPushButton; |
28 | class MLogWindow; | 28 | class MLogWindow; |
29 | class MHexWindow; | ||
30 | class MStatWindow; | 29 | class MStatWindow; |
31 | class MGraphWindow; | 30 | class MGraphWindow; |
31 | class PacketView; | ||
32 | 32 | ||
33 | #ifdef QWS | 33 | #ifdef QWS |
34 | #include <opie2/otabwidget.h> | 34 | #include <opie2/otabwidget.h> |
35 | using namespace Opie; | 35 | using namespace Opie; |
36 | #else | 36 | #else |
37 | class QTabWidget; | 37 | class QTabWidget; |
38 | #endif | 38 | #endif |
39 | 39 | ||
40 | class WellenreiterBase : public QWidget | 40 | class WellenreiterBase : public QWidget |
41 | { | 41 | { |
42 | Q_OBJECT | 42 | Q_OBJECT |
43 | 43 | ||
44 | public: | 44 | public: |
45 | WellenreiterBase( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); | 45 | WellenreiterBase( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); |
46 | ~WellenreiterBase(); | 46 | ~WellenreiterBase(); |
47 | 47 | ||
48 | #ifdef QWS | 48 | #ifdef QWS |
49 | OTabWidget* TabWidget; | 49 | OTabWidget* TabWidget; |
50 | #else | 50 | #else |
51 | QTabWidget* TabWidget; | 51 | QTabWidget* TabWidget; |
52 | #endif | 52 | #endif |
53 | QWidget* ap; | 53 | QWidget* ap; |
54 | MScanListView* netview; | 54 | MScanListView* netview; |
55 | MLogWindow* logwindow; | 55 | MLogWindow* logwindow; |
56 | MHexWindow* hexwindow; | 56 | PacketView* hexwindow; |
57 | MStatWindow* statwindow; | 57 | MStatWindow* statwindow; |
58 | MGraphWindow* graphwindow; | 58 | MGraphWindow* graphwindow; |
59 | QWidget* about; | 59 | QWidget* about; |
60 | QLabel* PixmapLabel1_3_2; | 60 | QLabel* PixmapLabel1_3_2; |
61 | QLabel* TextLabel1_4_2; | 61 | QLabel* TextLabel1_4_2; |
62 | 62 | ||
63 | protected: | 63 | protected: |
64 | QVBoxLayout* WellenreiterBaseLayout; | 64 | QVBoxLayout* WellenreiterBaseLayout; |
65 | QVBoxLayout* apLayout; | 65 | QVBoxLayout* apLayout; |
66 | QGridLayout* aboutLayout; | 66 | QGridLayout* aboutLayout; |
67 | bool event( QEvent* ); | 67 | bool event( QEvent* ); |
68 | 68 | ||
69 | QPixmap* ani1; | 69 | QPixmap* ani1; |
70 | QPixmap* ani2; | 70 | QPixmap* ani2; |
71 | QPixmap* ani3; | 71 | QPixmap* ani3; |
72 | QPixmap* ani4; | 72 | QPixmap* ani4; |
73 | 73 | ||
74 | 74 | ||
75 | }; | 75 | }; |
76 | 76 | ||
77 | #endif // WELLENREITERBASE_H | 77 | #endif // WELLENREITERBASE_H |