summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/wellenreiter/README11
-rw-r--r--noncore/net/wellenreiter/daemon/daemon.pro4
-rw-r--r--noncore/net/wellenreiter/gui/configwindow.cpp9
-rw-r--r--noncore/net/wellenreiter/gui/gui-x11.pro15
-rw-r--r--noncore/net/wellenreiter/gui/gui.pro13
-rw-r--r--noncore/net/wellenreiter/gui/mainwindow.cpp27
-rw-r--r--noncore/net/wellenreiter/gui/mainwindow.h1
-rw-r--r--noncore/net/wellenreiter/gui/resource.cpp2
-rw-r--r--noncore/net/wellenreiter/gui/wellenreiter.cpp2
-rw-r--r--noncore/net/wellenreiter/libwellenreiter/libwellenreiter.pro7
-rw-r--r--noncore/net/wellenreiter/wellenreiter.pro10
11 files changed, 67 insertions, 34 deletions
diff --git a/noncore/net/wellenreiter/README b/noncore/net/wellenreiter/README
index ada9321..7de6a33 100644
--- a/noncore/net/wellenreiter/README
+++ b/noncore/net/wellenreiter/README
@@ -42,19 +42,18 @@ CONFIG_WELLENREITER noncore/net/wellenreiter/contrib/orinoco_hopper orinoco_hopp
make -f Makefile.test clean-configs
cd <BUILDROOT>
make SUBDIRS=packages/opie package
(III) To compile a standalone Wellenreiter for X11, you need Qt3 and the development
-packages for Qt3, e.g. libqt3-devel. Assuming, $OPIEDIR and $QTDIR is set to Opie resp.
-Qt (e.g. /usr/lib/qt3), do the following:
-export QMAKESPEC=$OPIEDIR/mkspecs/linux-g++
-cd $OPIEDIR/noncore/net/wellenreiter
-qmake -makefile wellenreiter.pro
-make qmake
+packages for Qt3, e.g. libqt3-devel. Assuming, $QTDIR is set to your Qt-Director
+(e.g. /usr/lib/qt3), set $OPIEDIR to your installation prefix, e.g. /usr/local, then
+export QMAKESPEC=$QTDIR/mkspecs/linux-g++
+qmake "platform=x11" wellenreiter.pro
make
+make install
=====================
= Install =
=====================
Alternatively, you can use our precompiled ipk. Get it from
diff --git a/noncore/net/wellenreiter/daemon/daemon.pro b/noncore/net/wellenreiter/daemon/daemon.pro
index 8943db7..33a6bb9 100644
--- a/noncore/net/wellenreiter/daemon/daemon.pro
+++ b/noncore/net/wellenreiter/daemon/daemon.pro
@@ -8,9 +8,9 @@ INCLUDEPATH += ../
DEPENDPATH += $(OPIEDIR)/include
LIBS += -lpcap -lpthread -L$(OPIEDIR)/lib -lwellenreiter
INTERFACES =
TARGET = wellenreiterd
DEFINES += DEBUG
-
-
+!contains( platform, x11 ) {
include ( $(OPIEDIR)/include.pro )
+}
diff --git a/noncore/net/wellenreiter/gui/configwindow.cpp b/noncore/net/wellenreiter/gui/configwindow.cpp
index 6ea6f02..f86b109 100644
--- a/noncore/net/wellenreiter/gui/configwindow.cpp
+++ b/noncore/net/wellenreiter/gui/configwindow.cpp
@@ -13,22 +13,31 @@
**
**********************************************************************/
#include "configwindow.h"
#include <qmap.h>
#include <qcombobox.h>
+#include <qpushbutton.h>
#include <qspinbox.h>
+#include <qlayout.h>
WellenreiterConfigWindow::WellenreiterConfigWindow( QWidget * parent, const char * name, WFlags f )
:WellenreiterConfigBase( parent, name, true, f )
{
_devicetype[ "cisco" ] = 1;
_devicetype[ "wlan-ng" ] = 2;
_devicetype[ "hostap" ] = 3;
_devicetype[ "orinoco" ] = 4;
_devicetype[ "<manual>" ] = 5;
+
+ #ifdef Q_WS_X11 // We're on X11: adding an Ok-Button for the Dialog here
+ QPushButton* okButton = new QPushButton( "ok", this );
+ okButton->show();
+ Layout5_2->addWidget( okButton ); //FIXME: rename this in configbase.ui
+ connect( okButton, SIGNAL( clicked() ), this, SLOT( accept() ) );
+ #endif
};
int WellenreiterConfigWindow::daemonDeviceType()
{
QString name = deviceType->currentText();
if ( _devicetype.contains( name ) )
diff --git a/noncore/net/wellenreiter/gui/gui-x11.pro b/noncore/net/wellenreiter/gui/gui-x11.pro
deleted file mode 100644
index 25185fb..0000000
--- a/noncore/net/wellenreiter/gui/gui-x11.pro
+++ b/dev/null
@@ -1,15 +0,0 @@
-DESTDIR = .
-TEMPLATE = app
-CONFIG = qt warn_on debug
-#CONFIG = qt warn_on release
-HEADERS = mainwindow.h wellenreiterbase.h wellenreiter.h scanlistitem.h scanlist.h logwindow.h hexwindow.h configwindow.h resource.h wlan.h cardconfig.h manufacturers.h
-SOURCES = main.cpp mainwindow.cpp wellenreiterbase.cpp wellenreiter.cpp scanlistitem.cpp scanlist.cpp logwindow.cpp hexwindow.cpp configwindow.cpp resource.cpp wlan.cpp cardconfig.cpp manufacturers.cpp
-INCLUDEPATH += ../
-DEPENDPATH += ../
-LIBS += -L. -lwellenreiter
-INTERFACES = configbase.ui
-TARGET = wellenreiter
-
-
-
-include ( $(OPIEDIR)/include.pro )
diff --git a/noncore/net/wellenreiter/gui/gui.pro b/noncore/net/wellenreiter/gui/gui.pro
index 95e9f22..822b0db 100644
--- a/noncore/net/wellenreiter/gui/gui.pro
+++ b/noncore/net/wellenreiter/gui/gui.pro
@@ -28,13 +28,22 @@ SOURCES = main.cpp \
wlan.cpp \
cardconfig.cpp \
manufacturers.cpp
INCLUDEPATH += $(OPIEDIR)/include ../
DEPENDPATH += $(OPIEDIR)/include ../
-LIBS += -lqpe -lopie -L. -lwellenreiter
+LIBS += -L. -lwellenreiter
INTERFACES = configbase.ui
TARGET = wellenreiter
+!contains( platform, x11 ) {
+ message( qws )
+ include ( $(OPIEDIR)/include.pro )
+ LIBS += -lqpe -lopie
+}
+contains( platform, x11 ) {
+ LIBS += -L$(OPIEDIR)/lib -Wl,-rpath,$(OPIEDIR)/lib
+ SOURCES += resource.cpp
+ HEADERS += resource.h
+}
-include ( $(OPIEDIR)/include.pro )
diff --git a/noncore/net/wellenreiter/gui/mainwindow.cpp b/noncore/net/wellenreiter/gui/mainwindow.cpp
index b67376c..b2d3a71 100644
--- a/noncore/net/wellenreiter/gui/mainwindow.cpp
+++ b/noncore/net/wellenreiter/gui/mainwindow.cpp
@@ -37,23 +37,33 @@ WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * n
mw = new Wellenreiter( this );
mw->setConfigWindow( cw );
setCentralWidget( mw );
// setup icon sets
- searchIconSet = new QIconSet( Resource::loadPixmap( "wellenreiter/SearchIcon" ) );
infoIconSet = new QIconSet( Resource::loadPixmap( "wellenreiter/InfoIcon" ) );
settingsIconSet = new QIconSet( Resource::loadPixmap( "wellenreiter/SettingsIcon" ) );
+ #ifdef QWS
+ searchIconSet = new QIconSet( Resource::loadPixmap( "wellenreiter/SearchIcon" ) );
cancelIconSet = new QIconSet( Resource::loadPixmap( "wellenreiter/CancelIcon" ) );
+ #else
+ startStopIconSet = new QIconSet();
+ startStopIconSet->setPixmap( Resource::loadPixmap( "wellenreiter/SearchIcon" ), QIconSet::Automatic, QIconSet::Normal, QIconSet::Off );
+ startStopIconSet->setPixmap( Resource::loadPixmap( "wellenreiter/CancelIcon" ), QIconSet::Automatic, QIconSet::Normal, QIconSet::On );
+ #endif
// setup tool buttons
startStopButton = new QToolButton( 0 );
startStopButton->setAutoRaise( true );
+ #ifdef QWS
startStopButton->setOnIconSet( *cancelIconSet );
startStopButton->setOffIconSet( *searchIconSet );
+ #else
+ startStopButton->setIconSet( *startStopIconSet );
+ #endif
startStopButton->setToggleButton( true );
connect( startStopButton, SIGNAL( clicked() ), mw, SLOT( startStopClicked() ) );
startStopButton->setEnabled( false );
QToolButton* c = new QToolButton( 0 );
c->setAutoRaise( true );
@@ -86,15 +96,21 @@ WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * n
mb->setItemEnabled( id, false );
id = mb->insertItem( "&View", view );
mb->setItemEnabled( id, false );
id = mb->insertItem( "&Sniffer", sniffer );
mb->setItemEnabled( id, false );
+ #ifdef QWS
mb->insertItem( startStopButton );
mb->insertItem( c );
mb->insertItem( d );
+ #else // Qt3 changed the insertion order. It's now totally random :(
+ mb->insertItem( d );
+ mb->insertItem( c );
+ mb->insertItem( startStopButton );
+ #endif
// setup status bar (for now only on X11)
#ifndef QWS
statusBar()->message( "Ready." );
#endif
@@ -102,13 +118,15 @@ WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * n
};
void WellenreiterMainWindow::showConfigure()
{
qDebug( "show configure..." );
cw->setCaption( tr( "Configure" ) );
+ #ifdef QWS
cw->showMaximized();
+ #endif
int result = cw->exec();
if ( result )
{
// check configuration from config window
@@ -125,16 +143,19 @@ void WellenreiterMainWindow::showConfigure()
}
}
WellenreiterMainWindow::~WellenreiterMainWindow()
{
- delete searchIconSet;
delete infoIconSet;
delete settingsIconSet;
+ #ifdef QWS
+ delete searchIconSet;
delete cancelIconSet;
-
+ #else
+ delete startStopIconSet;
+ #endif
};
diff --git a/noncore/net/wellenreiter/gui/mainwindow.h b/noncore/net/wellenreiter/gui/mainwindow.h
index 7d772a8..c21841a 100644
--- a/noncore/net/wellenreiter/gui/mainwindow.h
+++ b/noncore/net/wellenreiter/gui/mainwindow.h
@@ -32,12 +32,13 @@ class WellenreiterMainWindow: public QMainWindow
~WellenreiterMainWindow();
protected:
Wellenreiter* mw;
WellenreiterConfigWindow* cw;
+ QIconSet* startStopIconSet;
const QIconSet* searchIconSet;
const QIconSet* infoIconSet;
const QIconSet* settingsIconSet;
const QIconSet* cancelIconSet;
QToolButton* startStopButton;
diff --git a/noncore/net/wellenreiter/gui/resource.cpp b/noncore/net/wellenreiter/gui/resource.cpp
index fb0966a..7683329 100644
--- a/noncore/net/wellenreiter/gui/resource.cpp
+++ b/noncore/net/wellenreiter/gui/resource.cpp
@@ -12,13 +12,13 @@
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
**********************************************************************/
#include "resource.h"
-#define PIXMAPPATH "/usr/share/wellenreiter/pics/"
+#define PIXMAPPATH "/usr/local/share"
namespace Resource
{
QPixmap loadPixmap( const QString& pix )
{
diff --git a/noncore/net/wellenreiter/gui/wellenreiter.cpp b/noncore/net/wellenreiter/gui/wellenreiter.cpp
index db7063b..c599bb4 100644
--- a/noncore/net/wellenreiter/gui/wellenreiter.cpp
+++ b/noncore/net/wellenreiter/gui/wellenreiter.cpp
@@ -71,13 +71,13 @@ Wellenreiter::Wellenreiter( QWidget* parent )
//
QString manufile;
#ifdef QWS
manufile.sprintf( "%s/share/wellenreiter/manufacturers.dat", (const char*) QPEApplication::qpeDir() );
#else
- manufile.sprintf( "/home/mickey/work/opie/share/wellenreiter/manufacturers.dat" );
+ manufile.sprintf( "/usr/local/share/wellenreiter/manufacturers.dat" );
#endif
manufacturerdb = new ManufacturerDB( manufile );
logwindow->log( "(i) Wellenreiter has been started." );
//
diff --git a/noncore/net/wellenreiter/libwellenreiter/libwellenreiter.pro b/noncore/net/wellenreiter/libwellenreiter/libwellenreiter.pro
index 58da0c1..5930c60 100644
--- a/noncore/net/wellenreiter/libwellenreiter/libwellenreiter.pro
+++ b/noncore/net/wellenreiter/libwellenreiter/libwellenreiter.pro
@@ -1,15 +1,16 @@
+DESTDIR = $(OPIEDIR)/lib
TEMPLATE = lib
CONFIG = warn_on debug
VERSION = 0.2
HEADERS = source/cardmode.hh source/wl_log.hh source/wl_proto.hh source/sniff.hh source/wl_sock.hh source/wl_types.hh
SOURCES = source/cardmode.cc source/wl_log.cc source/wl_proto.cc source/sniff.cc source/wl_sock.cc
LIBS = -lpcap
TMAKE_CFLAGS += -D__UNIX__
DEFINES += DEBUG
-DESTDIR = $(OPIEDIR)/lib
TARGET = wellenreiter
-
-
+!contains( platform, x11 ) {
include ( $(OPIEDIR)/include.pro )
+}
+
diff --git a/noncore/net/wellenreiter/wellenreiter.pro b/noncore/net/wellenreiter/wellenreiter.pro
index dd75c8c..17d0e31 100644
--- a/noncore/net/wellenreiter/wellenreiter.pro
+++ b/noncore/net/wellenreiter/wellenreiter.pro
@@ -1,6 +1,14 @@
TEMPLATE = subdirs
unix:SUBDIRS = libwellenreiter daemon gui
-
+!contains( platform, x11 ) {
+ message( Configuring Wellenreiter for build on Opie )
include ( $(OPIEDIR)/include.pro )
+}
+
+contains( platform, x11 ) {
+ message( Configuring Wellenreiter for build on Qt/X11 )
+ system( mkdir -p $OPIEDIR/lib $OPIEDIR/bin $OPIEDIR/share/pics )
+}
+