summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2003-05-07 21:11:29 (UTC)
committer mickeyl <mickeyl>2003-05-07 21:11:29 (UTC)
commit8344bbd32ca4ebfef275746de29cb3109b013cb6 (patch) (side-by-side diff)
tree7edd595d9acda25f7e752a38903f6102cbb55986
parent9e1040d8d3646c03e09fb3c55695e2df7f19420b (diff)
downloadopie-8344bbd32ca4ebfef275746de29cb3109b013cb6.zip
opie-8344bbd32ca4ebfef275746de29cb3109b013cb6.tar.gz
opie-8344bbd32ca4ebfef275746de29cb3109b013cb6.tar.bz2
start with protocol event handling stuff
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
@@ -112,18 +112,40 @@ int WellenreiterConfigWindow::driverType() const
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 ) )
{
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
@@ -35,18 +35,19 @@ 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);
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
@@ -87,9 +87,25 @@ void ProtocolListView::addProtocol( const QString& name )
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
@@ -28,12 +28,15 @@ 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;