author | mickeyl <mickeyl> | 2003-12-09 19:24:37 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-12-09 19:24:37 (UTC) |
commit | 04d6caa37743a1957b9ffa061a58a71a3909ea3d (patch) (side-by-side diff) | |
tree | 04a692f57263d0573f2b2c704e4a6e1057aa7d40 | |
parent | 1642df2b072858b5eec9ad007a23475cc5270bfe (diff) | |
download | opie-04d6caa37743a1957b9ffa061a58a71a3909ea3d.zip opie-04d6caa37743a1957b9ffa061a58a71a3909ea3d.tar.gz opie-04d6caa37743a1957b9ffa061a58a71a3909ea3d.tar.bz2 |
preload the manufacturer library during startup (nice trick, btw.)
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiter.cpp | 12 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiter.h | 2 |
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 @@ -35,12 +35,13 @@ using namespace Opie; #ifdef QWS #include <opie2/oapplication.h> #else #include <qapplication.h> #endif +#include <opie2/omanufacturerdb.h> #include <opie2/onetwork.h> #include <opie2/opcap.h> // Qt #include <qcheckbox.h> @@ -49,12 +50,13 @@ using namespace Opie; #include <qpushbutton.h> #include <qlineedit.h> #include <qmessagebox.h> #include <qobjectlist.h> #include <qregexp.h> #include <qspinbox.h> +#include <qtimer.h> #include <qtoolbutton.h> #include <qmainwindow.h> // Standard #include <assert.h> @@ -85,21 +87,31 @@ Wellenreiter::Wellenreiter( QWidget* parent ) netview->setColumnWidthMode( 1, QListView::Manual ); connect( netview, SIGNAL( joinNetwork(const QString&,const QString&,int,const QString&) ), this, SLOT( joinNetwork(const QString&,const QString&,int,const QString&) ) ); pcap = new OPacketCapturer(); gps = new GPS( this ); + + QTimer::singleShot( 1000, this, SLOT( initialTimer() ) ); + } Wellenreiter::~Wellenreiter() { delete pcap; } +void Wellenreiter::initialTimer() +{ + qDebug( "Wellenreiter::preloading manufacturer database..." ); + OManufacturerDB::instance(); +} + + void Wellenreiter::setConfigWindow( WellenreiterConfigWindow* cw ) { configwindow = cw; } 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 @@ -56,12 +56,14 @@ class Wellenreiter : public WellenreiterBase { bool sniffing; protected: virtual void timerEvent( QTimerEvent* ); public slots: + void initialTimer(); + void channelHopped(int); void receivePacket(OPacket*); void startClicked(); void stopClicked(); void joinNetwork(const QString&,const QString&,int,const QString&); |