summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2003-02-24 15:54:13 (UTC)
committer mickeyl <mickeyl>2003-02-24 15:54:13 (UTC)
commitf294a5d101fc9935e1a73f3d44b43ea00d0a03c7 (patch) (unidiff)
tree3fb4345bb3bacb023c217d55786b734c052de545
parent25725a7cd45731656e3ee3476614512b027dacf8 (diff)
downloadopie-f294a5d101fc9935e1a73f3d44b43ea00d0a03c7.zip
opie-f294a5d101fc9935e1a73f3d44b43ea00d0a03c7.tar.gz
opie-f294a5d101fc9935e1a73f3d44b43ea00d0a03c7.tar.bz2
visual enhancements for the listview...
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/Makefile.static2
-rw-r--r--noncore/net/wellenreiter/README124
-rw-r--r--noncore/net/wellenreiter/config.in2
-rw-r--r--noncore/net/wellenreiter/cornucopia/.cvsignore8
-rw-r--r--noncore/net/wellenreiter/cornucopia/README3
-rw-r--r--noncore/net/wellenreiter/cornucopia/cornucopia.pro16
-rw-r--r--noncore/net/wellenreiter/cornucopia/olistview.cpp262
-rw-r--r--noncore/net/wellenreiter/cornucopia/olistview.h168
-rw-r--r--noncore/net/wellenreiter/gui/gui.pro2
-rw-r--r--noncore/net/wellenreiter/gui/scanlist.cpp2
-rw-r--r--noncore/net/wellenreiter/gui/scanlist.h4
-rw-r--r--noncore/net/wellenreiter/gui/scanlistitem.cpp4
-rw-r--r--noncore/net/wellenreiter/gui/scanlistitem.h18
-rw-r--r--noncore/net/wellenreiter/opie-wellenreiter.control4
-rw-r--r--noncore/net/wellenreiter/wellenreiter.pro2
15 files changed, 527 insertions, 94 deletions
diff --git a/noncore/net/wellenreiter/Makefile.static b/noncore/net/wellenreiter/Makefile.static
index 22b23f4..d5cdf44 100644
--- a/noncore/net/wellenreiter/Makefile.static
+++ b/noncore/net/wellenreiter/Makefile.static
@@ -6,13 +6,13 @@
6# Template: subdirs 6# Template: subdirs
7############################################################################# 7#############################################################################
8 8
9 MAKEFILE=Makefile 9 MAKEFILE=Makefile
10 TMAKE =tmake 10 TMAKE =tmake
11 11
12 SUBDIRS =libwellenreiter/source daemon/source gui 12 SUBDIRS =libwellenreiter/source daemon/source gui cornucopia
13 13
14all: $(SUBDIRS) 14all: $(SUBDIRS)
15 15
16$(SUBDIRS): FORCE 16$(SUBDIRS): FORCE
17 cd $@; $(MAKE) 17 cd $@; $(MAKE)
18 18
diff --git a/noncore/net/wellenreiter/README b/noncore/net/wellenreiter/README
index 7de6a33..ef094c4 100644
--- a/noncore/net/wellenreiter/README
+++ b/noncore/net/wellenreiter/README
@@ -1,111 +1,87 @@
1/*************************************************************************/ 1/************************************************************************/
2/* W e l l e n r e i t e r I I */ 2/* W e l l e n r e i t e r I I */
3/* =============================== */ 3/* =============================== */
4/* */ 4/* */
5 /* Version: Opie-ALPHA-January */ 5/* Version: Opie-ALPHA-February */
6/*************************************************************************/ 6/************************************************************************/
7 7
8-------------------------------------------------- 8----------------------------------------------------
9Release Notes for Opie-ALPHA Version January 2002 9Release Notes for Opie-ALPHA Version February 2002
10-------------------------------------------------- 10----------------------------------------------------
11 11
12===================== 12=====================
13= Supported Devices = 13= Supported Devices =
14===================== 14=====================
15 15
16* low-level orinoco_cs-based (including prism2 and spectrum_cs) 16- HERMES chipset [ orinoco ], e.g. Lucent/Agere cards
17- PRISM2 chipset [ orinoco or hostap ], e.g. D-Link, Buffallo
18- SYMBOL/SPECTRUM chipset* [ orinoco ], e.g. Symbol Spectrum 24, Socket Lowpower CF
19- CISCO chipset
20
21* Warning: Current Symbol/Spectrum CF drivers have bugs - they freeze the system in monitor mode.
22 This has nothing todo with Wellenreiter as its a driver problem.
17 23
18===================== 24=====================
19= Build = 25= Build =
20===================== 26=====================
21 27
22(I) Opie Build Environment 28(I) Opie Build Environment
23 29
24To compile Wellenreiter within the Opie build environment, add the 30To compile Wellenreiter within the Opie build environment, do
25following directories to $OPIEDIR/Makefile, e.g. to 'NONAPPS=' 31'make menuconfig' and check Wellenreiter in the subsection
26 32"Communications and Networking"
27noncore/net/wellenreiter/libwellenreiter \
28noncore/net/wellenreiter/daemon \
29noncore/net/wellenreiter/contrib/orinoco_hopper \
30noncore/net/wellenreiter/gui
31 33
32./configure and rebuild. Note that you need libpcap in your toolchain. 34do 'make SUBDIRS=noncore/net/wellenreiter' or 'make' (to build everything)
35Note that you need to have libpcap in your toolchain.
33 36
34(II) OpenZaurus Build Environment 37(II) OpenZaurus Build Environment
35 38
36To compile Wellenreiter within the OZ build environment, add the 39See (I), but do 'make SUBDIRS=packages/opie'
37following lines to $OPIEDIR/packages:
38CONFIG_WELLENREITER noncore/net/wellenreiter/libwellenreiter libwellenreiter.pro
39CONFIG_WELLENREITER noncore/net/wellenreiter/daemon daemon.pro
40CONFIG_WELLENREITER noncore/net/wellenreiter/gui gui.pro
41CONFIG_WELLENREITER noncore/net/wellenreiter/contrib/orinoco_hopper orinoco_hopper.pro
42
43make -f Makefile.test clean-configs
44cd <BUILDROOT>
45make SUBDIRS=packages/opie package
46 40
47(III) To compile a standalone Wellenreiter for X11, you need Qt3 and the development 41(III) To compile a standalone Wellenreiter for X11, you need Qt3 and the development
48packages for Qt3, e.g. libqt3-devel. Assuming, $QTDIR is set to your Qt-Director 42packages for Qt3, e.g. libqt3-devel. Assuming, $QTDIR is set to your Qt-Director
49(e.g. /usr/lib/qt3), set $OPIEDIR to your installation prefix, e.g. /usr/local, then 43(e.g. /usr/lib/qt3), set $OPIEDIR to your installation prefix, e.g. /usr/local, then
50export QMAKESPEC=$QTDIR/mkspecs/linux-g++ 44'export QMAKESPEC=$QTDIR/mkspecs/linux-g++'
51qmake "platform=x11" wellenreiter.pro 45'qmake "platform=x11" wellenreiter.pro'
52make 46'make'
53make install 47'make install'
54 48
55===================== 49=====================
56= Install = 50= Install =
57===================== 51=====================
58 52
59Alternatively, you can use our precompiled ipk. Get it from 53Alternatively, you can use our precompiled ipk. Get it from
60http://opie.net.wox.org/wellenreiter/. This also includes a recent libpcap. 54http://opie.net.wox.org/wellenreiter/. There is also a recent libpcap available.
61 55
62===================== 56=====================
63= Run = 57= Run =
64===================== 58=====================
65 59
66There are two possible modes: <Manual> and <Automatic>. I suggest, you 60There are two possible modes: <Manual> and <Automatic>. I suggest, you
67start with the <Automatic> Mode. This works just using the "Start" 61start with the <Automatic> Mode. This works just using the Start/Stop
68and "Stop" Pushbuttons in the Wellenreiter GUI. If this doesn't work, 62Toolbutton in the Wellenreiter Menubar. Note that you need to configure
69then use the following strategy: 63your card before the Start/Stop-Toolbutton can be clicked.
70 64
711. Place card in monitor mode. This is device dependent. 65If this doesn't work, then try calling the wellenreiter daemon
72 66[wellenreiterd] manually. It has a command line interface. You can
73 Caution: Don't do this while you're logged in via ssh 67start the GUI before or after the daemon.
74 or otherwise using the wireless interface - your connection
75 will freeze: The card can't be used normally when sniffing!
76
77 For most orinoco-based cards this can be done using either
78 'iwpriv <interface> 2' or 'iwpriv <interface> 2 1'.
79
80 You can check if this works, by calling 'ifconfig <interface>'.
81 If you see 'Protocol: UNSPEC' and an unusual long MAC-Address,
82 then your card has been successfully set to the monitor mode.
83
842. Start a channel hopper. A wireless card has several channels
85 (e.g. radio frequencies) here it can listen for beacons.
86 Beacons are management data frames from other stations.
87 Remember, this is radio transmission, so the card has to be
88 "tuned" to a certain channel to be able to receive the beacons.
89
90 In order to scan the complete frequency spectrum and thus be able
91 to detect all available stations, you have to 'hop' through the
92 channels frequently. You can do this manually (e.g. with 'iwconfig')
93 [hahaha] or you can use a channel hopper.
94
95 For convenience, the current Wellenreiter Alpha comes with a
96 channel hopper for Orinoco-based cards. Start this via
97 orinoco_hopper <interface>.
98
993. Start the Wellenreiter sniffing daemon: wellenreiterd.
100
1014. Start the Wellenreiter GUI and sniff like hell. Don't press the button
102 "Start Scan" yet, because it enables the demo mode and will crash the
103 wellenreiterd daemon if running.
104 68
105===================== 69=====================
106= Credits = 70= Credits =
107===================== 71=====================
108 72
109Sniffer: Max Moser <max@remote-exploit.org> 73Wellenreiter/Opie is (C) 2002-2003 M-M-M
74
75Sniffer Engine: Max Moser <max@remote-exploit.org>
110Communication and Protocol: Martin J. Muench <mjm@remote-exploit.org> 76Communication and Protocol: Martin J. Muench <mjm@remote-exploit.org>
111GUI: Michael Lauer <mickeyl@handhelds.org> 77GUI and Packaging: Michael Lauer <mickeyl@handhelds.org>
78
79=====================
80= Links =
81=====================
82
83Opie Project: http://opie.handhelds.org
84OpenZaurus Project: http://openzaurus.org
85Wellenreiter: http://www.remote-exploit.org
86Wellenreiter/Opie: http://opie.net.wox.org/wellenreiter
87
diff --git a/noncore/net/wellenreiter/config.in b/noncore/net/wellenreiter/config.in
index e7abcf3..19f85e2 100644
--- a/noncore/net/wellenreiter/config.in
+++ b/noncore/net/wellenreiter/config.in
@@ -1,4 +1,4 @@
1 config WELLENREITER 1 config WELLENREITER
2 boolean "wellenreiter" 2 boolean "wellenreiter (wireless LAN monitor)"
3 default "y" 3 default "y"
4 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE 4 depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE
diff --git a/noncore/net/wellenreiter/cornucopia/.cvsignore b/noncore/net/wellenreiter/cornucopia/.cvsignore
new file mode 100644
index 0000000..724d599
--- a/dev/null
+++ b/noncore/net/wellenreiter/cornucopia/.cvsignore
@@ -0,0 +1,8 @@
1*.o
2*~
3Makefile*
4moc_*
5wellenreitertemplate.cpp
6wellenreitertemplate.h
7configbase.h
8configbase.cpp
diff --git a/noncore/net/wellenreiter/cornucopia/README b/noncore/net/wellenreiter/cornucopia/README
new file mode 100644
index 0000000..36a6954
--- a/dev/null
+++ b/noncore/net/wellenreiter/cornucopia/README
@@ -0,0 +1,3 @@
1---------------------------------------------------------------
2Dies ist ein Testballon für opielibs1.2 - Codename: Cornucopia
3---------------------------------------------------------------
diff --git a/noncore/net/wellenreiter/cornucopia/cornucopia.pro b/noncore/net/wellenreiter/cornucopia/cornucopia.pro
new file mode 100644
index 0000000..7ffa202
--- a/dev/null
+++ b/noncore/net/wellenreiter/cornucopia/cornucopia.pro
@@ -0,0 +1,16 @@
1DESTDIR = $(OPIEDIR)/lib
2MOC_DIR = ./tmp
3OBJECTS_DIR = ./tmp
4TEMPLATE = lib
5CONFIG = qt warn_on debug
6VERSION = 0.1
7HEADERS = olistview.h
8SOURCES = olistview.cpp
9INCLUDEPATH = $(OPIEDIR)/include
10DEPENDPATH = $(OPIEDIR)/include
11TARGET = cornucopia
12
13!contains( platform, x11 ) {
14 include ( $(OPIEDIR)/include.pro )
15}
16
diff --git a/noncore/net/wellenreiter/cornucopia/olistview.cpp b/noncore/net/wellenreiter/cornucopia/olistview.cpp
new file mode 100644
index 0000000..bca17b2
--- a/dev/null
+++ b/noncore/net/wellenreiter/cornucopia/olistview.cpp
@@ -0,0 +1,262 @@
1/*
2                 This file is part of the Opie Project
3
4              Copyright (C) 2003 Michael 'Mickey' Lauer
5 <mickey@tm.informatik.uni-frankfurt.de>
6 =.
7 .=l.
8           .>+-=
9 _;:,     .>    :=|. This program is free software; you can
10.> <`_,   >  .   <= redistribute it and/or modify it under
11:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
12.="- .-=="i,     .._ License as published by the Free Software
13 - .   .-<_>     .<> Foundation; either version 2 of the License,
14     ._= =}       : or (at your option) any later version.
15    .%`+i>       _;_.
16    .i_,=:_.      -<s. This program is distributed in the hope that
17     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
18    : ..    .:,     . . . without even the implied warranty of
19    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
20  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
21..}^=.=       =       ; Library General Public License for more
22++=   -.     .`     .: details.
23 :     =  ...= . :.=-
24 -.   .:....=;==+<; You should have received a copy of the GNU
25  -_. . .   )=.  = Library General Public License along with
26    --        :-=` this library; see the file COPYING.LIB.
27 If not, write to the Free Software Foundation,
28 Inc., 59 Temple Place - Suite 330,
29 Boston, MA 02111-1307, USA.
30
31*/
32
33#include <qcolor.h>
34#include <qheader.h>
35#include <qpainter.h>
36#include <qpixmap.h>
37
38#include "olistview.h"
39
40//****************************** OListView **************************************************************************
41
42OListView::OListView( QWidget *parent, const char *name )
43 :QListView( parent, name )
44{
45 //FIXME: get from global settings and calculate ==> see oglobalsettings.*
46
47 m_alternateBackground = QColor( 238, 246, 255 );
48 m_columnSeparator = QPen( QColor( 150, 160, 170 ), 0, DotLine );
49 m_fullWidth = true;
50}
51
52OListView::~OListView()
53{
54}
55
56void OListView::setFullWidth( bool fullWidth )
57{
58 m_fullWidth = m_fullWidth;
59 #if QT_VERSION > 290
60 header()->setStretchEnabled( fullWidth, columns()-1 );
61 #endif
62}
63
64bool OListView::fullWidth() const
65{
66 return m_fullWidth;
67}
68
69int OListView::addColumn( const QString& label, int width )
70{
71 int result = QListView::addColumn( label, width );
72 #if QT_VERSION > 290
73 if (m_fullWidth) {
74 header()->setStretchEnabled( false, columns()-2 );
75 header()->setStretchEnabled( true, columns()-1 );
76 }
77 #endif
78 return result;
79}
80
81int OListView::addColumn( const QIconSet& iconset, const QString& label, int width )
82{
83 int result = QListView::addColumn( iconset, label, width );
84 #if QT_VERSION > 290
85 if (m_fullWidth) {
86 header()->setStretchEnabled( false, columns()-2 );
87 header()->setStretchEnabled( true, columns()-1 );
88 }
89 #endif
90 return result;
91}
92
93void OListView::removeColumn( int index )
94{
95 QListView::removeColumn(index);
96 #if QT_VERSION > 290
97 if ( m_fullWidth && index == columns() )
98 {
99 header()->setStretchEnabled( true, columns()-1 );
100 }
101 #endif
102}
103
104const QColor& OListView::alternateBackground() const
105{
106 return m_alternateBackground;
107}
108
109void OListView::setAlternateBackground( const QColor &c )
110{
111 m_alternateBackground = c;
112 repaint();
113}
114
115const QPen& OListView::columnSeparator() const
116{
117 return m_columnSeparator;
118}
119
120void OListView::setColumnSeparator( const QPen& p )
121{
122 m_columnSeparator = p;
123 repaint();
124}
125
126//****************************** OListViewItem ***********************************************************************
127
128OListViewItem::OListViewItem(QListView *parent)
129 : QListViewItem(parent)
130{
131 init();
132}
133
134OListViewItem::OListViewItem(QListViewItem *parent)
135 : QListViewItem(parent)
136{
137 init();
138}
139
140OListViewItem::OListViewItem(QListView *parent, QListViewItem *after)
141 : QListViewItem(parent, after)
142{
143 init();
144}
145
146OListViewItem::OListViewItem(QListViewItem *parent, QListViewItem *after)
147 : QListViewItem(parent, after)
148{
149 init();
150}
151
152OListViewItem::OListViewItem(QListView *parent,
153 QString label1, QString label2, QString label3, QString label4,
154 QString label5, QString label6, QString label7, QString label8)
155 : QListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8)
156{
157 init();
158}
159
160OListViewItem::OListViewItem(QListViewItem *parent,
161 QString label1, QString label2, QString label3, QString label4,
162 QString label5, QString label6, QString label7, QString label8)
163 : QListViewItem(parent, label1, label2, label3, label4, label5, label6, label7, label8)
164{
165 init();
166}
167
168OListViewItem::OListViewItem(QListView *parent, QListViewItem *after,
169 QString label1, QString label2, QString label3, QString label4,
170 QString label5, QString label6, QString label7, QString label8)
171 : QListViewItem(parent, after, label1, label2, label3, label4, label5, label6, label7, label8)
172{
173 init();
174}
175
176OListViewItem::OListViewItem(QListViewItem *parent, QListViewItem *after,
177 QString label1, QString label2, QString label3, QString label4,
178 QString label5, QString label6, QString label7, QString label8)
179 : QListViewItem(parent, after, label1, label2, label3, label4, label5, label6, label7, label8)
180{
181 init();
182}
183
184OListViewItem::~OListViewItem()
185{
186}
187
188void OListViewItem::init()
189{
190 m_known = false;
191}
192
193const QColor &OListViewItem::backgroundColor()
194{
195 return isAlternate() ? static_cast<OListView*>(listView())->alternateBackground() :
196 listView()->viewport()->colorGroup().base();
197}
198
199bool OListViewItem::isAlternate()
200{
201 OListView *lv = static_cast<OListView*>( listView() );
202
203 // check if the item above is an OListViewItem
204 OListViewItem *above = static_cast<OListViewItem*>( itemAbove() );
205 /*if (not itemAbove()->inherits( "OListViewItem" )) return false;*/
206
207 // check if we have a valid alternate background color
208 if (not (lv && lv->alternateBackground().isValid())) return false;
209
210 m_known = above ? above->m_known : true;
211 if (m_known)
212 {
213 m_odd = above ? !above->m_odd : false;
214 }
215 else
216 {
217 OListViewItem *item;
218 bool previous = true;
219 if (parent())
220 {
221 item = static_cast<OListViewItem *>(parent());
222 if ( item /*&& item->inherits( "OListViewItem" )*/ ) previous = item->m_odd;
223 item = static_cast<OListViewItem *>(parent()->firstChild());
224 /* if !( item.inherits( "OListViewItem" ) item = 0; */
225 }
226 else
227 {
228 item = static_cast<OListViewItem *>(lv->firstChild());
229 }
230
231 while(item)
232 {
233 item->m_odd = previous = !previous;
234 item->m_known = true;
235 item = static_cast<OListViewItem *>(item->nextSibling());
236 /* if !(item.inherits( "OListViewItem" ) ) break; */
237 }
238 }
239 return m_odd;
240}
241
242void OListViewItem::paintCell(QPainter *p, const QColorGroup &cg, int column, int width, int alignment)
243{
244 QColorGroup _cg = cg;
245 const QPixmap *pm = listView()->viewport()->backgroundPixmap();
246 if (pm && !pm->isNull())
247 {
248 _cg.setBrush(QColorGroup::Base, QBrush(backgroundColor(), *pm));
249 p->setBrushOrigin( -listView()->contentsX(), -listView()->contentsY() );
250 }
251 else if ( isAlternate() )
252 {
253 _cg.setColor( QColorGroup::Base, static_cast<OListView*>( listView() )->alternateBackground() );
254 }
255 QListViewItem::paintCell(p, _cg, column, width, alignment);
256
257 //FIXME: Use styling here?
258
259 const QPen& pen = static_cast<OListView*>( listView() )->columnSeparator();
260 p->setPen( pen );
261 p->drawLine( width-1, 0, width-1, height() );
262}
diff --git a/noncore/net/wellenreiter/cornucopia/olistview.h b/noncore/net/wellenreiter/cornucopia/olistview.h
new file mode 100644
index 0000000..4b9e4b0
--- a/dev/null
+++ b/noncore/net/wellenreiter/cornucopia/olistview.h
@@ -0,0 +1,168 @@
1/*
2                 This file is part of the Opie Project
3
4              Copyright (C) 2003 Michael 'Mickey' Lauer
5 <mickey@tm.informatik.uni-frankfurt.de>
6 =.
7 .=l.
8           .>+-=
9 _;:,     .>    :=|. This program is free software; you can
10.> <`_,   >  .   <= redistribute it and/or modify it under
11:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
12.="- .-=="i,     .._ License as published by the Free Software
13 - .   .-<_>     .<> Foundation; either version 2 of the License,
14     ._= =}       : or (at your option) any later version.
15    .%`+i>       _;_.
16    .i_,=:_.      -<s. This program is distributed in the hope that
17     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
18    : ..    .:,     . . . without even the implied warranty of
19    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
20  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
21..}^=.=       =       ; Library General Public License for more
22++=   -.     .`     .: details.
23 :     =  ...= . :.=-
24 -.   .:....=;==+<; You should have received a copy of the GNU
25  -_. . .   )=.  = Library General Public License along with
26    --        :-=` this library; see the file COPYING.LIB.
27 If not, write to the Free Software Foundation,
28 Inc., 59 Temple Place - Suite 330,
29 Boston, MA 02111-1307, USA.
30
31*/
32
33#ifndef OLISTVIEW_H
34#define OLISTVIEW_H
35
36#include <qlistview.h>
37#include <qcolor.h>
38#include <qpen.h>
39
40/**
41 * A @ref QListView variant featuring visual enhancements
42 * like an alternate background for odd rows and an autostretch
43 * mode for the width of the widget.
44 *
45 * @author Michael 'Mickey' Lauer <mickey@tm.informatik.uni-frankfurt.de>
46 * @short OListView list/tree widget.
47 */
48 class OListView: public QListView
49{
50 public:
51 /**
52 * Constructor.
53 *
54 * The parameters @p parent and @p name are handled by
55 * @ref QListView, as usual.
56 */
57 OListView ( QWidget *parent = 0, const char *name = 0 );
58
59 /**
60 * Destructor.
61 */
62 virtual ~OListView();
63
64 /**
65 * Let the last column fit exactly all the available width.
66 */
67 void setFullWidth( bool fullWidth );
68
69 /**
70 * Returns whether the last column is set to fit the available width.
71 */
72 bool fullWidth() const;
73
74 /**
75 * Reimplemented for full width support
76 */
77 virtual int addColumn( const QString& label, int width = -1 );
78
79 /**
80 * Reimplemented for full width support
81 */
82 virtual int addColumn( const QIconSet& iconset, const QString& label, int width = -1 );
83
84 /**
85 * Reimplemented for full width support
86 */
87 virtual void removeColumn(int index);
88
89 /**
90 * sets the alternate background background color.
91 * This only has an effect if the items are OListViewItems
92 *
93 * @param c the color to use for every other item. Set to an invalid
94 * color to disable alternate colors.
95 */
96 void setAlternateBackground( const QColor &c );
97
98 /**
99 * sets the column separator pen.
100 *
101 * @param p the pen used to draw the column separator.
102 */
103 void setColumnSeparator( const QPen &p );
104
105 /**
106 * @return the alternate background color
107 */
108 const QColor& alternateBackground() const;
109
110 /**
111 * @return the column separator pen
112 */
113 const QPen& columnSeparator() const;
114
115 private:
116 QColor m_alternateBackground;
117 bool m_fullWidth;
118 QPen m_columnSeparator;
119
120};
121
122//****************************** OListViewItem ******************************************************************
123
124class OListViewItem: public QListViewItem
125{
126 public:
127 OListViewItem( QListView * parent );
128 OListViewItem( QListViewItem * parent );
129 OListViewItem( QListView * parent, QListViewItem * after );
130 OListViewItem( QListViewItem * parent, QListViewItem * after );
131
132 OListViewItem( QListView * parent,
133 QString, QString = QString::null,
134 QString = QString::null, QString = QString::null,
135 QString = QString::null, QString = QString::null,
136 QString = QString::null, QString = QString::null );
137
138 OListViewItem( QListViewItem * parent,
139 QString, QString = QString::null,
140 QString = QString::null, QString = QString::null,
141 QString = QString::null, QString = QString::null,
142 QString = QString::null, QString = QString::null );
143
144 OListViewItem( QListView * parent, QListViewItem * after,
145 QString, QString = QString::null,
146 QString = QString::null, QString = QString::null,
147 QString = QString::null, QString = QString::null,
148 QString = QString::null, QString = QString::null );
149
150 OListViewItem( QListViewItem * parent, QListViewItem * after,
151 QString, QString = QString::null,
152 QString = QString::null, QString = QString::null,
153 QString = QString::null, QString = QString::null,
154 QString = QString::null, QString = QString::null );
155
156 virtual ~OListViewItem();
157
158 const QColor& backgroundColor();
159 bool isAlternate();
160 void paintCell( QPainter *p, const QColorGroup &cg, int column, int width, int alignment );
161 void init();
162
163 private:
164 bool m_known;
165 bool m_odd;
166};
167
168#endif
diff --git a/noncore/net/wellenreiter/gui/gui.pro b/noncore/net/wellenreiter/gui/gui.pro
index 822b0db..6037661 100644
--- a/noncore/net/wellenreiter/gui/gui.pro
+++ b/noncore/net/wellenreiter/gui/gui.pro
@@ -28,13 +28,13 @@ SOURCES = main.cpp \
28 wlan.cpp \ 28 wlan.cpp \
29 cardconfig.cpp \ 29 cardconfig.cpp \
30 manufacturers.cpp 30 manufacturers.cpp
31 31
32INCLUDEPATH += $(OPIEDIR)/include ../ 32INCLUDEPATH += $(OPIEDIR)/include ../
33DEPENDPATH += $(OPIEDIR)/include ../ 33DEPENDPATH += $(OPIEDIR)/include ../
34LIBS += -L. -lwellenreiter 34LIBS += -L. -lwellenreiter -lcornucopia
35INTERFACES = configbase.ui 35INTERFACES = configbase.ui
36TARGET = wellenreiter 36TARGET = wellenreiter
37 37
38!contains( platform, x11 ) { 38!contains( platform, x11 ) {
39 message( qws ) 39 message( qws )
40 include ( $(OPIEDIR)/include.pro ) 40 include ( $(OPIEDIR)/include.pro )
diff --git a/noncore/net/wellenreiter/gui/scanlist.cpp b/noncore/net/wellenreiter/gui/scanlist.cpp
index a689cca..6d3469c 100644
--- a/noncore/net/wellenreiter/gui/scanlist.cpp
+++ b/noncore/net/wellenreiter/gui/scanlist.cpp
@@ -18,13 +18,13 @@
18 18
19#include <assert.h> 19#include <assert.h>
20 20
21#include "manufacturers.h" 21#include "manufacturers.h"
22 22
23MScanListView::MScanListView( QWidget* parent, const char* name ) 23MScanListView::MScanListView( QWidget* parent, const char* name )
24 :QListView( parent, name ), _manufacturerdb( 0 ) 24 :OListView( parent, name ), _manufacturerdb( 0 )
25{ 25{
26 26
27 setFrameShape( QListView::StyledPanel ); 27 setFrameShape( QListView::StyledPanel );
28 setFrameShadow( QListView::Sunken ); 28 setFrameShadow( QListView::Sunken );
29 29
30 addColumn( tr( "Net/Station" ) ); 30 addColumn( tr( "Net/Station" ) );
diff --git a/noncore/net/wellenreiter/gui/scanlist.h b/noncore/net/wellenreiter/gui/scanlist.h
index 9a35a82..475f7b6 100644
--- a/noncore/net/wellenreiter/gui/scanlist.h
+++ b/noncore/net/wellenreiter/gui/scanlist.h
@@ -13,19 +13,19 @@
13** 13**
14**********************************************************************/ 14**********************************************************************/
15 15
16#ifndef SCANLIST_H 16#ifndef SCANLIST_H
17#define SCANLIST_H 17#define SCANLIST_H
18 18
19#include <qlistview.h> 19#include <cornucopia/olistview.h>
20 20
21class QString; 21class QString;
22 22
23class ManufacturerDB; 23class ManufacturerDB;
24 24
25class MScanListView: public QListView 25class MScanListView: public OListView
26{ 26{
27 Q_OBJECT 27 Q_OBJECT
28 28
29 public: 29 public:
30 MScanListView( QWidget* parent = 0, const char* name = 0 ); 30 MScanListView( QWidget* parent = 0, const char* name = 0 );
31 virtual ~MScanListView(); 31 virtual ~MScanListView();
diff --git a/noncore/net/wellenreiter/gui/scanlistitem.cpp b/noncore/net/wellenreiter/gui/scanlistitem.cpp
index dd33f5f..bfa7aa9 100644
--- a/noncore/net/wellenreiter/gui/scanlistitem.cpp
+++ b/noncore/net/wellenreiter/gui/scanlistitem.cpp
@@ -34,23 +34,23 @@ const int col_traffic = 5;
34const int col_manuf = 6; 34const int col_manuf = 6;
35const int col_firstseen = 7; 35const int col_firstseen = 7;
36const int col_lastseen = 8; 36const int col_lastseen = 8;
37 37
38MScanListItem::MScanListItem( QListView* parent, QString type, QString essid, QString macaddr, 38MScanListItem::MScanListItem( QListView* parent, QString type, QString essid, QString macaddr,
39 bool wep, int channel, int signal ) 39 bool wep, int channel, int signal )
40 :QListViewItem( parent, essid, QString::null, macaddr, QString::null, QString::null ), 40 :OListViewItem( parent, essid, QString::null, macaddr, QString::null, QString::null ),
41 _type( type ), _essid( essid ), _macaddr( macaddr ), _wep( wep ), 41 _type( type ), _essid( essid ), _macaddr( macaddr ), _wep( wep ),
42 _channel( channel ), _signal( signal ), _beacons( 0 ) 42 _channel( channel ), _signal( signal ), _beacons( 0 )
43{ 43{
44 qDebug( "creating scanlist item" ); 44 qDebug( "creating scanlist item" );
45 decorateItem( type, essid, macaddr, wep, channel, signal ); 45 decorateItem( type, essid, macaddr, wep, channel, signal );
46} 46}
47 47
48MScanListItem::MScanListItem( QListViewItem* parent, QString type, QString essid, QString macaddr, 48MScanListItem::MScanListItem( QListViewItem* parent, QString type, QString essid, QString macaddr,
49 bool wep, int channel, int signal ) 49 bool wep, int channel, int signal )
50 :QListViewItem( parent, essid, QString::null, macaddr, QString::null, QString::null ) 50 :OListViewItem( parent, essid, QString::null, macaddr, QString::null, QString::null )
51{ 51{
52 qDebug( "creating scanlist item" ); 52 qDebug( "creating scanlist item" );
53 decorateItem( type, essid, macaddr, wep, channel, signal ); 53 decorateItem( type, essid, macaddr, wep, channel, signal );
54} 54}
55 55
56void MScanListItem::decorateItem( QString type, QString essid, QString macaddr, bool wep, int channel, int signal ) 56void MScanListItem::decorateItem( QString type, QString essid, QString macaddr, bool wep, int channel, int signal )
diff --git a/noncore/net/wellenreiter/gui/scanlistitem.h b/noncore/net/wellenreiter/gui/scanlistitem.h
index c3c6255..89b3bc4 100644
--- a/noncore/net/wellenreiter/gui/scanlistitem.h
+++ b/noncore/net/wellenreiter/gui/scanlistitem.h
@@ -13,17 +13,17 @@
13** 13**
14**********************************************************************/ 14**********************************************************************/
15 15
16#ifndef SCANLISTITEM_H 16#ifndef SCANLISTITEM_H
17#define SCANLISTITEM_H 17#define SCANLISTITEM_H
18 18
19#include <qlistview.h> 19#include <cornucopia/olistview.h>
20 20
21class QString; 21class QString;
22 22
23class MScanListItem: public QListViewItem 23class MScanListItem: public OListViewItem
24{ 24{
25 public: 25 public:
26 26
27 MScanListItem::MScanListItem( QListView* parent, 27 MScanListItem::MScanListItem( QListView* parent,
28 QString type, 28 QString type,
29 QString essid, 29 QString essid,
@@ -43,37 +43,37 @@ class MScanListItem: public QListViewItem
43 43
44 protected: 44 protected:
45 45
46 virtual void decorateItem( QString type, QString essid, QString macaddr, bool wep, int channel, int signal ); 46 virtual void decorateItem( QString type, QString essid, QString macaddr, bool wep, int channel, int signal );
47 47
48 public: 48 public:
49 49
50 QString type; 50 QString type;
51 51
52 public: 52 public:
53 53
54 //const QString& type() { return _type; }; 54 //const QString& type() { return _type; };
55 const QString& essid() { return _essid; }; 55 const QString& essid() { return _essid; };
56 const QString& macaddr() { return _macaddr; }; 56 const QString& macaddr() { return _macaddr; };
57 bool wep() { return _wep; }; 57 bool wep() { return _wep; };
58 int channel() { return _channel; }; 58 int channel() { return _channel; };
59 int signal() { return _signal; }; 59 int signal() { return _signal; };
60 int beacons() { return _beacons; }; 60 int beacons() { return _beacons; };
61 61
62 void setSignal( int signal ) { /* TODO */ }; 62 void setSignal( int signal ) { /* TODO */ };
63 void receivedBeacon(); 63 void receivedBeacon();
64 64
65 void setManufacturer( const QString& manufacturer ); 65 void setManufacturer( const QString& manufacturer );
66 66
67 private: 67 private:
68 QString _type; 68 QString _type;
69 QString _essid; 69 QString _essid;
70 QString _macaddr; 70 QString _macaddr;
71 bool _wep; 71 bool _wep;
72 int _channel; 72 int _channel;
73 int _signal; 73 int _signal;
74 int _beacons; 74 int _beacons;
75 75
76}; 76};
77 77
78#endif 78#endif
79 79
diff --git a/noncore/net/wellenreiter/opie-wellenreiter.control b/noncore/net/wellenreiter/opie-wellenreiter.control
index c4cfa10..6fa79c1 100644
--- a/noncore/net/wellenreiter/opie-wellenreiter.control
+++ b/noncore/net/wellenreiter/opie-wellenreiter.control
@@ -1,9 +1,9 @@
1Files: bin/wellenreiter bin/wellenreiterd share/wellenreiter pics/wellenreiter apps/Applications/wellenreiter.desktop $OPIEDIR/lib/libwellenreiter.* 1Files: bin/wellenreiter bin/wellenreiterd share/wellenreiter pics/wellenreiter apps/Applications/wellenreiter.desktop $OPIEDIR/lib/libwellenreiter.* $OPIEDIR/lib/libcornucopia.*
2Priority: optional 2Priority: optional
3Section: opie/applications 3Section: opie/applications
4Maintainer: Michael Lauer <mickeyl@handhelds.org> 4Maintainer: Michael 'Mickey' Lauer <mickeyl@handhelds.org>
5Architecture: arm 5Architecture: arm
6Version: $QPE_VERSION-$SUB_VERSION 6Version: $QPE_VERSION-$SUB_VERSION
7Depends: opie-base, libpcap 7Depends: opie-base, libpcap
8Description: A WaveLAN Network Monitor 8Description: A WaveLAN Network Monitor
9 A WaveLAN Network Monitor/Sniffer for the Opie Environment. 9 A WaveLAN Network Monitor/Sniffer for the Opie Environment.
diff --git a/noncore/net/wellenreiter/wellenreiter.pro b/noncore/net/wellenreiter/wellenreiter.pro
index 17d0e31..1d76564 100644
--- a/noncore/net/wellenreiter/wellenreiter.pro
+++ b/noncore/net/wellenreiter/wellenreiter.pro
@@ -1,8 +1,8 @@
1TEMPLATE = subdirs 1TEMPLATE = subdirs
2unix:SUBDIRS = libwellenreiter daemon gui 2unix:SUBDIRS = cornucopia libwellenreiter daemon gui
3 3
4 4
5!contains( platform, x11 ) { 5!contains( platform, x11 ) {
6 message( Configuring Wellenreiter for build on Opie ) 6 message( Configuring Wellenreiter for build on Opie )
7 include ( $(OPIEDIR)/include.pro ) 7 include ( $(OPIEDIR)/include.pro )
8} 8}