summaryrefslogtreecommitdiff
Side-by-side diff
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
@@ -3,93 +3,93 @@
**
** This file is part of Wellenreiter II.
**
** This file may be distributed and/or modified under the terms of the
** GNU General Public License version 2 as published by the Free Software
** Foundation and appearing in the file LICENSE.GPL included in the
** packaging of this file.
**
** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
**
**********************************************************************/
#ifndef GRAPHWINDOW_H
#define GRAPHWINDOW_H
#include <qwidget.h>
#include <qvbox.h>
class MFrequencySpectrum : public QWidget
{
public:
MFrequencySpectrum( int channels, QWidget* parent = 0, const char* name = "MFrequencySpectrum", WFlags f = 0 );
int value( int channel ) const { return _values[channel]; };
void setValue( int channel, int value )
{
if ( value > _values[channel] )
{
_values[channel] = value;
_dirty[channel] = true;
}
};
void decrease( int channel, int amount )
{
if ( _values[channel] >= amount )
{
_values[channel] -= amount;
_dirty[channel] = true;
}
};
protected:
virtual void paintEvent( QPaintEvent* );
virtual void mousePressEvent( QMouseEvent* );
void drawLine( QPainter* p, int x, int y, int width, const QColor& c );
void drawTopLine( QPainter* p, int x, int y, int width, const QColor& c );
void drawBottomLine( QPainter* p, int x, int y, int width, const QColor& c );
- void MFrequencySpectrum::drawBar( QPainter* p, int x, int y, int width, int height, int maxheight );
+ void drawBar( QPainter* p, int x, int y, int width, int height, int maxheight );
private:
int _channels;
int* _values;
bool* _dirty;
};
class Legende : public QFrame
{
public:
Legende( int channels, QWidget* parent = 0, const char* name = "Legende", WFlags f = 0 );
protected:
virtual void drawContents( QPainter* );
private:
int _channels;
};
class MGraphWindow : public QVBox
{
Q_OBJECT
public:
MGraphWindow( QWidget* parent = 0, const char* name = "MGraphWindow", WFlags f = 0 );
void traffic( int channel, int signal );
protected:
virtual void timerEvent( QTimerEvent* e );
protected slots:
virtual void testGraph();
protected:
MFrequencySpectrum* spectrum;
Legende* legende;
};
#endif
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
@@ -21,106 +21,106 @@
/* OPIE */
#include <opie2/olistview.h>
#include <opie2/onetutils.h>
/* QT */
#include <qtextstream.h>
class QString;
class MScanListItem;
class MScanListView: public Opie::Ui::OListView
{
Q_OBJECT
public:
MScanListView( QWidget* parent = 0, const char* name = 0 );
virtual ~MScanListView();
virtual Opie::Ui::OListViewItem* childFactory();
virtual void serializeTo( QDataStream& s ) const;
virtual void serializeFrom( QDataStream& s );
public slots:
void addNewItem( const QString& type, const QString&, const Opie::Net::OMacAddress&, bool, int, int, const GpsLocation&, bool = false );
void addService( const QString& name, const Opie::Net::OMacAddress& macaddr, const QString& ip );
void fromDStraffic( const Opie::Net::OMacAddress& from, const Opie::Net::OMacAddress& to, const Opie::Net::OMacAddress& via );
void toDStraffic( const Opie::Net::OMacAddress& from, const Opie::Net::OMacAddress& to, const Opie::Net::OMacAddress& via );
void WDStraffic( const Opie::Net::OMacAddress& from, const Opie::Net::OMacAddress& to, const Opie::Net::OMacAddress& viaFrom, const Opie::Net::OMacAddress& viaTo );
void IBSStraffic( const Opie::Net::OMacAddress& from, const Opie::Net::OMacAddress& to, const Opie::Net::OMacAddress& via );
void identify( const Opie::Net::OMacAddress&, const QString& ipaddr );
void contextMenuRequested( QListViewItem* item, const QPoint&, int );
signals:
void rightButtonClicked(QListViewItem*,const QPoint&,int);
protected:
void addIfNotExisting( MScanListItem* parent, const Opie::Net::OMacAddress& addr, const QString& type = "station" );
};
//****************************** MScanListItem ****************************************************************
class MScanListItem: public Opie::Ui::OListViewItem
{
public:
- MScanListItem::MScanListItem( QListView* parent,
+ MScanListItem( QListView* parent,
const QString& type = "unknown",
const QString& essid = "unknown",
const QString& macaddr = "unknown",
bool wep = false,
int channel = 0,
int signal = 0,
bool probed = false );
- MScanListItem::MScanListItem( QListViewItem* parent,
+ MScanListItem( QListViewItem* parent,
const QString& type = "unknown",
const QString& essid = "unknown",
const QString& macaddr = "unknown",
bool wep = false,
int channel = 0,
int signal = 0 );
protected:
virtual void decorateItem( QString type, QString essid, QString macaddr, bool wep, int channel, int signal, bool probed );
public:
QString type;
public:
//const QString& type() { return _type; };
const QString& essid() const;
const QString& macaddr() { return _macaddr; };
bool wep() { return _wep; };
int channel() { return _channel; };
int signal() { return _signal; };
int beacons() { return _beacons; };
void setSignal( int signal ) { /* TODO */ };
void receivedBeacon();
void setManufacturer( const QString& manufacturer );
void setLocation( const QString& location );
virtual Opie::Ui::OListViewItem* childFactory();
virtual void serializeTo( QDataStream& s ) const;
virtual void serializeFrom( QDataStream& s );
virtual QString key( int id, bool )const;
private:
QString _type;
QString _essid;
QString _macaddr;
bool _wep;
int _channel;
int _signal;
int _beacons;
};
//****************************** MScanListViewFactory ****************************************************************