summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.cpp12
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.h2
2 files changed, 14 insertions, 0 deletions
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp
index 365efb0..1d4a98b 100644
--- a/noncore/net/wellenreiter/gui/wellenreiter.cpp
+++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp
@@ -29,38 +29,40 @@
29 29
30#ifdef QWS 30#ifdef QWS
31#include <opie/odevice.h> 31#include <opie/odevice.h>
32#include <qpe/qcopenvelope_qws.h> 32#include <qpe/qcopenvelope_qws.h>
33using namespace Opie; 33using namespace Opie;
34#endif 34#endif
35 35
36#ifdef QWS 36#ifdef QWS
37#include <opie2/oapplication.h> 37#include <opie2/oapplication.h>
38#else 38#else
39#include <qapplication.h> 39#include <qapplication.h>
40#endif 40#endif
41#include <opie2/omanufacturerdb.h>
41#include <opie2/onetwork.h> 42#include <opie2/onetwork.h>
42#include <opie2/opcap.h> 43#include <opie2/opcap.h>
43 44
44// Qt 45// Qt
45 46
46#include <qcheckbox.h> 47#include <qcheckbox.h>
47#include <qcombobox.h> 48#include <qcombobox.h>
48#include <qdatetime.h> 49#include <qdatetime.h>
49#include <qpushbutton.h> 50#include <qpushbutton.h>
50#include <qlineedit.h> 51#include <qlineedit.h>
51#include <qmessagebox.h> 52#include <qmessagebox.h>
52#include <qobjectlist.h> 53#include <qobjectlist.h>
53#include <qregexp.h> 54#include <qregexp.h>
54#include <qspinbox.h> 55#include <qspinbox.h>
56#include <qtimer.h>
55#include <qtoolbutton.h> 57#include <qtoolbutton.h>
56#include <qmainwindow.h> 58#include <qmainwindow.h>
57 59
58// Standard 60// Standard
59 61
60#include <assert.h> 62#include <assert.h>
61#include <errno.h> 63#include <errno.h>
62#include <unistd.h> 64#include <unistd.h>
63#include <string.h> 65#include <string.h>
64#include <sys/types.h> 66#include <sys/types.h>
65#include <stdlib.h> 67#include <stdlib.h>
66 68
@@ -79,33 +81,43 @@ Wellenreiter::Wellenreiter( QWidget* parent )
79 QString sys; 81 QString sys;
80 sys.sprintf( "(i) Running on '%s'.", (const char*) ODevice::inst()->systemString() ); 82 sys.sprintf( "(i) Running on '%s'.", (const char*) ODevice::inst()->systemString() );
81 _system = ODevice::inst()->system(); 83 _system = ODevice::inst()->system();
82 logwindow->log( sys ); 84 logwindow->log( sys );
83 #endif 85 #endif
84 86
85 netview->setColumnWidthMode( 1, QListView::Manual ); 87 netview->setColumnWidthMode( 1, QListView::Manual );
86 connect( netview, SIGNAL( joinNetwork(const QString&,const QString&,int,const QString&) ), 88 connect( netview, SIGNAL( joinNetwork(const QString&,const QString&,int,const QString&) ),
87 this, SLOT( joinNetwork(const QString&,const QString&,int,const QString&) ) ); 89 this, SLOT( joinNetwork(const QString&,const QString&,int,const QString&) ) );
88 pcap = new OPacketCapturer(); 90 pcap = new OPacketCapturer();
89 91
90 gps = new GPS( this ); 92 gps = new GPS( this );
93
94 QTimer::singleShot( 1000, this, SLOT( initialTimer() ) );
95
91} 96}
92 97
93 98
94Wellenreiter::~Wellenreiter() 99Wellenreiter::~Wellenreiter()
95{ 100{
96 delete pcap; 101 delete pcap;
97} 102}
98 103
99 104
105void Wellenreiter::initialTimer()
106{
107 qDebug( "Wellenreiter::preloading manufacturer database..." );
108 OManufacturerDB::instance();
109}
110
111
100void Wellenreiter::setConfigWindow( WellenreiterConfigWindow* cw ) 112void Wellenreiter::setConfigWindow( WellenreiterConfigWindow* cw )
101{ 113{
102 configwindow = cw; 114 configwindow = cw;
103} 115}
104 116
105 117
106void Wellenreiter::channelHopped(int c) 118void Wellenreiter::channelHopped(int c)
107{ 119{
108 QString title = "Wellenreiter II -scan- ["; 120 QString title = "Wellenreiter II -scan- [";
109 QString left; 121 QString left;
110 if ( c > 1 ) left.fill( '.', c-1 ); 122 if ( c > 1 ) left.fill( '.', c-1 );
111 title.append( left ); 123 title.append( left );
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.h b/noncore/net/wellenreiter/gui/wellenreiter.h
index 25a5e8d..d882500 100644
--- a/noncore/net/wellenreiter/gui/wellenreiter.h
+++ b/noncore/net/wellenreiter/gui/wellenreiter.h
@@ -50,24 +50,26 @@ class Wellenreiter : public WellenreiterBase {
50 MScanListView* netView() const { return netview; }; 50 MScanListView* netView() const { return netview; };
51 MLogWindow* logWindow() const { return logwindow; }; 51 MLogWindow* logWindow() const { return logwindow; };
52 MHexWindow* hexWindow() const { return hexwindow; }; 52 MHexWindow* hexWindow() const { return hexwindow; };
53 bool isDaemonRunning() const { return sniffing; }; 53 bool isDaemonRunning() const { return sniffing; };
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();
63
62 void channelHopped(int); 64 void channelHopped(int);
63 void receivePacket(OPacket*); 65 void receivePacket(OPacket*);
64 void startClicked(); 66 void startClicked();
65 void stopClicked(); 67 void stopClicked();
66 68
67 void joinNetwork(const QString&,const QString&,int,const QString&); 69 void joinNetwork(const QString&,const QString&,int,const QString&);
68 70
69 signals: 71 signals:
70 void startedSniffing(); 72 void startedSniffing();
71 void stoppedSniffing(); 73 void stoppedSniffing();
72 74
73 private: 75 private: