summaryrefslogtreecommitdiff
Unidiff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/graphwindow.h2
-rw-r--r--noncore/net/wellenreiter/gui/scanlist.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/noncore/net/wellenreiter/gui/graphwindow.h b/noncore/net/wellenreiter/gui/graphwindow.h
index 392d85b..8b027ed 100644
--- a/noncore/net/wellenreiter/gui/graphwindow.h
+++ b/noncore/net/wellenreiter/gui/graphwindow.h
@@ -1,95 +1,95 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. 2** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved.
3** 3**
4** This file is part of Wellenreiter II. 4** This file is part of Wellenreiter II.
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 GRAPHWINDOW_H 16#ifndef GRAPHWINDOW_H
17#define GRAPHWINDOW_H 17#define GRAPHWINDOW_H
18 18
19#include <qwidget.h> 19#include <qwidget.h>
20#include <qvbox.h> 20#include <qvbox.h>
21 21
22class MFrequencySpectrum : public QWidget 22class MFrequencySpectrum : public QWidget
23{ 23{
24 public: 24 public:
25 MFrequencySpectrum( int channels, QWidget* parent = 0, const char* name = "MFrequencySpectrum", WFlags f = 0 ); 25 MFrequencySpectrum( int channels, QWidget* parent = 0, const char* name = "MFrequencySpectrum", WFlags f = 0 );
26 int value( int channel ) const { return _values[channel]; }; 26 int value( int channel ) const { return _values[channel]; };
27 void setValue( int channel, int value ) 27 void setValue( int channel, int value )
28 { 28 {
29 if ( value > _values[channel] ) 29 if ( value > _values[channel] )
30 { 30 {
31 _values[channel] = value; 31 _values[channel] = value;
32 _dirty[channel] = true; 32 _dirty[channel] = true;
33 } 33 }
34 }; 34 };
35 void decrease( int channel, int amount ) 35 void decrease( int channel, int amount )
36 { 36 {
37 if ( _values[channel] >= amount ) 37 if ( _values[channel] >= amount )
38 { 38 {
39 _values[channel] -= amount; 39 _values[channel] -= amount;
40 _dirty[channel] = true; 40 _dirty[channel] = true;
41 } 41 }
42 }; 42 };
43 43
44 protected: 44 protected:
45 virtual void paintEvent( QPaintEvent* ); 45 virtual void paintEvent( QPaintEvent* );
46 virtual void mousePressEvent( QMouseEvent* ); 46 virtual void mousePressEvent( QMouseEvent* );
47 47
48 void drawLine( QPainter* p, int x, int y, int width, const QColor& c ); 48 void drawLine( QPainter* p, int x, int y, int width, const QColor& c );
49 void drawTopLine( QPainter* p, int x, int y, int width, const QColor& c ); 49 void drawTopLine( QPainter* p, int x, int y, int width, const QColor& c );
50 void drawBottomLine( QPainter* p, int x, int y, int width, const QColor& c ); 50 void drawBottomLine( QPainter* p, int x, int y, int width, const QColor& c );
51 void MFrequencySpectrum::drawBar( QPainter* p, int x, int y, int width, int height, int maxheight ); 51 void drawBar( QPainter* p, int x, int y, int width, int height, int maxheight );
52 52
53 private: 53 private:
54 int _channels; 54 int _channels;
55 int* _values; 55 int* _values;
56 bool* _dirty; 56 bool* _dirty;
57}; 57};
58 58
59 59
60class Legende : public QFrame 60class Legende : public QFrame
61{ 61{
62 public: 62 public:
63 Legende( int channels, QWidget* parent = 0, const char* name = "Legende", WFlags f = 0 ); 63 Legende( int channels, QWidget* parent = 0, const char* name = "Legende", WFlags f = 0 );
64 64
65 protected: 65 protected:
66 virtual void drawContents( QPainter* ); 66 virtual void drawContents( QPainter* );
67 67
68 private: 68 private:
69 int _channels; 69 int _channels;
70}; 70};
71 71
72 72
73class MGraphWindow : public QVBox 73class MGraphWindow : public QVBox
74{ 74{
75 Q_OBJECT 75 Q_OBJECT
76 76
77 public: 77 public:
78 MGraphWindow( QWidget* parent = 0, const char* name = "MGraphWindow", WFlags f = 0 ); 78 MGraphWindow( QWidget* parent = 0, const char* name = "MGraphWindow", WFlags f = 0 );
79 void traffic( int channel, int signal ); 79 void traffic( int channel, int signal );
80 80
81 protected: 81 protected:
82 virtual void timerEvent( QTimerEvent* e ); 82 virtual void timerEvent( QTimerEvent* e );
83 83
84 protected slots: 84 protected slots:
85 virtual void testGraph(); 85 virtual void testGraph();
86 86
87 protected: 87 protected:
88 MFrequencySpectrum* spectrum; 88 MFrequencySpectrum* spectrum;
89 Legende* legende; 89 Legende* legende;
90 90
91}; 91};
92 92
93 93
94#endif 94#endif
95 95
diff --git a/noncore/net/wellenreiter/gui/scanlist.h b/noncore/net/wellenreiter/gui/scanlist.h
index eec51af..c7d4562 100644
--- a/noncore/net/wellenreiter/gui/scanlist.h
+++ b/noncore/net/wellenreiter/gui/scanlist.h
@@ -1,141 +1,141 @@
1/********************************************************************** 1/**********************************************************************
2** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved. 2** Copyright (C) 2002-2004 Michael 'Mickey' Lauer. All rights reserved.
3** 3**
4** This file is part of Wellenreiter II. 4** This file is part of Wellenreiter II.
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" 19#include "gps.h"
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
28class QString; 28class QString;
29class MScanListItem; 29class MScanListItem;
30 30
31class MScanListView: public Opie::Ui::OListView 31class MScanListView: public Opie::Ui::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 Opie::Ui::OListViewItem* childFactory(); 39 virtual Opie::Ui::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&, const Opie::Net::OMacAddress&, bool, int, int, const GpsLocation&, bool = false ); 44 void addNewItem( const QString& type, const QString&, const Opie::Net::OMacAddress&, bool, int, int, const GpsLocation&, bool = false );
45 void addService( const QString& name, const Opie::Net::OMacAddress& macaddr, const QString& ip ); 45 void addService( const QString& name, const Opie::Net::OMacAddress& macaddr, const QString& ip );
46 46
47 void fromDStraffic( const Opie::Net::OMacAddress& from, const Opie::Net::OMacAddress& to, const Opie::Net::OMacAddress& via ); 47 void fromDStraffic( const Opie::Net::OMacAddress& from, const Opie::Net::OMacAddress& to, const Opie::Net::OMacAddress& via );
48 void toDStraffic( const Opie::Net::OMacAddress& from, const Opie::Net::OMacAddress& to, const Opie::Net::OMacAddress& via ); 48 void toDStraffic( const Opie::Net::OMacAddress& from, const Opie::Net::OMacAddress& to, const Opie::Net::OMacAddress& via );
49 void WDStraffic( const Opie::Net::OMacAddress& from, const Opie::Net::OMacAddress& to, const Opie::Net::OMacAddress& viaFrom, const Opie::Net::OMacAddress& viaTo ); 49 void WDStraffic( const Opie::Net::OMacAddress& from, const Opie::Net::OMacAddress& to, const Opie::Net::OMacAddress& viaFrom, const Opie::Net::OMacAddress& viaTo );
50 void IBSStraffic( const Opie::Net::OMacAddress& from, const Opie::Net::OMacAddress& to, const Opie::Net::OMacAddress& via ); 50 void IBSStraffic( const Opie::Net::OMacAddress& from, const Opie::Net::OMacAddress& to, const Opie::Net::OMacAddress& via );
51 51
52 void identify( const Opie::Net::OMacAddress&, const QString& ipaddr ); 52 void identify( const Opie::Net::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 58
59 protected: 59 protected:
60 void addIfNotExisting( MScanListItem* parent, const Opie::Net::OMacAddress& addr, const QString& type = "station" ); 60 void addIfNotExisting( MScanListItem* parent, const Opie::Net::OMacAddress& addr, const QString& type = "station" );
61 61
62}; 62};
63 63
64//****************************** MScanListItem **************************************************************** 64//****************************** MScanListItem ****************************************************************
65 65
66class MScanListItem: public Opie::Ui::OListViewItem 66class MScanListItem: public Opie::Ui::OListViewItem
67{ 67{
68 public: 68 public:
69 MScanListItem::MScanListItem( QListView* parent, 69 MScanListItem( QListView* parent,
70 const QString& type = "unknown", 70 const QString& type = "unknown",
71 const QString& essid = "unknown", 71 const QString& essid = "unknown",
72 const QString& macaddr = "unknown", 72 const QString& macaddr = "unknown",
73 bool wep = false, 73 bool wep = false,
74 int channel = 0, 74 int channel = 0,
75 int signal = 0, 75 int signal = 0,
76 bool probed = false ); 76 bool probed = false );
77 77
78 MScanListItem::MScanListItem( QListViewItem* parent, 78 MScanListItem( QListViewItem* parent,
79 const QString& type = "unknown", 79 const QString& type = "unknown",
80 const QString& essid = "unknown", 80 const QString& essid = "unknown",
81 const QString& macaddr = "unknown", 81 const QString& macaddr = "unknown",
82 bool wep = false, 82 bool wep = false,
83 int channel = 0, 83 int channel = 0,
84 int signal = 0 ); 84 int signal = 0 );
85 85
86 86
87 protected: 87 protected:
88 virtual void decorateItem( QString type, QString essid, QString macaddr, bool wep, int channel, int signal, bool probed ); 88 virtual void decorateItem( QString type, QString essid, QString macaddr, bool wep, int channel, int signal, bool probed );
89 89
90 public: 90 public:
91 QString type; 91 QString type;
92 92
93 public: 93 public:
94 //const QString& type() { return _type; }; 94 //const QString& type() { return _type; };
95 const QString& essid() const; 95 const QString& essid() const;
96 const QString& macaddr() { return _macaddr; }; 96 const QString& macaddr() { return _macaddr; };
97 bool wep() { return _wep; }; 97 bool wep() { return _wep; };
98 int channel() { return _channel; }; 98 int channel() { return _channel; };
99 int signal() { return _signal; }; 99 int signal() { return _signal; };
100 int beacons() { return _beacons; }; 100 int beacons() { return _beacons; };
101 101
102 void setSignal( int signal ) { /* TODO */ }; 102 void setSignal( int signal ) { /* TODO */ };
103 void receivedBeacon(); 103 void receivedBeacon();
104 104
105 void setManufacturer( const QString& manufacturer ); 105 void setManufacturer( const QString& manufacturer );
106 void setLocation( const QString& location ); 106 void setLocation( const QString& location );
107 107
108 virtual Opie::Ui::OListViewItem* childFactory(); 108 virtual Opie::Ui::OListViewItem* childFactory();
109 virtual void serializeTo( QDataStream& s ) const; 109 virtual void serializeTo( QDataStream& s ) const;
110 virtual void serializeFrom( QDataStream& s ); 110 virtual void serializeFrom( QDataStream& s );
111 111
112 virtual QString key( int id, bool )const; 112 virtual QString key( int id, bool )const;
113 113
114 private: 114 private:
115 QString _type; 115 QString _type;
116 QString _essid; 116 QString _essid;
117 QString _macaddr; 117 QString _macaddr;
118 bool _wep; 118 bool _wep;
119 int _channel; 119 int _channel;
120 int _signal; 120 int _signal;
121 int _beacons; 121 int _beacons;
122 122
123}; 123};
124 124
125//****************************** MScanListViewFactory **************************************************************** 125//****************************** MScanListViewFactory ****************************************************************
126 126
127/* 127/*
128 128
129class MScanListViewFactory : public Opie::Ui::OListViewFactory 129class MScanListViewFactory : public Opie::Ui::OListViewFactory
130{ 130{
131public: 131public:
132 virtual QListView* listViewFactory(); 132 virtual QListView* listViewFactory();
133 virtual QListViewItem* listViewItemFactory( QListView* lv ); 133 virtual QListViewItem* listViewItemFactory( QListView* lv );
134 virtual QListViewItem* listViewItemFactory( QListViewItem* lvi ); 134 virtual QListViewItem* listViewItemFactory( QListViewItem* lvi );
135 virtual void setColumnText( int depth, QListViewItem* lvi, int column, const QString& text ); 135 virtual void setColumnText( int depth, QListViewItem* lvi, int column, const QString& text );
136 virtual void setCustomData( int depth, QListViewItem* lvi, const QString& text ); 136 virtual void setCustomData( int depth, QListViewItem* lvi, const QString& text );
137} 137}
138*/ 138*/
139 139
140#endif 140#endif
141 141