-rw-r--r-- | noncore/net/wellenreiter/gui/graphwindow.h | 2 | ||||
-rw-r--r-- | noncore/net/wellenreiter/gui/scanlist.h | 4 |
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 | |||
@@ -19,65 +19,65 @@ | |||
19 | #include <qwidget.h> | 19 | #include <qwidget.h> |
20 | #include <qvbox.h> | 20 | #include <qvbox.h> |
21 | 21 | ||
22 | class MFrequencySpectrum : public QWidget | 22 | class 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 | ||
60 | class Legende : public QFrame | 60 | class 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 | ||
73 | class MGraphWindow : public QVBox | 73 | class 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 | ||
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 | |||
@@ -37,74 +37,74 @@ class MScanListView: public Opie::Ui::OListView | |||
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 | ||
66 | class MScanListItem: public Opie::Ui::OListViewItem | 66 | class 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 ); |