summaryrefslogtreecommitdiff
Unidiff
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
@@ -116,5 +116,5 @@ int WellenreiterConfigWindow::hoppingInterval() const
116 116
117 117
118bool WellenreiterConfigWindow::usePrismHeader() 118bool WellenreiterConfigWindow::usePrismHeader() const
119{ 119{
120 return prismHeader->isOn(); 120 return prismHeader->isOn();
@@ -122,4 +122,26 @@ bool WellenreiterConfigWindow::usePrismHeader()
122 122
123 123
124bool WellenreiterConfigWindow::isChannelChecked( int channel ) const
125{
126 switch ( channel )
127 {
128 case 1: return channel1->isOn();
129 case 2: return channel2->isOn();
130 case 3: return channel3->isOn();
131 case 4: return channel4->isOn();
132 case 5: return channel5->isOn();
133 case 6: return channel6->isOn();
134 case 7: return channel7->isOn();
135 case 8: return channel8->isOn();
136 case 9: return channel9->isOn();
137 case 10: return channel10->isOn();
138 case 11: return channel11->isOn();
139 case 12: return channel12->isOn();
140 case 13: return channel13->isOn();
141 case 14: return channel14->isOn();
142 }
143}
144
145
124void WellenreiterConfigWindow::changedDeviceType(int t) 146void WellenreiterConfigWindow::changedDeviceType(int t)
125{ 147{
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
@@ -39,10 +39,11 @@ class WellenreiterConfigWindow : public WellenreiterConfigBase
39 WellenreiterConfigWindow( QWidget * parent = 0, const char * name = "WellenreiterConfigWindow", WFlags f = 0 ); 39 WellenreiterConfigWindow( QWidget * parent = 0, const char * name = "WellenreiterConfigWindow", WFlags f = 0 );
40 int driverType() const; 40 int driverType() const;
41 int hoppingInterval() const;
42 const QString soundOnNetwork() const { return "";/*netSound->currentText();*/ }; 41 const QString soundOnNetwork() const { return "";/*netSound->currentText();*/ };
43 const QString soundOnBeacon() const { return "";/*beaconSound->currentText();*/ }; 42 const QString soundOnBeacon() const { return "";/*beaconSound->currentText();*/ };
44 static WellenreiterConfigWindow* instance() { return _instance; }; 43 static WellenreiterConfigWindow* instance() { return _instance; };
45 44
46 bool usePrismHeader(); 45 int hoppingInterval() const;
46 bool usePrismHeader() const;
47 bool isChannelChecked( int ) const;
47 48
48 public slots: 49 public slots:
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
@@ -91,5 +91,21 @@ void ProtocolListView::addProtocol( const QString& name )
91 combo->insertItem( "LedOn" ); 91 combo->insertItem( "LedOn" );
92 combo->insertItem( "LedOff" ); 92 combo->insertItem( "LedOff" );
93 combo->insertItem( "LogMessage" );
94 combo->insertItem( "MessageBox" );
93 } 95 }
94} 96}
95 97
98
99bool ProtocolListView::isProtocolChecked( const QString& name )
100{
101 QCheckBox* box = (QCheckBox*) child( (const char*) name );
102 return ( box && box->isOn() );
103}
104
105
106QString ProtocolListView::protocolAction( const QString& name ) const
107{
108 //FIXME
109}
110
111
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
@@ -32,4 +32,7 @@ class ProtocolListView : public QScrollView
32 virtual ~ProtocolListView(); 32 virtual ~ProtocolListView();
33 33
34 bool isProtocolChecked( const QString& name );
35 QString protocolAction( const QString& name ) const;
36
34 protected: 37 protected:
35 virtual void addProtocol( const QString& name ); 38 virtual void addProtocol( const QString& name );