summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2003-02-20 00:00:22 (UTC)
committer mickeyl <mickeyl>2003-02-20 00:00:22 (UTC)
commitd25a16d1fd34374e4d2815dec4d11b25b2049432 (patch) (side-by-side diff)
tree51f8fe7f32a891e3a1f5c579b15734bd784f8142
parentc815825a0368257defb64d5f8ce5e2a2f2da93c6 (diff)
downloadopie-d25a16d1fd34374e4d2815dec4d11b25b2049432.zip
opie-d25a16d1fd34374e4d2815dec4d11b25b2049432.tar.gz
opie-d25a16d1fd34374e4d2815dec4d11b25b2049432.tar.bz2
- add mainwindow as central window
- add menubar and some toolbuttons
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/gui-x11.pro4
-rw-r--r--noncore/net/wellenreiter/gui/gui.pro25
-rw-r--r--noncore/net/wellenreiter/gui/main.cpp12
-rw-r--r--noncore/net/wellenreiter/gui/mainwindow.cpp92
-rw-r--r--noncore/net/wellenreiter/gui/mainwindow.h43
-rwxr-xr-xpics/wellenreiter/CancelIcon.pngbin0 -> 821 bytes
-rw-r--r--pics/wellenreiter/InfoIcon.pngbin0 -> 914 bytes
-rw-r--r--pics/wellenreiter/SearchIcon.pngbin0 -> 1059 bytes
-rw-r--r--pics/wellenreiter/SettingsIcon.pngbin0 -> 918 bytes
9 files changed, 166 insertions, 10 deletions
diff --git a/noncore/net/wellenreiter/gui/gui-x11.pro b/noncore/net/wellenreiter/gui/gui-x11.pro
index 856e0b2..25185fb 100644
--- a/noncore/net/wellenreiter/gui/gui-x11.pro
+++ b/noncore/net/wellenreiter/gui/gui-x11.pro
@@ -2,8 +2,8 @@ DESTDIR = .
TEMPLATE = app
CONFIG = qt warn_on debug
#CONFIG = qt warn_on release
-HEADERS = 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 wellenreiterbase.cpp wellenreiter.cpp scanlistitem.cpp scanlist.cpp logwindow.cpp hexwindow.cpp configwindow.cpp resource.cpp wlan.cpp cardconfig.cpp manufacturers.cpp
+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
diff --git a/noncore/net/wellenreiter/gui/gui.pro b/noncore/net/wellenreiter/gui/gui.pro
index 39eda52..4ee360d 100644
--- a/noncore/net/wellenreiter/gui/gui.pro
+++ b/noncore/net/wellenreiter/gui/gui.pro
@@ -2,8 +2,29 @@ DESTDIR = $(OPIEDIR)/bin
TEMPLATE = app
CONFIG = qt warn_on debug
#CONFIG = qt warn_on release
-HEADERS = wellenreiterbase.h wellenreiter.h scanlistitem.h scanlist.h logwindow.h hexwindow.h configwindow.h wlan.h cardconfig.h manufacturers.h
-SOURCES = main.cpp wellenreiterbase.cpp wellenreiter.cpp scanlistitem.cpp scanlist.cpp logwindow.cpp hexwindow.cpp configwindow.cpp wlan.cpp cardconfig.cpp manufacturers.h
+HEADERS = mainwindow.h \
+ wellenreiterbase.h \
+ wellenreiter.h \
+ scanlistitem.h \
+ scanlist.h \
+ logwindow.h \
+ hexwindow.h \
+ configwindow.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 \
+ wlan.cpp \
+ cardconfig.cpp \
+ manufacturers.h
INCLUDEPATH += $(OPIEDIR)/include ../
DEPENDPATH += $(OPIEDIR)/include ../
LIBS += -lqpe -lopie -L. -lwellenreiter
diff --git a/noncore/net/wellenreiter/gui/main.cpp b/noncore/net/wellenreiter/gui/main.cpp
index 3307d49..270ce06 100644
--- a/noncore/net/wellenreiter/gui/main.cpp
+++ b/noncore/net/wellenreiter/gui/main.cpp
@@ -13,7 +13,7 @@
**
**********************************************************************/
-#include "wellenreiter.h"
+#include "mainwindow.h"
#ifdef QWS
#include <qpe/qpeapplication.h>
@@ -29,14 +29,14 @@ int main( int argc, char **argv )
QApplication a( argc, argv );
#endif
- Wellenreiter e;
+ WellenreiterMainWindow w;
- e.setCaption( Wellenreiter::tr("Wellenreiter") );
+ w.setCaption( "Wellenreiter/Opie" );
#ifdef QWS
- a.showMainWidget(&e);
+ a.showMainWidget(&w);
#else
- a.setMainWidget(&e);
- e.show();
+ a.setMainWidget(&w);
+ w.show();
#endif
return a.exec();
diff --git a/noncore/net/wellenreiter/gui/mainwindow.cpp b/noncore/net/wellenreiter/gui/mainwindow.cpp
new file mode 100644
index 0000000..d7326c0
--- a/dev/null
+++ b/noncore/net/wellenreiter/gui/mainwindow.cpp
@@ -0,0 +1,92 @@
+/**********************************************************************
+** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved.
+**
+** This file is part of Opie Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+**********************************************************************/
+
+#include "mainwindow.h"
+#include "wellenreiter.h"
+
+#include <qiconset.h>
+#include <qmenubar.h>
+#include <qpopupmenu.h>
+#include <qstatusbar.h>
+#include <qtoolbutton.h>
+
+#ifdef QWS
+#include <qpe/resource.h>
+#else
+#include "resource.h"
+#endif
+
+WellenreiterMainWindow::WellenreiterMainWindow( QWidget * parent, const char * name, WFlags f )
+ :QMainWindow( parent, name, f )
+{
+ mw = new Wellenreiter( this );
+ 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" ) );
+ cancelIconSet = new QIconSet( Resource::loadPixmap( "wellenreiter/CancelIcon" ) );
+
+ // setup tool buttons
+
+ QToolButton* b = new QToolButton( 0 );
+ b->setAutoRaise( true );
+ b->setOnIconSet( *cancelIconSet );
+ b->setOffIconSet( *searchIconSet );
+ b->setToggleButton( true );
+
+ QToolButton* c = new QToolButton( 0 );
+ c->setAutoRaise( true );
+ c->setIconSet( *infoIconSet );
+ c->setEnabled( false );
+
+ QToolButton* d = new QToolButton( 0 );
+ d->setAutoRaise( true );
+ d->setIconSet( *settingsIconSet );
+
+ // setup menu bar
+
+ QMenuBar* mb = menuBar();
+
+ QPopupMenu* p = new QPopupMenu( mb );
+ p->insertItem( "&Load" );
+ p->insertItem( "&Save" );
+
+ mb->insertItem( "&File", p );
+ mb->setItemEnabled( mb->insertItem( b ), false );
+ mb->setItemEnabled( mb->insertItem( c ), false );
+ mb->insertItem( d );
+
+ // setup status bar
+
+ // statusBar()->message( "Ready." );
+
+};
+
+WellenreiterMainWindow::~WellenreiterMainWindow()
+{
+
+ delete searchIconSet;
+ delete infoIconSet;
+ delete settingsIconSet;
+ delete cancelIconSet;
+
+
+};
+
+
+
diff --git a/noncore/net/wellenreiter/gui/mainwindow.h b/noncore/net/wellenreiter/gui/mainwindow.h
new file mode 100644
index 0000000..dcc79e6
--- a/dev/null
+++ b/noncore/net/wellenreiter/gui/mainwindow.h
@@ -0,0 +1,43 @@
+/**********************************************************************
+** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved.
+**
+** This file is part of Opie Environment.
+**
+** This file may be distributed and/or modified under the terms of the
+** GNU General Public License version 2 as published by the Free Software
+** Foundation and appearing in the file LICENSE.GPL included in the
+** packaging of this file.
+**
+** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
+** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
+**
+**********************************************************************/
+
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <qmainwindow.h>
+
+class Wellenreiter;
+class QIconSet;
+
+class WellenreiterMainWindow: public QMainWindow
+{
+
+ public:
+ WellenreiterMainWindow( QWidget * parent = 0, const char * name = "mainwindow", WFlags f = 0 );
+ ~WellenreiterMainWindow();
+
+ protected:
+ Wellenreiter* mw;
+
+ const QIconSet* searchIconSet;
+ const QIconSet* infoIconSet;
+ const QIconSet* settingsIconSet;
+ const QIconSet* cancelIconSet;
+
+
+};
+
+#endif
+
diff --git a/pics/wellenreiter/CancelIcon.png b/pics/wellenreiter/CancelIcon.png
new file mode 100755
index 0000000..1cabc6e
--- a/dev/null
+++ b/pics/wellenreiter/CancelIcon.png
Binary files differ
diff --git a/pics/wellenreiter/InfoIcon.png b/pics/wellenreiter/InfoIcon.png
new file mode 100644
index 0000000..8d60776
--- a/dev/null
+++ b/pics/wellenreiter/InfoIcon.png
Binary files differ
diff --git a/pics/wellenreiter/SearchIcon.png b/pics/wellenreiter/SearchIcon.png
new file mode 100644
index 0000000..2206448
--- a/dev/null
+++ b/pics/wellenreiter/SearchIcon.png
Binary files differ
diff --git a/pics/wellenreiter/SettingsIcon.png b/pics/wellenreiter/SettingsIcon.png
new file mode 100644
index 0000000..9aab59b
--- a/dev/null
+++ b/pics/wellenreiter/SettingsIcon.png
Binary files differ