Diffstat (limited to 'noncore/net/wellenreiter/gui/wellenreiter.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiter.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp index 2d9bbee..9068e3a 100644 --- a/noncore/net/wellenreiter/gui/wellenreiter.cpp +++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp @@ -44,32 +44,46 @@ using namespace Opie; #include <sys/socket.h> #include <stdlib.h> #include <fcntl.h> // Local #include "wellenreiter.h" #include "scanlist.h" #include "logwindow.h" #include "hexwindow.h" #include "configwindow.h" +#include "manufacturers.h" + #include <libwellenreiter/source/wl_sock.hh> #include <libwellenreiter/source/wl_proto.hh> #include <daemon/source/config.hh> Wellenreiter::Wellenreiter( QWidget* parent, const char* name, WFlags fl ) : WellenreiterBase( parent, name, fl ), daemonRunning( false ) { + // + // construct manufacturer database + // + + QString manufile; + #ifdef QWS + manufile.sprintf( "%s/share/wellenreiter/manufacturers.dat", (const char*) qApp.qpeDir() ); + #else + manufile.sprintf( "/home/mickey/work/opie/share/wellenreiter/manufacturers.dat" ); + #endif + manufacturerdb = new ManufacturerDB( manufile ); + logwindow->log( "(i) Wellenreiter has been started." ); // // detect operating system // #ifdef QWS QString sys; sys.sprintf( "(i) Running on '%s'.", (const char*) ODevice::inst()->systemString() ); _system = ODevice::inst()->system(); logwindow->log( sys ); #endif @@ -94,24 +108,26 @@ Wellenreiter::Wellenreiter( QWidget* parent, const char* name, WFlags fl ) // setup GUI connect( button, SIGNAL( clicked() ), this, SLOT( buttonClicked() ) ); button->setEnabled( false ); netview->setColumnWidthMode( 1, QListView::Manual ); } Wellenreiter::~Wellenreiter() { // no need to delete child widgets, Qt does it all for us + + delete manufacturerdb; } void Wellenreiter::handleMessage() { // FIXME: receive message and handle it qDebug( "received message from daemon." ); char buffer[10000]; memset( &buffer, 0, sizeof( buffer ) ); // int result = #wl_recv( &daemon_fd, (char*) &buffer, sizeof(buffer) ); |