Diffstat (limited to 'noncore/net/wellenreiter/gui/scanlist.h') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/wellenreiter/gui/scanlist.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/noncore/net/wellenreiter/gui/scanlist.h b/noncore/net/wellenreiter/gui/scanlist.h index e8d48c3..cbacdee 100644 --- a/noncore/net/wellenreiter/gui/scanlist.h +++ b/noncore/net/wellenreiter/gui/scanlist.h | |||
@@ -20,93 +20,94 @@ | |||
20 | 20 | ||
21 | /* OPIE */ | 21 | /* OPIE */ |
22 | #include <opie2/olistview.h> | 22 | #include <opie2/olistview.h> |
23 | #include <opie2/onetutils.h> | 23 | #include <opie2/onetutils.h> |
24 | 24 | ||
25 | /* QT */ | 25 | /* QT */ |
26 | #include <qtextstream.h> | 26 | #include <qtextstream.h> |
27 | 27 | ||
28 | class QString; | 28 | class QString; |
29 | class MScanListItem; | 29 | class MScanListItem; |
30 | 30 | ||
31 | class MScanListView: public OListView | 31 | class MScanListView: public OListView |
32 | { | 32 | { |
33 | Q_OBJECT | 33 | Q_OBJECT |
34 | 34 | ||
35 | public: | 35 | public: |
36 | MScanListView( QWidget* parent = 0, const char* name = 0 ); | 36 | MScanListView( QWidget* parent = 0, const char* name = 0 ); |
37 | virtual ~MScanListView(); | 37 | virtual ~MScanListView(); |
38 | 38 | ||
39 | virtual OListViewItem* childFactory(); | 39 | virtual OListViewItem* childFactory(); |
40 | virtual void serializeTo( QDataStream& s ) const; | 40 | virtual void serializeTo( QDataStream& s ) const; |
41 | virtual void serializeFrom( QDataStream& s ); | 41 | virtual void serializeFrom( QDataStream& s ); |
42 | 42 | ||
43 | public slots: | 43 | public slots: |
44 | void addNewItem( const QString& type, const QString& essid, const OMacAddress& macaddr, bool wep, int channel, int signal, const GpsLocation& location ); | 44 | void addNewItem( const QString& type, const QString&, const OMacAddress&, bool, int, int, const GpsLocation&, bool = false ); |
45 | void addService( const QString& name, const OMacAddress& macaddr, const QString& ip ); | 45 | void addService( const QString& name, const OMacAddress& macaddr, const QString& ip ); |
46 | 46 | ||
47 | void fromDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via ); | 47 | void fromDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via ); |
48 | void toDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via ); | 48 | void toDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via ); |
49 | void WDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& viaFrom, const OMacAddress& viaTo ); | 49 | void WDStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& viaFrom, const OMacAddress& viaTo ); |
50 | void IBSStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via ); | 50 | void IBSStraffic( const OMacAddress& from, const OMacAddress& to, const OMacAddress& via ); |
51 | 51 | ||
52 | void identify( const OMacAddress&, const QString& ipaddr ); | 52 | void identify( const OMacAddress&, const QString& ipaddr ); |
53 | 53 | ||
54 | void contextMenuRequested( QListViewItem* item, const QPoint&, int ); | 54 | void contextMenuRequested( QListViewItem* item, const QPoint&, int ); |
55 | 55 | ||
56 | signals: | 56 | signals: |
57 | void rightButtonClicked(QListViewItem*,const QPoint&,int); | 57 | void rightButtonClicked(QListViewItem*,const QPoint&,int); |
58 | void joinNetwork( const QString&, const QString&, int, const QString& ); | 58 | void joinNetwork( const QString&, const QString&, int, const QString& ); |
59 | 59 | ||
60 | protected: | 60 | protected: |
61 | void addIfNotExisting( MScanListItem* parent, const OMacAddress& addr, const QString& type = "station" ); | 61 | void addIfNotExisting( MScanListItem* parent, const OMacAddress& addr, const QString& type = "station" ); |
62 | 62 | ||
63 | }; | 63 | }; |
64 | 64 | ||
65 | //****************************** MScanListItem **************************************************************** | 65 | //****************************** MScanListItem **************************************************************** |
66 | 66 | ||
67 | class MScanListItem: public OListViewItem | 67 | class MScanListItem: public OListViewItem |
68 | { | 68 | { |
69 | public: | 69 | public: |
70 | MScanListItem::MScanListItem( QListView* parent, | 70 | MScanListItem::MScanListItem( QListView* parent, |
71 | const QString& type = "unknown", | 71 | const QString& type = "unknown", |
72 | const QString& essid = "unknown", | 72 | const QString& essid = "unknown", |
73 | const QString& macaddr = "unknown", | 73 | const QString& macaddr = "unknown", |
74 | bool wep = false, | 74 | bool wep = false, |
75 | int channel = 0, | 75 | int channel = 0, |
76 | int signal = 0 ); | 76 | int signal = 0, |
77 | bool probed = false ); | ||
77 | 78 | ||
78 | MScanListItem::MScanListItem( QListViewItem* parent, | 79 | MScanListItem::MScanListItem( QListViewItem* parent, |
79 | const QString& type = "unknown", | 80 | const QString& type = "unknown", |
80 | const QString& essid = "unknown", | 81 | const QString& essid = "unknown", |
81 | const QString& macaddr = "unknown", | 82 | const QString& macaddr = "unknown", |
82 | bool wep = false, | 83 | bool wep = false, |
83 | int channel = 0, | 84 | int channel = 0, |
84 | int signal = 0 ); | 85 | int signal = 0 ); |
85 | 86 | ||
86 | 87 | ||
87 | protected: | 88 | protected: |
88 | virtual void decorateItem( QString type, QString essid, QString macaddr, bool wep, int channel, int signal ); | 89 | virtual void decorateItem( QString type, QString essid, QString macaddr, bool wep, int channel, int signal, bool probed ); |
89 | 90 | ||
90 | public: | 91 | public: |
91 | QString type; | 92 | QString type; |
92 | 93 | ||
93 | public: | 94 | public: |
94 | //const QString& type() { return _type; }; | 95 | //const QString& type() { return _type; }; |
95 | const QString& essid() const; | 96 | const QString& essid() const; |
96 | const QString& macaddr() { return _macaddr; }; | 97 | const QString& macaddr() { return _macaddr; }; |
97 | bool wep() { return _wep; }; | 98 | bool wep() { return _wep; }; |
98 | int channel() { return _channel; }; | 99 | int channel() { return _channel; }; |
99 | int signal() { return _signal; }; | 100 | int signal() { return _signal; }; |
100 | int beacons() { return _beacons; }; | 101 | int beacons() { return _beacons; }; |
101 | 102 | ||
102 | void setSignal( int signal ) { /* TODO */ }; | 103 | void setSignal( int signal ) { /* TODO */ }; |
103 | void receivedBeacon(); | 104 | void receivedBeacon(); |
104 | 105 | ||
105 | void setManufacturer( const QString& manufacturer ); | 106 | void setManufacturer( const QString& manufacturer ); |
106 | void setLocation( const QString& location ); | 107 | void setLocation( const QString& location ); |
107 | 108 | ||
108 | virtual OListViewItem* childFactory(); | 109 | virtual OListViewItem* childFactory(); |
109 | virtual void serializeTo( QDataStream& s ) const; | 110 | virtual void serializeTo( QDataStream& s ) const; |
110 | virtual void serializeFrom( QDataStream& s ); | 111 | virtual void serializeFrom( QDataStream& s ); |
111 | 112 | ||
112 | private: | 113 | private: |