summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/wellenreiter/gui/configwindow.cpp24
-rw-r--r--noncore/net/wellenreiter/gui/configwindow.h5
-rw-r--r--noncore/net/wellenreiter/gui/protolistview.cpp16
-rw-r--r--noncore/net/wellenreiter/gui/protolistview.h3
4 files changed, 45 insertions, 3 deletions
diff --git a/noncore/net/wellenreiter/gui/configwindow.cpp b/noncore/net/wellenreiter/gui/configwindow.cpp
index 2305403..5bec7ed 100644
--- a/noncore/net/wellenreiter/gui/configwindow.cpp
+++ b/noncore/net/wellenreiter/gui/configwindow.cpp
@@ -102,38 +102,60 @@ int WellenreiterConfigWindow::driverType() const
{
return _devicetype[name];
}
else
{
return 0;
}
};
int WellenreiterConfigWindow::hoppingInterval() const
{
return hopInterval->cleanText().toInt();
}
-bool WellenreiterConfigWindow::usePrismHeader()
+bool WellenreiterConfigWindow::usePrismHeader() const
{
return prismHeader->isOn();
}
+bool WellenreiterConfigWindow::isChannelChecked( int channel ) const
+{
+ switch ( channel )
+ {
+ case 1: return channel1->isOn();
+ case 2: return channel2->isOn();
+ case 3: return channel3->isOn();
+ case 4: return channel4->isOn();
+ case 5: return channel5->isOn();
+ case 6: return channel6->isOn();
+ case 7: return channel7->isOn();
+ case 8: return channel8->isOn();
+ case 9: return channel9->isOn();
+ case 10: return channel10->isOn();
+ case 11: return channel11->isOn();
+ case 12: return channel12->isOn();
+ case 13: return channel13->isOn();
+ case 14: return channel14->isOn();
+ }
+}
+
+
void WellenreiterConfigWindow::changedDeviceType(int t)
{
if ( t != DEVTYPE_FILE ) return;
QString name = ( (WellenreiterMainWindow*) qApp->mainWidget() )->getFileName(false);
if ( !name.isEmpty() && QFile::exists( name ) )
{
interfaceName->insertItem( name );
interfaceName->setCurrentItem( interfaceName->count()-1 );
}
else
{
deviceType->setCurrentItem( _guess );
}
}
diff --git a/noncore/net/wellenreiter/gui/configwindow.h b/noncore/net/wellenreiter/gui/configwindow.h
index 057bed6..32dc840 100644
--- a/noncore/net/wellenreiter/gui/configwindow.h
+++ b/noncore/net/wellenreiter/gui/configwindow.h
@@ -25,37 +25,38 @@ const int DEVTYPE_SELECT = 0;
const int DEVTYPE_CISCO = 1;
const int DEVTYPE_WLAN_NG = 2;
const int DEVTYPE_HOSTAP = 3;
const int DEVTYPE_ORINOCO = 4;
const int DEVTYPE_MANUAL = 5;
const int DEVTYPE_FILE = 6;
class WellenreiterConfigWindow;
class WellenreiterConfigWindow : public WellenreiterConfigBase
{
Q_OBJECT
public:
WellenreiterConfigWindow( QWidget * parent = 0, const char * name = "WellenreiterConfigWindow", WFlags f = 0 );
int driverType() const;
- int hoppingInterval() const;
const QString soundOnNetwork() const { return "";/*netSound->currentText();*/ };
const QString soundOnBeacon() const { return "";/*beaconSound->currentText();*/ };
static WellenreiterConfigWindow* instance() { return _instance; };
- bool usePrismHeader();
+ int hoppingInterval() const;
+ bool usePrismHeader() const;
+ bool isChannelChecked( int ) const;
public slots:
void changedDeviceType(int);
void getCaptureFileNameClicked();
void channelAllClicked(int);
protected:
QMap<QString, int> _devicetype;
static WellenreiterConfigWindow* _instance;
int _guess;
};
#endif
diff --git a/noncore/net/wellenreiter/gui/protolistview.cpp b/noncore/net/wellenreiter/gui/protolistview.cpp
index 8b86072..05ff5e7 100644
--- a/noncore/net/wellenreiter/gui/protolistview.cpp
+++ b/noncore/net/wellenreiter/gui/protolistview.cpp
@@ -77,19 +77,35 @@ void ProtocolListView::addProtocol( const QString& name )
{
QHBox* hbox = new QHBox( vbox );
new QCheckBox( name, hbox, (const char*) name );
if ( actions )
{
QComboBox* combo = new QComboBox( hbox, (const char*) name );
#ifdef QWS
combo->setFixedWidth( 75 );
#endif
combo->insertItem( "Ignore" );
combo->insertItem( "TouchSound" );
combo->insertItem( "AlarmSound" );
combo->insertItem( "KeySound" );
combo->insertItem( "LedOn" );
combo->insertItem( "LedOff" );
+ combo->insertItem( "LogMessage" );
+ combo->insertItem( "MessageBox" );
}
}
+
+bool ProtocolListView::isProtocolChecked( const QString& name )
+{
+ QCheckBox* box = (QCheckBox*) child( (const char*) name );
+ return ( box && box->isOn() );
+}
+
+
+QString ProtocolListView::protocolAction( const QString& name ) const
+{
+ //FIXME
+}
+
+
diff --git a/noncore/net/wellenreiter/gui/protolistview.h b/noncore/net/wellenreiter/gui/protolistview.h
index 42aec7d..723e8cd 100644
--- a/noncore/net/wellenreiter/gui/protolistview.h
+++ b/noncore/net/wellenreiter/gui/protolistview.h
@@ -18,27 +18,30 @@
#include <qscrollview.h>
#include <qdict.h>
//#include <qcheckbox.h>
//#include <qcombobox.h>
class QCheckBox;
class QComboBox;
class QVBox;
class ProtocolListView : public QScrollView
{
public:
ProtocolListView( QWidget* parent = 0, const char* name = 0, WFlags f = 0 );
virtual ~ProtocolListView();
+ bool isProtocolChecked( const QString& name );
+ QString protocolAction( const QString& name ) const;
+
protected:
virtual void addProtocol( const QString& name );
private:
QVBox* vbox;
bool actions;
};
#endif // PROTOLISTVIEW_H