00001 #ifndef OPIESTUMBLER_H
00002 #define OPIESTUMBLER_H
00003
00004 #include <qmainwindow.h>
00005 #include <qlist.h>
00006
00007 #include "stumblerstation.h"
00008
00009 class QString;
00010 class QPopupMenu;
00011 class Stumbler;
00012 class QCopChannel;
00013 class QListView;
00014 class QListViewItem;
00015 class QFrame;
00016 class QLabel;
00017 class QProgressBar;
00018 class QVBoxLayout;
00019
00020 namespace Opie{
00021 namespace Net {
00022 class OMacAddress;
00023 class OStation;
00024 class OManufacturerDB;
00025 }
00026
00027 namespace Core {
00028 class OProcess;
00029 }
00030 }
00031
00032
00033 class OpieStumbler: public QMainWindow {
00034 Q_OBJECT
00035 public:
00036
00037 enum CurrentColumns { CURSSID, CURCHAN, CURSIGNAL, CURENC };
00038 enum HistoryColumns { HISSSID, HISCHAN, HISSIGNAL, HISENC, HISVENDOR };
00039 OpieStumbler(QWidget *parent = 0, const char *name = 0, WFlags f = 0);
00040 static QString appName() { return QString::fromLatin1("opiestumbler"); }
00041 static QString appCaption();
00042 void displayStations();
00043 QString manufacturer(const QString &mac, bool extended = false );
00044 protected slots:
00045 void slotConfigure();
00046 void slotStartScanning();
00047 void slotStopScanning();
00048 void slotUpdateStations();
00049 void slotMessageReceived( const QCString &, const QByteArray & );
00050 void slotCurrentMousePressed(int button, QListViewItem *item, const QPoint &point, int c);
00051 void slotHistoryMousePressed(int button, QListViewItem *item, const QPoint &point, int c);
00052 void slotShowDetails();
00053 void slotLoadManufacturers();
00054 void slotJoinNetwork();
00055 void slotAssociated();
00056 void slotCheckDHCP();
00057 void slotCleanSplash();
00058 protected:
00059 void loadConfig();
00060
00061 QListView *m_listCurrent;
00062 QListView *m_listHistory;
00063 QString m_interface;
00064 Stumbler *m_stumbler;
00065 QCopChannel *m_channel;
00066 QList <Opie::Net::OStation> *m_stationsCurrent;
00067 QList <StumblerStation> m_stationsHistory;
00068 QPopupMenu *m_popupCurrent;
00069 QPopupMenu *m_popupHistory;
00070 Opie::Net::OManufacturerDB *m_db;
00071 QString m_mac;
00072 QString m_ssid;
00073 Opie::Core::OProcess *m_proc;
00074 QFrame *m_splash;
00075 QVBoxLayout *m_splashBox;
00076 QLabel *m_infoLabel;
00077 QProgressBar *m_pbar;
00078
00079 };
00080
00081 #endif