Diffstat (limited to 'noncore/net/wellenreiter/gui/scanlist.h') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/scanlist.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/noncore/net/wellenreiter/gui/scanlist.h b/noncore/net/wellenreiter/gui/scanlist.h index 5aba0d2..2703b6a 100644 --- a/noncore/net/wellenreiter/gui/scanlist.h +++ b/noncore/net/wellenreiter/gui/scanlist.h | |||
@@ -1,66 +1,69 @@ | |||
1 | /********************************************************************** | 1 | /********************************************************************** |
2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. | 2 | ** Copyright (C) 2002 Michael 'Mickey' Lauer. All rights reserved. |
3 | ** | 3 | ** |
4 | ** This file is part of Opie Environment. | 4 | ** This file is part of Opie Environment. |
5 | ** | 5 | ** |
6 | ** This file may be distributed and/or modified under the terms of the | 6 | ** This file may be distributed and/or modified under the terms of the |
7 | ** GNU General Public License version 2 as published by the Free Software | 7 | ** GNU General Public License version 2 as published by the Free Software |
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | 8 | ** Foundation and appearing in the file LICENSE.GPL included in the |
9 | ** packaging of this file. | 9 | ** packaging of this file. |
10 | ** | 10 | ** |
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | 11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE |
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | 12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. |
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 "gps.h" | ||
20 | |||
19 | /* OPIE */ | 21 | /* OPIE */ |
20 | #include <opie2/olistview.h> | 22 | #include <opie2/olistview.h> |
21 | #include <opie2/onetutils.h> | 23 | #include <opie2/onetutils.h> |
22 | 24 | ||
23 | /* QT */ | 25 | /* QT */ |
24 | #include <qtextstream.h> | 26 | #include <qtextstream.h> |
25 | 27 | ||
26 | class QString; | 28 | class QString; |
27 | class MScanListItem; | 29 | class MScanListItem; |
28 | 30 | ||
29 | class MScanListView: public OListView | 31 | class MScanListView: public OListView |
30 | { | 32 | { |
31 | Q_OBJECT | 33 | Q_OBJECT |
32 | 34 | ||
33 | public: | 35 | public: |
34 | MScanListView( QWidget* parent = 0, const char* name = 0 ); | 36 | MScanListView( QWidget* parent = 0, const char* name = 0 ); |
35 | virtual ~MScanListView(); | 37 | virtual ~MScanListView(); |
36 | 38 | ||
37 | virtual OListViewItem* childFactory(); | 39 | virtual OListViewItem* childFactory(); |
38 | virtual void serializeTo( QDataStream& s ) const; | 40 | virtual void serializeTo( QDataStream& s ) const; |
39 | virtual void serializeFrom( QDataStream& s ); | 41 | virtual void serializeFrom( QDataStream& s ); |
40 | 42 | ||
41 | public slots: | 43 | public slots: |
42 | void addNewItem( const QString& type, const QString& essid, const OMacAddress& macaddr, bool wep, int channel, int signal ); | 44 | void addNewItem( const QString& type, const QString& essid, const OMacAddress& macaddr, bool wep, int channel, int signal, const GpsLocation& location ); |
45 | |||
43 | void fromDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via ); | 46 | void fromDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via ); |
44 | void toDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via ); | 47 | void toDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via ); |
45 | void WDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& viaFrom, const OMacAddress& viaTo ); | 48 | void WDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& viaFrom, const OMacAddress& viaTo ); |
46 | void IBSStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via ); | 49 | void IBSStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via ); |
47 | 50 | ||
48 | void identify( const OMacAddress&, const QString& ipaddr ); | 51 | void identify( const OMacAddress&, const QString& ipaddr ); |
49 | 52 | ||
50 | void contextMenuRequested( QListViewItem* item, const QPoint&, int ); | 53 | void contextMenuRequested( QListViewItem* item, const QPoint&, int ); |
51 | 54 | ||
52 | signals: | 55 | signals: |
53 | void rightButtonClicked(QListViewItem*,const QPoint&,int); | 56 | void rightButtonClicked(QListViewItem*,const QPoint&,int); |
54 | void joinNetwork( const QString&, const QString&, int, const QString& ); | 57 | void joinNetwork( const QString&, const QString&, int, const QString& ); |
55 | 58 | ||
56 | protected: | 59 | protected: |
57 | void addIfNotExisting( MScanListItem* parent, const OMacAddress& addr, const QString& type = "station" ); | 60 | void addIfNotExisting( MScanListItem* parent, const OMacAddress& addr, const QString& type = "station" ); |
58 | 61 | ||
59 | }; | 62 | }; |
60 | 63 | ||
61 | //****************************** MScanListItem **************************************************************** | 64 | //****************************** MScanListItem **************************************************************** |
62 | 65 | ||
63 | class MScanListItem: public OListViewItem | 66 | class MScanListItem: public OListViewItem |
64 | { | 67 | { |
65 | public: | 68 | public: |
66 | MScanListItem::MScanListItem( QListView* parent, | 69 | MScanListItem::MScanListItem( QListView* parent, |
@@ -78,48 +81,49 @@ class MScanListItem: public OListViewItem | |||
78 | bool wep = false, | 81 | bool wep = false, |
79 | int channel = 0, | 82 | int channel = 0, |
80 | int signal = 0 ); | 83 | int signal = 0 ); |
81 | 84 | ||
82 | 85 | ||
83 | protected: | 86 | protected: |
84 | virtual void decorateItem( QString type, QString essid, QString macaddr, bool wep, int channel, int signal ); | 87 | virtual void decorateItem( QString type, QString essid, QString macaddr, bool wep, int channel, int signal ); |
85 | 88 | ||
86 | public: | 89 | public: |
87 | QString type; | 90 | QString type; |
88 | 91 | ||
89 | public: | 92 | public: |
90 | //const QString& type() { return _type; }; | 93 | //const QString& type() { return _type; }; |
91 | const QString& essid() const; | 94 | const QString& essid() const; |
92 | const QString& macaddr() { return _macaddr; }; | 95 | const QString& macaddr() { return _macaddr; }; |
93 | bool wep() { return _wep; }; | 96 | bool wep() { return _wep; }; |
94 | int channel() { return _channel; }; | 97 | int channel() { return _channel; }; |
95 | int signal() { return _signal; }; | 98 | int signal() { return _signal; }; |
96 | int beacons() { return _beacons; }; | 99 | int beacons() { return _beacons; }; |
97 | 100 | ||
98 | void setSignal( int signal ) { /* TODO */ }; | 101 | void setSignal( int signal ) { /* TODO */ }; |
99 | void receivedBeacon(); | 102 | void receivedBeacon(); |
100 | 103 | ||
101 | void setManufacturer( const QString& manufacturer ); | 104 | void setManufacturer( const QString& manufacturer ); |
105 | void setLocation( const float& latitude, const float& longitude ); | ||
102 | 106 | ||
103 | virtual OListViewItem* childFactory(); | 107 | virtual OListViewItem* childFactory(); |
104 | virtual void serializeTo( QDataStream& s ) const; | 108 | virtual void serializeTo( QDataStream& s ) const; |
105 | virtual void serializeFrom( QDataStream& s ); | 109 | virtual void serializeFrom( QDataStream& s ); |
106 | 110 | ||
107 | protected: | 111 | protected: |
108 | void playSound( const QString& ) const; | 112 | void playSound( const QString& ) const; |
109 | 113 | ||
110 | private: | 114 | private: |
111 | QString _type; | 115 | QString _type; |
112 | QString _essid; | 116 | QString _essid; |
113 | QString _macaddr; | 117 | QString _macaddr; |
114 | bool _wep; | 118 | bool _wep; |
115 | int _channel; | 119 | int _channel; |
116 | int _signal; | 120 | int _signal; |
117 | int _beacons; | 121 | int _beacons; |
118 | 122 | ||
119 | }; | 123 | }; |
120 | 124 | ||
121 | //****************************** MScanListViewFactory **************************************************************** | 125 | //****************************** MScanListViewFactory **************************************************************** |
122 | 126 | ||
123 | /* | 127 | /* |
124 | 128 | ||
125 | class MScanListViewFactory : public OListViewFactory | 129 | class MScanListViewFactory : public OListViewFactory |