summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2003-02-23 15:14:18 (UTC)
committer mickeyl <mickeyl>2003-02-23 15:14:18 (UTC)
commit9b7faae2ec12eeb9a056ca6093ac6e0840b11717 (patch) (unidiff)
treefc4d9de4ee2fd5c502513ccf0fa592bfaaa87185
parent791c7512c530cb373726f9c01e26229cb8ca992a (diff)
downloadopie-9b7faae2ec12eeb9a056ca6093ac6e0840b11717.zip
opie-9b7faae2ec12eeb9a056ca6093ac6e0840b11717.tar.gz
opie-9b7faae2ec12eeb9a056ca6093ac6e0840b11717.tar.bz2
- revamped part of the gui
- configuration is now a seperate dialog - orinoco_hopper is no longer needed
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/contrib/orinoco_hopper/orinoco_hopper.c118
-rw-r--r--noncore/net/wellenreiter/contrib/orinoco_hopper/orinoco_hopper.pro15
-rw-r--r--noncore/net/wellenreiter/gui/configbase.ui4
-rw-r--r--noncore/net/wellenreiter/gui/configwindow.cpp2
-rw-r--r--noncore/net/wellenreiter/gui/gui.pro12
-rw-r--r--noncore/net/wellenreiter/gui/mainwindow.cpp74
-rw-r--r--noncore/net/wellenreiter/gui/mainwindow.h8
-rw-r--r--noncore/net/wellenreiter/gui/manufacturers.cpp8
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.cpp37
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.h21
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiterbase.cpp50
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiterbase.h13
-rw-r--r--noncore/net/wellenreiter/wellenreiter.pro2
13 files changed, 135 insertions, 229 deletions
diff --git a/noncore/net/wellenreiter/contrib/orinoco_hopper/orinoco_hopper.c b/noncore/net/wellenreiter/contrib/orinoco_hopper/orinoco_hopper.c
deleted file mode 100644
index 78f0299..0000000
--- a/noncore/net/wellenreiter/contrib/orinoco_hopper/orinoco_hopper.c
+++ b/dev/null
@@ -1,118 +0,0 @@
1/* orinoco_hopper.c
2 * orinoco wireless nic channel scanning utility
3 *
4 * By Snax <snax@shmoo.com>
5 * Copyright (c) 2002 Snax
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * For a copy of the GNU General Public License write to the Free Software
18 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19 */
20
21#include <stdio.h>
22#include <stdlib.h>
23#include <sys/time.h>
24#include <signal.h>
25#include <string.h>
26#include <sys/ioctl.h>
27#include <sys/socket.h>
28#include <linux/wireless.h>
29#include <unistd.h>
30#include <getopt.h>
31
32#ifndef SIOCIWFIRSTPRIV
33#define SIOCIWFIRSTPRIV SIOCDEVPRIVATE
34#endif
35
36void changeChannel(int);
37int setChannel( unsigned char channel );
38
39int max = 11;
40int mode = 2;
41char dev[32];
42
43void changeChannel(int x) {
44 static int chan = 0;
45 chan = (chan % max) + 1;
46 setChannel(chan);
47}
48
49int setChannel( unsigned char channel )
50{
51 int result = 0;
52 int fd;
53 struct iwreq ireq; //for Orinoco
54 int *ptr;
55
56 /* get a socket */
57 fd = socket(AF_INET, SOCK_STREAM, 0);
58
59 if ( fd == -1 ) {
60 return -1;
61 }
62 ptr = (int *) ireq.u.name;
63 ptr[0] = mode;
64 ptr[1] = channel;
65 strcpy(ireq.ifr_ifrn.ifrn_name, dev);
66 result = ioctl( fd, SIOCIWFIRSTPRIV + 0x8, &ireq);
67 close(fd);
68 return result;
69}
70
71void usage(char *cmd) {
72 fprintf(stderr,
73 "Usage: %s <iface> [-p] [-i <interval millisec>] [-n]\n -n = international channels\n -p = keep prism headers\n", cmd);
74 exit(1);
75}
76
77int main (int argc, char *argv[])
78{
79 struct itimerval tval;
80 int ms, r;
81
82 //this will be the channel scanning interval, currently 0.2 sec
83 struct timeval interval = {0, 200000};
84
85 if (argc < 2) usage(argv[0]);
86 strncpy(dev, argv[1], 32);
87 dev[31] = 0;
88
89 while (1) {
90 r = getopt(argc,argv,"i:np");
91 if (r < 0) break;
92 switch (r) {
93 case 'n':
94 max = 14;
95 break;
96 case 'p':
97 mode = 1;
98 break;
99 case 'i':
100 ms = atoi(optarg);
101 interval.tv_sec = ms / 1000;
102 interval.tv_usec = (ms % 1000) * 1000;
103 break;
104 default:
105 usage(argv[0]);
106 }
107 }
108
109 //this sets up the kchannel scanning stuff
110 signal(SIGALRM, changeChannel);
111 tval.it_interval = interval;
112 tval.it_value = interval;
113 setitimer(ITIMER_REAL, &tval, NULL);
114 while (1) pause();
115
116 return 0;
117}
118
diff --git a/noncore/net/wellenreiter/contrib/orinoco_hopper/orinoco_hopper.pro b/noncore/net/wellenreiter/contrib/orinoco_hopper/orinoco_hopper.pro
deleted file mode 100644
index 30298d5..0000000
--- a/noncore/net/wellenreiter/contrib/orinoco_hopper/orinoco_hopper.pro
+++ b/dev/null
@@ -1,15 +0,0 @@
1DESTDIR = $(OPIEDIR)/bin
2TEMPLATE = app
3CONFIG = warn_on debug
4#CONFIG = warn_on release
5HEADERS =
6SOURCES = orinoco_hopper.c
7INCLUDEPATH +=
8DEPENDPATH +=
9LIBS +=
10INTERFACES =
11TARGET = orinoco_hopper
12
13
14
15include ( $(OPIEDIR)/include.pro )
diff --git a/noncore/net/wellenreiter/gui/configbase.ui b/noncore/net/wellenreiter/gui/configbase.ui
index 7992e6b..398118f 100644
--- a/noncore/net/wellenreiter/gui/configbase.ui
+++ b/noncore/net/wellenreiter/gui/configbase.ui
@@ -1,26 +1,26 @@
1<!DOCTYPE UI><UI> 1<!DOCTYPE UI><UI>
2<class>WellenreiterConfigBase</class> 2<class>WellenreiterConfigBase</class>
3<widget> 3<widget>
4 <class>QWidget</class> 4 <class>QDialog</class>
5 <property stdset="1"> 5 <property stdset="1">
6 <name>name</name> 6 <name>name</name>
7 <cstring>WellenreiterConfigBase</cstring> 7 <cstring>WellenreiterConfigBase</cstring>
8 </property> 8 </property>
9 <property stdset="1"> 9 <property stdset="1">
10 <name>geometry</name> 10 <name>geometry</name>
11 <rect> 11 <rect>
12 <x>0</x> 12 <x>0</x>
13 <y>0</y> 13 <y>0</y>
14 <width>224</width> 14 <width>220</width>
15 <height>267</height> 15 <height>267</height>
16 </rect> 16 </rect>
17 </property> 17 </property>
18 <property stdset="1"> 18 <property stdset="1">
19 <name>caption</name> 19 <name>caption</name>
20 <string>Form1</string> 20 <string>Form1</string>
21 </property> 21 </property>
22 <property> 22 <property>
23 <name>layoutMargin</name> 23 <name>layoutMargin</name>
24 </property> 24 </property>
25 <property> 25 <property>
26 <name>layoutSpacing</name> 26 <name>layoutSpacing</name>
diff --git a/noncore/net/wellenreiter/gui/configwindow.cpp b/noncore/net/wellenreiter/gui/configwindow.cpp
index 515d9b2..6ea6f02 100644
--- a/noncore/net/wellenreiter/gui/configwindow.cpp
+++ b/noncore/net/wellenreiter/gui/configwindow.cpp
@@ -10,25 +10,25 @@
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 <qmap.h> 17#include <qmap.h>
18#include <qcombobox.h> 18#include <qcombobox.h>
19#include <qspinbox.h> 19#include <qspinbox.h>
20 20
21WellenreiterConfigWindow::WellenreiterConfigWindow( QWidget * parent, const char * name, WFlags f ) 21WellenreiterConfigWindow::WellenreiterConfigWindow( QWidget * parent, const char * name, WFlags f )
22 :WellenreiterConfigBase( parent, name, f ) 22 :WellenreiterConfigBase( parent, name, true, f )
23{ 23{
24 _devicetype[ "cisco" ] = 1; 24 _devicetype[ "cisco" ] = 1;
25 _devicetype[ "wlan-ng" ] = 2; 25 _devicetype[ "wlan-ng" ] = 2;
26 _devicetype[ "hostap" ] = 3; 26 _devicetype[ "hostap" ] = 3;
27 _devicetype[ "orinoco" ] = 4; 27 _devicetype[ "orinoco" ] = 4;
28 _devicetype[ "<manual>" ] = 5; 28 _devicetype[ "<manual>" ] = 5;
29}; 29};
30 30
31int WellenreiterConfigWindow::daemonDeviceType() 31int WellenreiterConfigWindow::daemonDeviceType()
32{ 32{
33 QString name = deviceType->currentText(); 33 QString name = deviceType->currentText();
34 if ( _devicetype.contains( name ) ) 34 if ( _devicetype.contains( name ) )
diff --git a/noncore/net/wellenreiter/gui/gui.pro b/noncore/net/wellenreiter/gui/gui.pro
index 4ee360d..95e9f22 100644
--- a/noncore/net/wellenreiter/gui/gui.pro
+++ b/noncore/net/wellenreiter/gui/gui.pro
@@ -1,36 +1,40 @@
1MOC_DIR = ./tmp
2OBJECTS_DIR = ./tmp
1DESTDIR = $(OPIEDIR)/bin 3DESTDIR = $(OPIEDIR)/bin
2TEMPLATE = app 4TEMPLATE = app
3CONFIG = qt warn_on debug 5CONFIG = qt warn_on debug
4#CONFIG = qt warn_on release 6
5HEADERS = mainwindow.h \ 7HEADERS = wellenreiterbase.h \
6 wellenreiterbase.h \ 8 mainwindow.h \
7 wellenreiter.h \ 9 wellenreiter.h \
8 scanlistitem.h \ 10 scanlistitem.h \
9 scanlist.h \ 11 scanlist.h \
10 logwindow.h \ 12 logwindow.h \
11 hexwindow.h \ 13 hexwindow.h \
12 configwindow.h \ 14 configwindow.h \
13 wlan.h \ 15 wlan.h \
14 cardconfig.h \ 16 cardconfig.h \
15 manufacturers.h 17 manufacturers.h
18
16SOURCES = main.cpp \ 19SOURCES = main.cpp \
17 mainwindow.cpp \ 20 mainwindow.cpp \
18 wellenreiterbase.cpp \ 21 wellenreiterbase.cpp \
19 wellenreiter.cpp \ 22 wellenreiter.cpp \
20 scanlistitem.cpp \ 23 scanlistitem.cpp \
21 scanlist.cpp \ 24 scanlist.cpp \
22 logwindow.cpp \ 25 logwindow.cpp \
23 hexwindow.cpp \ 26 hexwindow.cpp \
24 configwindow.cpp \ 27 configwindow.cpp \
25 wlan.cpp \ 28 wlan.cpp \
26 cardconfig.cpp \ 29 cardconfig.cpp \
27 manufacturers.h 30 manufacturers.cpp
31
28INCLUDEPATH += $(OPIEDIR)/include ../ 32INCLUDEPATH += $(OPIEDIR)/include ../
29DEPENDPATH += $(OPIEDIR)/include ../ 33DEPENDPATH += $(OPIEDIR)/include ../
30LIBS += -lqpe -lopie -L. -lwellenreiter 34LIBS += -lqpe -lopie -L. -lwellenreiter
31INTERFACES = configbase.ui 35INTERFACES = configbase.ui
32TARGET = wellenreiter 36TARGET = wellenreiter
33 37
34 38
35 39
36include ( $(OPIEDIR)/include.pro ) 40include ( $(OPIEDIR)/include.pro )
diff --git a/noncore/net/wellenreiter/gui/mainwindow.cpp b/noncore/net/wellenreiter/gui/mainwindow.cpp
index d7326c0..b67376c 100644
--- a/noncore/net/wellenreiter/gui/mainwindow.cpp
+++ b/noncore/net/wellenreiter/gui/mainwindow.cpp
@@ -4,88 +4,136 @@
4** This file is part of Opie Environment. 4** This file is part of Opie Environment.
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 "mainwindow.h" 17#include "mainwindow.h"
17#include "wellenreiter.h" 18#include "wellenreiter.h"
18 19
20#include <qcombobox.h>
19#include <qiconset.h> 21#include <qiconset.h>
20#include <qmenubar.h> 22#include <qmenubar.h>
21#include <qpopupmenu.h> 23#include <qpopupmenu.h>
22#include <qstatusbar.h> 24#include <qstatusbar.h>
23#include <qtoolbutton.h> 25#include <qtoolbutton.h>
24 26
25#ifdef QWS 27#ifdef QWS
26#include <qpe/resource.h> 28#include <qpe/resource.h>
27#else 29#else
28#include "resource.h" 30#include "resource.h"
29#endif 31#endif
30 32
31WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * name, WFlags f ) 33WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * name, WFlags f )
32 :QMainWindow( parent, name, f ) 34 :QMainWindow( parent, name, f )
33{ 35{
36 cw = new WellenreiterConfigWindow( this );
34 mw = new Wellenreiter( this ); 37 mw = new Wellenreiter( this );
38 mw->setConfigWindow( cw );
35 setCentralWidget( mw ); 39 setCentralWidget( mw );
36 40
37 // setup icon sets 41 // setup icon sets
38 42
39 searchIconSet = new QIconSet( Resource::loadPixmap( "wellenreiter/SearchIcon" ) ); 43 searchIconSet = new QIconSet( Resource::loadPixmap( "wellenreiter/SearchIcon" ) );
40 infoIconSet = new QIconSet( Resource::loadPixmap( "wellenreiter/InfoIcon" ) ); 44 infoIconSet = new QIconSet( Resource::loadPixmap( "wellenreiter/InfoIcon" ) );
41 settingsIconSet = new QIconSet( Resource::loadPixmap( "wellenreiter/SettingsIcon" ) ); 45 settingsIconSet = new QIconSet( Resource::loadPixmap( "wellenreiter/SettingsIcon" ) );
42 cancelIconSet = new QIconSet( Resource::loadPixmap( "wellenreiter/CancelIcon" ) ); 46 cancelIconSet = new QIconSet( Resource::loadPixmap( "wellenreiter/CancelIcon" ) );
43 47
44 // setup tool buttons 48 // setup tool buttons
45 49
46 QToolButton* b = new QToolButton( 0 ); 50 startStopButton = new QToolButton( 0 );
47 b->setAutoRaise( true ); 51 startStopButton->setAutoRaise( true );
48 b->setOnIconSet( *cancelIconSet ); 52 startStopButton->setOnIconSet( *cancelIconSet );
49 b->setOffIconSet( *searchIconSet ); 53 startStopButton->setOffIconSet( *searchIconSet );
50 b->setToggleButton( true ); 54 startStopButton->setToggleButton( true );
55 connect( startStopButton, SIGNAL( clicked() ), mw, SLOT( startStopClicked() ) );
56 startStopButton->setEnabled( false );
51 57
52 QToolButton* c = new QToolButton( 0 ); 58 QToolButton* c = new QToolButton( 0 );
53 c->setAutoRaise( true ); 59 c->setAutoRaise( true );
54 c->setIconSet( *infoIconSet ); 60 c->setIconSet( *infoIconSet );
55 c->setEnabled( false ); 61 c->setEnabled( false );
56 62
57 QToolButton* d = new QToolButton( 0 ); 63 QToolButton* d = new QToolButton( 0 );
58 d->setAutoRaise( true ); 64 d->setAutoRaise( true );
59 d->setIconSet( *settingsIconSet ); 65 d->setIconSet( *settingsIconSet );
66 connect( d, SIGNAL( clicked() ), this, SLOT( showConfigure() ) );
60 67
61 // setup menu bar 68 // setup menu bar
62 69
63 QMenuBar* mb = menuBar(); 70 QMenuBar* mb = menuBar();
64 71
65 QPopupMenu* p = new QPopupMenu( mb ); 72 QPopupMenu* file = new QPopupMenu( mb );
66 p->insertItem( "&Load" ); 73 file->insertItem( "&Load" );
67 p->insertItem( "&Save" ); 74 file->insertItem( "&Save" );
68 75
69 mb->insertItem( "&File", p ); 76 QPopupMenu* view = new QPopupMenu( mb );
70 mb->setItemEnabled( mb->insertItem( b ), false ); 77 view->insertItem( "&Configure" );
71 mb->setItemEnabled( mb->insertItem( c ), false ); 78
79 QPopupMenu* sniffer = new QPopupMenu( mb );
80 sniffer->insertItem( "&Configure" );
81 sniffer->insertSeparator();
82
83 int id;
84
85 id = mb->insertItem( "&File", file );
86 mb->setItemEnabled( id, false );
87 id = mb->insertItem( "&View", view );
88 mb->setItemEnabled( id, false );
89 id = mb->insertItem( "&Sniffer", sniffer );
90 mb->setItemEnabled( id, false );
91
92 mb->insertItem( startStopButton );
93 mb->insertItem( c );
72 mb->insertItem( d ); 94 mb->insertItem( d );
73 95
74 // setup status bar 96 // setup status bar (for now only on X11)
75 97
76 // statusBar()->message( "Ready." ); 98 #ifndef QWS
99 statusBar()->message( "Ready." );
100 #endif
77 101
78}; 102};
79 103
104void WellenreiterMainWindow::showConfigure()
105{
106 qDebug( "show configure..." );
107 cw->setCaption( tr( "Configure" ) );
108 cw->showMaximized();
109 int result = cw->exec();
110
111 if ( result )
112 {
113 // check configuration from config window
114
115 const QString& interface = cw->interfaceName->currentText();
116 const int cardtype = cw->daemonDeviceType();
117 const int interval = cw->daemonHopInterval();
118
119 if ( ( interface != "<select>" ) && ( cardtype != 0 ) )
120 startStopButton->setEnabled( true );
121 //TODO ...
122 else
123 startStopButton->setEnabled( false );
124 //TODO ...
125 }
126}
127
80WellenreiterMainWindow::~WellenreiterMainWindow() 128WellenreiterMainWindow::~WellenreiterMainWindow()
81{ 129{
82 130
83 delete searchIconSet; 131 delete searchIconSet;
84 delete infoIconSet; 132 delete infoIconSet;
85 delete settingsIconSet; 133 delete settingsIconSet;
86 delete cancelIconSet; 134 delete cancelIconSet;
87 135
88 136
89}; 137};
90 138
91 139
diff --git a/noncore/net/wellenreiter/gui/mainwindow.h b/noncore/net/wellenreiter/gui/mainwindow.h
index dcc79e6..7d772a8 100644
--- a/noncore/net/wellenreiter/gui/mainwindow.h
+++ b/noncore/net/wellenreiter/gui/mainwindow.h
@@ -10,34 +10,40 @@
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 MAINWINDOW_H 16#ifndef MAINWINDOW_H
17#define MAINWINDOW_H 17#define MAINWINDOW_H
18 18
19#include <qmainwindow.h> 19#include <qmainwindow.h>
20 20
21class Wellenreiter; 21class Wellenreiter;
22class WellenreiterConfigWindow;
22class QIconSet; 23class QIconSet;
24class QToolButton;
23 25
24class WellenreiterMainWindow: public QMainWindow 26class WellenreiterMainWindow: public QMainWindow
25{ 27{
28 Q_OBJECT
26 29
27 public: 30 public:
28 WellenreiterMainWindow( QWidget * parent = 0, const char * name = "mainwindow", WFlags f = 0 ); 31 WellenreiterMainWindow( QWidget * parent = 0, const char * name = "mainwindow", WFlags f = 0 );
29 ~WellenreiterMainWindow(); 32 ~WellenreiterMainWindow();
30 33
31 protected: 34 protected:
32 Wellenreiter* mw; 35 Wellenreiter* mw;
36 WellenreiterConfigWindow* cw;
33 37
34 const QIconSet* searchIconSet; 38 const QIconSet* searchIconSet;
35 const QIconSet* infoIconSet; 39 const QIconSet* infoIconSet;
36 const QIconSet* settingsIconSet; 40 const QIconSet* settingsIconSet;
37 const QIconSet* cancelIconSet; 41 const QIconSet* cancelIconSet;
38 42
43 QToolButton* startStopButton;
39 44
45 public slots:
46 void showConfigure();
40}; 47};
41 48
42#endif 49#endif
43
diff --git a/noncore/net/wellenreiter/gui/manufacturers.cpp b/noncore/net/wellenreiter/gui/manufacturers.cpp
index dad2753..f9f8967 100644
--- a/noncore/net/wellenreiter/gui/manufacturers.cpp
+++ b/noncore/net/wellenreiter/gui/manufacturers.cpp
@@ -25,35 +25,35 @@ ManufacturerDB::ManufacturerDB( const QString& filename )
25 QFile file( filename ); 25 QFile file( filename );
26 bool hasFile = file.open( IO_ReadOnly ); 26 bool hasFile = file.open( IO_ReadOnly );
27 if (!hasFile) 27 if (!hasFile)
28 { 28 {
29 qDebug( "ManufacturerDB: D'oh! Manufacturer list '%s' not found!", (const char*) filename ); 29 qDebug( "ManufacturerDB: D'oh! Manufacturer list '%s' not found!", (const char*) filename );
30 } 30 }
31 else 31 else
32 { 32 {
33 qDebug( "ManufacturerDB: reading manufacturer list from '%s'...", (const char*) filename ); 33 qDebug( "ManufacturerDB: reading manufacturer list from '%s'...", (const char*) filename );
34 QTextStream s( &file ); 34 QTextStream s( &file );
35 QString addr; 35 QString addr;
36 QString manu; 36 QString manu;
37 37
38 while (!s.atEnd()) 38 while (!s.atEnd())
39 { 39 {
40 s >> addr; 40 s >> addr;
41 s.skipWhiteSpace(); 41 s.skipWhiteSpace();
42 manu = s.readLine(); 42 manu = s.readLine();
43 #ifdef DEBUG 43 #ifdef DEBUG
44 qDebug( "ManufacturerDB: read pair %s, %s", (const char*) addr, (const char*) manu ); 44 //qDebug( "ManufacturerDB: read pair %s, %s", (const char*) addr, (const char*) manu );
45 #endif 45 #endif
46 manufacturers.insert( addr, manu ); 46 manufacturers.insert( addr, manu );
47 47
48 } 48 }
49 } 49 }
50 50
51} 51}
52 52
53ManufacturerDB::~ManufacturerDB() 53ManufacturerDB::~ManufacturerDB()
54{ 54{
55} 55}
56 56
57const QString& ManufacturerDB::lookup( const QString& macaddr ) const 57const QString& ManufacturerDB::lookup( const QString& macaddr ) const
58{ 58{
59 return manufacturers[macaddr.upper().left(8)]; 59 return manufacturers[macaddr.upper().left(8)];
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp
index 4c53028..db7063b 100644
--- a/noncore/net/wellenreiter/gui/wellenreiter.cpp
+++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp
@@ -52,46 +52,47 @@ using namespace Opie;
52#include "scanlist.h" 52#include "scanlist.h"
53#include "logwindow.h" 53#include "logwindow.h"
54#include "hexwindow.h" 54#include "hexwindow.h"
55#include "configwindow.h" 55#include "configwindow.h"
56 56
57#include "manufacturers.h" 57#include "manufacturers.h"
58 58
59#include <daemon/source/config.hh> 59#include <daemon/source/config.hh>
60#include <libwellenreiter/source/wl_types.hh> 60#include <libwellenreiter/source/wl_types.hh>
61#include <libwellenreiter/source/wl_sock.hh> 61#include <libwellenreiter/source/wl_sock.hh>
62#include <libwellenreiter/source/wl_proto.hh> 62#include <libwellenreiter/source/wl_proto.hh>
63 63
64Wellenreiter::Wellenreiter( QWidget* parent, const char* name, WFlags fl ) 64Wellenreiter::Wellenreiter( QWidget* parent )
65 : WellenreiterBase( parent, name, fl ), daemonRunning( false ), manufacturerdb( 0 ) 65 : WellenreiterBase( parent, 0, 0 ),
66 daemonRunning( false ), manufacturerdb( 0 ), configwindow( 0 )
66{ 67{
67 68
68 // 69 //
69 // construct manufacturer database 70 // construct manufacturer database
70 // 71 //
71 72
72 QString manufile; 73 QString manufile;
73 #ifdef QWS 74 #ifdef QWS
74 manufile.sprintf( "%s/share/wellenreiter/manufacturers.dat", (const char*) QPEApplication::qpeDir() ); 75 manufile.sprintf( "%s/share/wellenreiter/manufacturers.dat", (const char*) QPEApplication::qpeDir() );
75 #else 76 #else
76 manufile.sprintf( "/home/mickey/work/opie/share/wellenreiter/manufacturers.dat" ); 77 manufile.sprintf( "/home/mickey/work/opie/share/wellenreiter/manufacturers.dat" );
77 #endif 78 #endif
78 manufacturerdb = new ManufacturerDB( manufile ); 79 manufacturerdb = new ManufacturerDB( manufile );
79 80
80 logwindow->log( "(i) Wellenreiter has been started." ); 81 logwindow->log( "(i) Wellenreiter has been started." );
81 82
82 // 83 //
83 // detect operating system 84 // detect operating system
84 // 85 //
85 86
86 #ifdef QWS 87 #ifdef QWS
87 QString sys; 88 QString sys;
88 sys.sprintf( "(i) Running on '%s'.", (const char*) ODevice::inst()->systemString() ); 89 sys.sprintf( "(i) Running on '%s'.", (const char*) ODevice::inst()->systemString() );
89 _system = ODevice::inst()->system(); 90 _system = ODevice::inst()->system();
90 logwindow->log( sys ); 91 logwindow->log( sys );
91 #endif 92 #endif
92 93
93 // 94 //
94 // setup socket for daemon communication, register socket notifier 95 // setup socket for daemon communication, register socket notifier
95 // 96 //
96 97
97 // struct sockaddr_in sockaddr; 98 // struct sockaddr_in sockaddr;
@@ -101,41 +102,43 @@ Wellenreiter::Wellenreiter( QWidget* parent, const char* name, WFlags fl )
101 logwindow->log( "(E) Couldn't get file descriptor for commsocket." ); 102 logwindow->log( "(E) Couldn't get file descriptor for commsocket." );
102 } 103 }
103 else 104 else
104 { 105 {
105 int flags; 106 int flags;
106 flags = fcntl( daemon_fd, F_GETFL, 0 ); 107 flags = fcntl( daemon_fd, F_GETFL, 0 );
107 fcntl( daemon_fd, F_SETFL, flags | O_NONBLOCK ); 108 fcntl( daemon_fd, F_SETFL, flags | O_NONBLOCK );
108 QSocketNotifier *sn = new QSocketNotifier( daemon_fd, QSocketNotifier::Read, parent ); 109 QSocketNotifier *sn = new QSocketNotifier( daemon_fd, QSocketNotifier::Read, parent );
109 connect( sn, SIGNAL( activated( int ) ), this, SLOT( dataReceived() ) ); 110 connect( sn, SIGNAL( activated( int ) ), this, SLOT( dataReceived() ) );
110 } 111 }
111 112
112 // setup GUI 113 // setup GUI
113
114 connect( button, SIGNAL( clicked() ), this, SLOT( buttonClicked() ) );
115 // button->setEnabled( false );
116 netview->setColumnWidthMode( 1, QListView::Manual ); 114 netview->setColumnWidthMode( 1, QListView::Manual );
117 115
118 if ( manufacturerdb ) 116 if ( manufacturerdb )
119 netview->setManufacturerDB( manufacturerdb ); 117 netview->setManufacturerDB( manufacturerdb );
120 118
121} 119}
122 120
123Wellenreiter::~Wellenreiter() 121Wellenreiter::~Wellenreiter()
124{ 122{
125 // no need to delete child widgets, Qt does it all for us 123 // no need to delete child widgets, Qt does it all for us
126 124
127 delete manufacturerdb; 125 delete manufacturerdb;
128} 126}
129 127
128void Wellenreiter::setConfigWindow( WellenreiterConfigWindow* cw )
129{
130 configwindow = cw;
131}
132
130void Wellenreiter::handleMessage() 133void Wellenreiter::handleMessage()
131{ 134{
132 // FIXME: receive message and handle it 135 // FIXME: receive message and handle it
133 136
134 qDebug( "received message from daemon." ); 137 qDebug( "received message from daemon." );
135 138
136 /*char buffer[10000]; 139 /*char buffer[10000];
137 memset( &buffer, 0, sizeof( buffer ) );*/ 140 memset( &buffer, 0, sizeof( buffer ) );*/
138 141
139 char buffer[WL_SOCKBUF]; 142 char buffer[WL_SOCKBUF];
140 143
141 // int result = #wl_recv( &daemon_fd, (char*) &buffer, sizeof(buffer) ); 144 // int result = #wl_recv( &daemon_fd, (char*) &buffer, sizeof(buffer) );
@@ -202,42 +205,31 @@ typedef struct {
202 { 205 {
203 qDebug( "unknown sniffer command." ); 206 qDebug( "unknown sniffer command." );
204 } 207 }
205 208
206} 209}
207 210
208void Wellenreiter::dataReceived() 211void Wellenreiter::dataReceived()
209{ 212{
210 logwindow->log( "(d) Received data from daemon" ); 213 logwindow->log( "(d) Received data from daemon" );
211 handleMessage(); 214 handleMessage();
212} 215}
213 216
214void Wellenreiter::buttonClicked() 217void Wellenreiter::startStopClicked()
215{ 218{
216 /*
217 // add some test stations, so that we can see if the GUI part works
218 addNewItem( "managed", "Vanille", "04:00:20:EF:A6:43", true, 6, 80 );
219 addNewItem( "managed", "Vanille", "04:00:20:EF:A6:23", true, 11, 10 );
220 addNewItem( "adhoc", "ELAN", "40:03:43:E7:16:22", false, 3, 10 );
221 addNewItem( "adhoc", "ELAN", "40:03:53:E7:56:62", false, 3, 15 );
222 addNewItem( "adhoc", "ELAN", "40:03:63:E7:56:E2", false, 3, 20 );
223 */
224
225
226 if ( daemonRunning ) 219 if ( daemonRunning )
227 { 220 {
228 daemonRunning = false; 221 daemonRunning = false;
229 222
230 logwindow->log( "(i) Daemon has been stopped." ); 223 logwindow->log( "(i) Daemon has been stopped." );
231 button->setText( tr( "Start Scanning" ) );
232 setCaption( tr( "Wellenreiter/Opie" ) ); 224 setCaption( tr( "Wellenreiter/Opie" ) );
233 225
234 // Stop daemon - ugly for now... later better 226 // Stop daemon - ugly for now... later better
235 227
236 system( "killall wellenreiterd" ); 228 system( "killall wellenreiterd" );
237 229
238 // get configuration from config window 230 // get configuration from config window
239 231
240 const QString& interface = configwindow->interfaceName->currentText(); 232 const QString& interface = configwindow->interfaceName->currentText();
241 233
242 // reset the interface trying to get it into a usable state again 234 // reset the interface trying to get it into a usable state again
243 235
@@ -252,32 +244,31 @@ void Wellenreiter::buttonClicked()
252 244
253 else 245 else
254 { 246 {
255 247
256 // get configuration from config window 248 // get configuration from config window
257 249
258 const QString& interface = configwindow->interfaceName->currentText(); 250 const QString& interface = configwindow->interfaceName->currentText();
259 const int cardtype = configwindow->daemonDeviceType(); 251 const int cardtype = configwindow->daemonDeviceType();
260 const int interval = configwindow->daemonHopInterval(); 252 const int interval = configwindow->daemonHopInterval();
261 253
262 if ( ( interface == "<select>" ) || ( cardtype == 0 ) ) 254 if ( ( interface == "<select>" ) || ( cardtype == 0 ) )
263 { 255 {
264 QMessageBox::information( this, "Wellenreiter/Opie", "You must configure your\ndevice before scanning." ); 256 QMessageBox::information( this, "Wellenreiter/Opie", "Your device is not\nptoperly configured. Please reconfigure!" );
265 return; 257 return;
266 } 258 }
267 259
268 // start wellenreiterd 260 // start wellenreiterd
269 261
270 QString cmdline; 262 QString cmdline;
271 cmdline.sprintf( "wellenreiterd %s %d &", (const char*) interface, cardtype ); 263 cmdline.sprintf( "wellenreiterd %s %d &", (const char*) interface, cardtype );
272 264
273 qDebug( "about to execute '%s' ...", (const char*) cmdline ); 265 qDebug( "about to execute '%s' ...", (const char*) cmdline );
274 system( cmdline ); 266 system( cmdline );
275 qDebug( "done!" ); 267 qDebug( "done!" );
276 268
277 logwindow->log( "(i) Daemon has been started." ); 269 logwindow->log( "(i) Daemon has been started." );
278 daemonRunning = true; 270 daemonRunning = true;
279 button->setText( tr( "Stop Scanning" ) );
280 setCaption( tr( "Scanning ..." ) ); 271 setCaption( tr( "Scanning ..." ) );
281 272
282 } 273 }
283} 274}
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.h b/noncore/net/wellenreiter/gui/wellenreiter.h
index 0ddc72c..a55d6a1 100644
--- a/noncore/net/wellenreiter/gui/wellenreiter.h
+++ b/noncore/net/wellenreiter/gui/wellenreiter.h
@@ -29,50 +29,51 @@ using namespace Opie;
29#include <errno.h> 29#include <errno.h>
30#include <unistd.h> 30#include <unistd.h>
31#include <string.h> 31#include <string.h>
32#include <sys/types.h> 32#include <sys/types.h>
33#include <sys/socket.h> 33#include <sys/socket.h>
34#include <stdlib.h> 34#include <stdlib.h>
35#include <fcntl.h> 35#include <fcntl.h>
36#include <daemon/source/config.hh> 36#include <daemon/source/config.hh>
37#include <libwellenreiter/source/wl_types.hh> 37#include <libwellenreiter/source/wl_types.hh>
38#include <libwellenreiter/source/wl_sock.hh> 38#include <libwellenreiter/source/wl_sock.hh>
39#include <libwellenreiter/source/wl_proto.hh> 39#include <libwellenreiter/source/wl_proto.hh>
40 40
41
42class QTimerEvent; 41class QTimerEvent;
43class QPixmap; 42class QPixmap;
44class ManufacturerDB; 43class ManufacturerDB;
44class WellenreiterConfigWindow;
45 45
46class Wellenreiter : public WellenreiterBase { 46class Wellenreiter : public WellenreiterBase {
47 Q_OBJECT 47 Q_OBJECT
48 48
49public: 49 public:
50 50 Wellenreiter( QWidget* parent = 0 );
51 Wellenreiter( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
52 ~Wellenreiter(); 51 ~Wellenreiter();
53 52
54protected: 53 void setConfigWindow( WellenreiterConfigWindow* cw );
55 54
55 protected:
56 bool daemonRunning; 56 bool daemonRunning;
57 57
58public slots: 58 public slots:
59 void buttonClicked();
60 void dataReceived(); 59 void dataReceived();
60 void startStopClicked();
61 61
62private: 62 private:
63 int daemon_fd; // socket filedescriptor for udp communication socket 63 int daemon_fd; // socket filedescriptor for udp communication socket
64 #ifdef QWS 64 #ifdef QWS
65 OSystem _system; // Opie Operating System identifier 65 OSystem _system; // Opie Operating System identifier
66 #endif 66 #endif
67 void handleMessage(); 67 void handleMessage();
68 68
69 ManufacturerDB* manufacturerdb; 69 ManufacturerDB* manufacturerdb;
70 WellenreiterConfigWindow* configwindow;
70 struct sockaddr_in sockaddr; 71 struct sockaddr_in sockaddr;
71 72
72 //void readConfig(); 73 //void readConfig();
73 //void writeConfig(); 74 //void writeConfig();
74}; 75};
75 76
76 77
77 78
78#endif 79#endif
diff --git a/noncore/net/wellenreiter/gui/wellenreiterbase.cpp b/noncore/net/wellenreiter/gui/wellenreiterbase.cpp
index da12f2b..3a703bc 100644
--- a/noncore/net/wellenreiter/gui/wellenreiterbase.cpp
+++ b/noncore/net/wellenreiter/gui/wellenreiterbase.cpp
@@ -20,25 +20,24 @@
20#include <qlistview.h> 20#include <qlistview.h>
21#include <qmultilineedit.h> 21#include <qmultilineedit.h>
22#include <qpushbutton.h> 22#include <qpushbutton.h>
23#include <qlayout.h> 23#include <qlayout.h>
24#include <qvariant.h> 24#include <qvariant.h>
25#include <qtooltip.h> 25#include <qtooltip.h>
26#include <qwhatsthis.h> 26#include <qwhatsthis.h>
27#include <qimage.h> 27#include <qimage.h>
28#include <qpixmap.h> 28#include <qpixmap.h>
29 29
30#include "logwindow.h" 30#include "logwindow.h"
31#include "hexwindow.h" 31#include "hexwindow.h"
32#include "configwindow.h"
33#include "scanlist.h" 32#include "scanlist.h"
34 33
35#ifdef QWS 34#ifdef QWS
36#include <qpe/resource.h> 35#include <qpe/resource.h>
37#include <opie/otabwidget.h> 36#include <opie/otabwidget.h>
38#else 37#else
39#include "resource.h" 38#include "resource.h"
40#include <qtabwidget.h> 39#include <qtabwidget.h>
41#endif 40#endif
42 41
43 42
44/* 43/*
@@ -46,115 +45,108 @@
46 * name 'name' and widget flags set to 'f' 45 * name 'name' and widget flags set to 'f'
47 */ 46 */
48WellenreiterBase::WellenreiterBase( QWidget* parent, const char* name, WFlags fl ) 47WellenreiterBase::WellenreiterBase( QWidget* parent, const char* name, WFlags fl )
49 : QWidget( parent, name, fl ) 48 : QWidget( parent, name, fl )
50{ 49{
51 //ani1 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot0" ) ); 50 //ani1 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot0" ) );
52 //ani2 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot90" ) ); 51 //ani2 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot90" ) );
53 //ani3 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot180" ) ); 52 //ani3 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot180" ) );
54 //ani4 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot270" ) ); 53 //ani4 = new QPixmap( Resource::loadPixmap( "wellenreiter/networks_rot270" ) );
55 54
56 if ( !name ) 55 if ( !name )
57 setName( "WellenreiterBase" ); 56 setName( "WellenreiterBase" );
58 resize( 191, 294 ); 57 resize( 191, 294 );
59 setCaption( tr( "Wellenreiter" ) ); 58#ifdef QWS
60 WellenreiterBaseLayout = new QVBoxLayout( this ); 59 setCaption( tr( "Wellenreiter/Opie" ) );
60#else
61 setCaption( tr( "Wellenreiter/X11" ) );
62#endif
63 WellenreiterBaseLayout = new QVBoxLayout( this );
61 WellenreiterBaseLayout->setSpacing( 2 ); 64 WellenreiterBaseLayout->setSpacing( 2 );
62 WellenreiterBaseLayout->setMargin( 0 ); 65 WellenreiterBaseLayout->setMargin( 0 );
63#ifdef QWS 66#ifdef QWS
64 TabWidget = new OTabWidget( this, "TabWidget", OTabWidget::Global ); 67 TabWidget = new OTabWidget( this, "TabWidget", OTabWidget::Global );
65#else 68#else
66 TabWidget = new QTabWidget( this, "TabWidget" ); 69 TabWidget = new QTabWidget( this, "TabWidget" );
67#endif 70#endif
68 ap = new QWidget( TabWidget, "ap" ); 71 ap = new QWidget( TabWidget, "ap" );
69 apLayout = new QVBoxLayout( ap ); 72 apLayout = new QVBoxLayout( ap );
70 apLayout->setSpacing( 2 ); 73 apLayout->setSpacing( 2 );
71 apLayout->setMargin( 2 ); 74 apLayout->setMargin( 2 );
72 75
73 //--------- NETVIEW TAB -------------- 76 //--------- NETVIEW TAB --------------
74 77
75 netview = new MScanListView( ap ); 78 netview = new MScanListView( ap );
76 apLayout->addWidget( netview ); 79 apLayout->addWidget( netview );
77 80
78 81
79 //--------- LOG TAB -------------- 82 //--------- LOG TAB --------------
80 83
81 logwindow = new MLogWindow( TabWidget, "Log" ); 84 logwindow = new MLogWindow( TabWidget, "Log" );
82 85
83 86
84 //--------- HEX TAB -------------- 87 //--------- HEX TAB --------------
85 88
86 hexwindow = new MHexWindow( TabWidget, "Hex" ); 89 hexwindow = new MHexWindow( TabWidget, "Hex" );
87 90
88 //--------- CONFIG TAB --------------
89
90 configwindow = new WellenreiterConfigWindow( TabWidget, "Config" );
91
92 //--------- ABOUT TAB -------------- 91 //--------- ABOUT TAB --------------
93 92
94 about = new QWidget( TabWidget, "about" ); 93 about = new QWidget( TabWidget, "about" );
95 aboutLayout = new QGridLayout( about ); 94 aboutLayout = new QGridLayout( about );
96 aboutLayout->setSpacing( 6 ); 95 aboutLayout->setSpacing( 6 );
97 aboutLayout->setMargin( 11 ); 96 aboutLayout->setMargin( 11 );
98 97
99 PixmapLabel1_3_2 = new QLabel( about, "PixmapLabel1_3_2" ); 98 PixmapLabel1_3_2 = new QLabel( about, "PixmapLabel1_3_2" );
100 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() ) );
101 PixmapLabel1_3_2->setFrameShape( QLabel::Panel ); 100 PixmapLabel1_3_2->setFrameShape( QLabel::Panel );
102 PixmapLabel1_3_2->setFrameShadow( QLabel::Sunken ); 101 PixmapLabel1_3_2->setFrameShadow( QLabel::Sunken );
103 PixmapLabel1_3_2->setLineWidth( 2 ); 102 PixmapLabel1_3_2->setLineWidth( 2 );
104 PixmapLabel1_3_2->setMargin( 0 ); 103 PixmapLabel1_3_2->setMargin( 0 );
105 PixmapLabel1_3_2->setMidLineWidth( 0 ); 104 PixmapLabel1_3_2->setMidLineWidth( 0 );
106 PixmapLabel1_3_2->setPixmap( Resource::loadPixmap( "wellenreiter/logo" ) ); 105 PixmapLabel1_3_2->setPixmap( Resource::loadPixmap( "wellenreiter/logo" ) );
107 PixmapLabel1_3_2->setScaledContents( TRUE ); 106 PixmapLabel1_3_2->setScaledContents( TRUE );
108 PixmapLabel1_3_2->setAlignment( int( QLabel::AlignCenter ) ); 107 PixmapLabel1_3_2->setAlignment( int( QLabel::AlignCenter ) );
109 108
110 aboutLayout->addWidget( PixmapLabel1_3_2, 0, 0 ); 109 aboutLayout->addWidget( PixmapLabel1_3_2, 0, 0 );
111 110
112 TextLabel1_4_2 = new QLabel( about, "TextLabel1_4_2" ); 111 TextLabel1_4_2 = new QLabel( about, "TextLabel1_4_2" );
113 QFont TextLabel1_4_2_font( TextLabel1_4_2->font() ); 112 QFont TextLabel1_4_2_font( TextLabel1_4_2->font() );
114 TextLabel1_4_2_font.setFamily( "adobe-helvetica" ); 113 TextLabel1_4_2_font.setFamily( "adobe-helvetica" );
115 TextLabel1_4_2_font.setPointSize( 10 ); 114 TextLabel1_4_2_font.setPointSize( 10 );
116 TextLabel1_4_2->setFont( TextLabel1_4_2_font ); 115 TextLabel1_4_2->setFont( TextLabel1_4_2_font );
117 TextLabel1_4_2->setText( tr( "<p align=center>\n" 116 TextLabel1_4_2->setText( tr( "<p align=center>\n"
118"<hr>\n" 117"<hr>\n"
119"Max Moser<br>\n" 118"Max Moser<br>\n"
120"Martin J. Muench<br>\n" 119"Martin J. Muench<br>\n"
121"Michael Lauer<br><hr>\n" 120"Michael Lauer<br><hr>\n"
122"<b>www.remote-exploit.org</b>\n" 121"<b>www.remote-exploit.org</b>\n"
123"</p>" ) ); 122"</p>" ) );
124 TextLabel1_4_2->setAlignment( int( QLabel::AlignCenter ) ); 123 TextLabel1_4_2->setAlignment( int( QLabel::AlignCenter ) );
125 124
126 aboutLayout->addWidget( TextLabel1_4_2, 1, 0 ); 125 aboutLayout->addWidget( TextLabel1_4_2, 1, 0 );
127
128 button = new QPushButton( this, "button" );
129 button->setSizePolicy( QSizePolicy( (QSizePolicy::SizeType)1, (QSizePolicy::SizeType)0, button->sizePolicy().hasHeightForWidth() ) );
130 button->setText( tr( "Start Scanning" ) );
131 126
132#ifdef QWS 127#ifdef QWS
133 TabWidget->addTab( ap, "wellenreiter/networks", tr( "Networks" ) ); 128 TabWidget->addTab( ap, "wellenreiter/networks", tr( "Networks" ) );
134 TabWidget->addTab( logwindow, "wellenreiter/log", tr( "Log" ) ); 129 TabWidget->addTab( logwindow, "wellenreiter/log", tr( "Log" ) );
135 TabWidget->addTab( hexwindow, "wellenreiter/hex", tr( "Hex" ) ); 130 TabWidget->addTab( hexwindow, "wellenreiter/hex", tr( "Hex" ) );
136 TabWidget->addTab( configwindow, "wellenreiter/config", tr( "Config" ) );
137 TabWidget->addTab( about, "wellenreiter/about", tr( "About" ) ); 131 TabWidget->addTab( about, "wellenreiter/about", tr( "About" ) );
138#else 132#else
139 TabWidget->addTab( ap, /* "wellenreiter/networks", */ tr( "Networks" ) ); 133 TabWidget->addTab( ap, /* "wellenreiter/networks", */ tr( "Networks" ) );
140 TabWidget->addTab( logwindow, /* "wellenreiter/log", */ tr( "Log" ) ); 134 TabWidget->addTab( logwindow, /* "wellenreiter/log", */ tr( "Log" ) );
141 TabWidget->addTab( hexwindow, /* "wellenreiter/hex", */ tr( "Hex" ) ); 135 TabWidget->addTab( hexwindow, /* "wellenreiter/hex", */ tr( "Hex" ) );
142 TabWidget->addTab( configwindow, /* "wellenreiter/config", */ tr( "Config" ) );
143 TabWidget->addTab( about, /* "wellenreiter/about", */ tr( "About" ) ); 136 TabWidget->addTab( about, /* "wellenreiter/about", */ tr( "About" ) );
144#endif 137#endif
145 WellenreiterBaseLayout->addWidget( TabWidget ); 138 WellenreiterBaseLayout->addWidget( TabWidget );
146 WellenreiterBaseLayout->addWidget( button );
147 139
148#ifdef QWS 140#ifdef QWS
149 TabWidget->setCurrentTab( tr( "Networks" ) ); 141 TabWidget->setCurrentTab( tr( "Networks" ) );
150#endif 142#endif
151 143
152} 144}
153 145
154/* 146/*
155 * Destroys the object and frees any allocated resources 147 * Destroys the object and frees any allocated resources
156 */ 148 */
157WellenreiterBase::~WellenreiterBase() 149WellenreiterBase::~WellenreiterBase()
158{ 150{
159 // no need to delete child widgets, Qt does it all for us 151 // no need to delete child widgets, Qt does it all for us
160} 152}
diff --git a/noncore/net/wellenreiter/gui/wellenreiterbase.h b/noncore/net/wellenreiter/gui/wellenreiterbase.h
index edb2930..1fa1ea3 100644
--- a/noncore/net/wellenreiter/gui/wellenreiterbase.h
+++ b/noncore/net/wellenreiter/gui/wellenreiterbase.h
@@ -9,67 +9,64 @@
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>
21class QVBoxLayout; 21class QVBoxLayout;
22class QHBoxLayout; 22class QHBoxLayout;
23class QGridLayout; 23class QGridLayout;
24class QLabel; 24class QLabel;
25class MScanListView; 25class MScanListView;
26class MScanListItem; 26class MScanListItem;
27class QPushButton; 27class QPushButton;
28class MLogWindow; 28class MLogWindow;
29class MHexWindow; 29class MHexWindow;
30class WellenreiterConfigWindow;
31 30
32#ifdef QWS 31#ifdef QWS
33class OTabWidget; 32class OTabWidget;
34#else 33#else
35class QTabWidget; 34class QTabWidget;
36#endif 35#endif
37 36
38class WellenreiterBase : public QWidget 37class WellenreiterBase : public QWidget
39{ 38{
40 Q_OBJECT 39 Q_OBJECT
41 40
42public: 41public:
43 WellenreiterBase( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 ); 42 WellenreiterBase( QWidget* parent = 0, const char* name = 0, WFlags fl = 0 );
44 ~WellenreiterBase(); 43 ~WellenreiterBase();
45 44
46#ifdef QWS 45#ifdef QWS
47 OTabWidget* TabWidget; 46 OTabWidget* TabWidget;
48#else 47#else
49 QTabWidget* TabWidget; 48 QTabWidget* TabWidget;
50#endif 49#endif
51 QWidget* ap; 50 QWidget* ap;
52 MScanListView* netview; 51 MScanListView* netview;
53 MLogWindow* logwindow; 52 MLogWindow* logwindow;
54 MHexWindow* hexwindow; 53 MHexWindow* hexwindow;
55 WellenreiterConfigWindow* configwindow;
56 QWidget* about; 54 QWidget* about;
57 QLabel* PixmapLabel1_3_2; 55 QLabel* PixmapLabel1_3_2;
58 QLabel* TextLabel1_4_2; 56 QLabel* TextLabel1_4_2;
59 QPushButton* button;
60 57
61protected: 58protected:
62 QVBoxLayout* WellenreiterBaseLayout; 59 QVBoxLayout* WellenreiterBaseLayout;
63 QVBoxLayout* apLayout; 60 QVBoxLayout* apLayout;
64 QGridLayout* aboutLayout; 61 QGridLayout* aboutLayout;
65 bool event( QEvent* ); 62 bool event( QEvent* );
66 63
67 QPixmap* ani1; 64 QPixmap* ani1;
68 QPixmap* ani2; 65 QPixmap* ani2;
69 QPixmap* ani3; 66 QPixmap* ani3;
70 QPixmap* ani4; 67 QPixmap* ani4;
71 68
72 69
73}; 70};
74 71
75#endif // WELLENREITERBASE_H 72#endif // WELLENREITERBASE_H
diff --git a/noncore/net/wellenreiter/wellenreiter.pro b/noncore/net/wellenreiter/wellenreiter.pro
index 6784af4..dd75c8c 100644
--- a/noncore/net/wellenreiter/wellenreiter.pro
+++ b/noncore/net/wellenreiter/wellenreiter.pro
@@ -1,6 +1,6 @@
1TEMPLATE = subdirs 1TEMPLATE = subdirs
2unix:SUBDIRS = libwellenreiter daemon gui contrib/orinoco_hopper 2unix:SUBDIRS = libwellenreiter daemon gui
3 3
4 4
5 5
6include ( $(OPIEDIR)/include.pro ) 6include ( $(OPIEDIR)/include.pro )