-rw-r--r-- | noncore/net/wellenreiter/gui/configwindow.cpp | 9 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/gui-x11.pro | 15 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/gui.pro | 13 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/mainwindow.cpp | 27 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/mainwindow.h | 1 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/resource.cpp | 2 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/wellenreiter.cpp | 2 |
7 files changed, 47 insertions, 22 deletions
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 @@ -18,3 +18,5 @@ #include <qcombobox.h> +#include <qpushbutton.h> #include <qspinbox.h> +#include <qlayout.h> @@ -28,2 +30,9 @@ WellenreiterConfigWindow::WellenreiterConfigWindow( QWidget * parent, const char _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 }; 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 @@ -33,3 +33,3 @@ INCLUDEPATH += $(OPIEDIR)/include ../ DEPENDPATH += $(OPIEDIR)/include ../ -LIBS += -lqpe -lopie -L. -lwellenreiter +LIBS += -L. -lwellenreiter INTERFACES = configbase.ui @@ -37,4 +37,13 @@ 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 @@ -42,6 +42,12 @@ WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * n - 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 @@ -51,4 +57,8 @@ WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * n startStopButton->setAutoRaise( true ); + #ifdef QWS startStopButton->setOnIconSet( *cancelIconSet ); startStopButton->setOffIconSet( *searchIconSet ); + #else + startStopButton->setIconSet( *startStopIconSet ); + #endif startStopButton->setToggleButton( true ); @@ -91,2 +101,3 @@ WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * n + #ifdef QWS mb->insertItem( startStopButton ); @@ -94,2 +105,7 @@ WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * n mb->insertItem( d ); + #else // Qt3 changed the insertion order. It's now totally random :( + mb->insertItem( d ); + mb->insertItem( c ); + mb->insertItem( startStopButton ); + #endif @@ -107,3 +123,5 @@ void WellenreiterMainWindow::showConfigure() cw->setCaption( tr( "Configure" ) ); + #ifdef QWS cw->showMaximized(); + #endif int result = cw->exec(); @@ -130,7 +148,10 @@ 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 @@ -37,2 +37,3 @@ class WellenreiterMainWindow: public QMainWindow + QIconSet* startStopIconSet; const QIconSet* searchIconSet; 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 @@ -17,3 +17,3 @@ -#define PIXMAPPATH "/usr/share/wellenreiter/pics/" +#define PIXMAPPATH "/usr/local/share" 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 @@ -76,3 +76,3 @@ Wellenreiter::Wellenreiter( QWidget* parent ) #else - manufile.sprintf( "/home/mickey/work/opie/share/wellenreiter/manufacturers.dat" ); + manufile.sprintf( "/usr/local/share/wellenreiter/manufacturers.dat" ); #endif |