INTRODUCTION Overview Download and Install Quick Start Documentation Publications NONFRAMEWORK CODE Driver Interfaces Drivers Libraries Utilities FRAMEWORK CODE Interfaces Components Libraries Utilities Full Software Listings DEVELOPER Tutorials Examples Dev Guide Dashboard PEOPLE Contributors Users Project Download Mailing lists
|
wifielement.h00001 /* 00002 * Orca-Robotics Project: Components for robotics 00003 * http://orca-robotics.sf.net/ 00004 * Copyright (c) 2004-2009 Alex Brooks, Alexei Makarenko, Tobias Kaupp, Ben Upcroft 00005 * 00006 * This copy of Orca is licensed to you under the terms described in 00007 * the LICENSE file included in this distribution. 00008 * 00009 */ 00010 00011 #ifndef ORCAGUI_WIFI_ELEMENT_H 00012 #define ORCAGUI_WIFI_ELEMENT_H 00013 00014 #include <QVector> 00015 #include <orca/wifi.h> 00016 #include <orcaqguielementutil/icestormguielement.h> 00017 00018 class QProgressBar; 00019 class QLCDNumber; 00020 class QLabel; 00021 class QSplitter; 00022 00023 namespace orcaqgui2d { 00024 00025 // Widget to display wifi data, number of interfaces is fixed 00026 // after the first data is received 00027 // Author: Tobias Kaupp 00028 class WifiWidget : public QWidget 00029 { 00030 public: 00031 WifiWidget( unsigned int numInterfaces, std::string proxyString ); 00032 ~WifiWidget() {}; 00033 void refresh( orca::WifiData &data ); 00034 00035 private: 00036 QVector<QProgressBar*> progressBars_; 00037 QVector<QLCDNumber*> lcdsSignal_; 00038 QVector<QLCDNumber*> lcdsMaxSignal_; 00039 QVector<QLCDNumber*> lcdsNoise_; 00040 QVector<QLCDNumber*> lcdsMaxNoise_; 00041 QVector<QLCDNumber*> lcdsLink_; 00042 QVector<QLCDNumber*> lcdsMaxLink_; 00043 QVector<QLCDNumber*> lcdsBitrate_; 00044 QVector<QLabel*> interfaceLabels_; 00045 QVector<QLabel*> accessPointLabels_; 00046 QVector<QLabel*> overallSigLabels_; 00047 00048 void setupDisplay(); 00049 unsigned int numInterfaces_; 00050 // QVector<int> signalThreshholds_; 00051 // QString getSignalLabel( int snr ); 00052 QString getSignalLabel( orca::DiscreteSignalLevel level ); 00053 00054 }; 00055 00057 00058 class WifiElement 00059 : public orcaqguielementutil::IceStormGuiElement<orca::WifiData, 00060 orca::WifiPrx, 00061 orca::WifiConsumer, 00062 orca::WifiConsumerPrx> 00063 { 00064 public: 00065 WifiElement( const hydroqguielementutil::GuiElementInfo &guiElementInfo, 00066 const orcaice::Context &context, 00067 int timeoutMs = 30000 ); 00068 ~WifiElement(); 00069 00070 virtual void update(); 00071 00072 private: 00073 WifiWidget *wifiWidget_; 00074 std::string proxyString_; 00075 }; 00076 00077 } 00078 00079 #endif |
Webmaster: Tobias Kaupp (tobasco at users.sourceforge.net)