summaryrefslogtreecommitdiff
path: root/noncore/settings/networksettings2/bluetooth
authorwimpie <wimpie>2004-04-08 01:25:02 (UTC)
committer wimpie <wimpie>2004-04-08 01:25:02 (UTC)
commit2ab70064958916733daf1b5f095cef562b2e9163 (patch) (side-by-side diff)
tree445f054fee55b678dab07e10bd5571b4651586d8 /noncore/settings/networksettings2/bluetooth
parent93ead8f65765ec7af4c14efeb2758c1cf7bcbd89 (diff)
downloadopie-2ab70064958916733daf1b5f095cef562b2e9163.zip
opie-2ab70064958916733daf1b5f095cef562b2e9163.tar.gz
opie-2ab70064958916733daf1b5f095cef562b2e9163.tar.bz2
Link with libopiecore2
added linke to btmgr
Diffstat (limited to 'noncore/settings/networksettings2/bluetooth') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/settings/networksettings2/bluetooth/bluetoothBNEPGUI.ui162
-rw-r--r--noncore/settings/networksettings2/bluetooth/bluetoothBNEPedit.cpp12
-rw-r--r--noncore/settings/networksettings2/bluetooth/bluetoothBNEPedit.h4
-rw-r--r--noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp16
4 files changed, 127 insertions, 67 deletions
diff --git a/noncore/settings/networksettings2/bluetooth/bluetoothBNEPGUI.ui b/noncore/settings/networksettings2/bluetooth/bluetoothBNEPGUI.ui
index ddb5ddd..498f50b 100644
--- a/noncore/settings/networksettings2/bluetooth/bluetoothBNEPGUI.ui
+++ b/noncore/settings/networksettings2/bluetooth/bluetoothBNEPGUI.ui
@@ -11,8 +11,8 @@
<rect>
<x>0</x>
<y>0</y>
- <width>283</width>
- <height>199</height>
+ <width>278</width>
+ <height>339</height>
</rect>
</property>
<property stdset="1">
@@ -28,104 +28,144 @@
<vbox>
<property stdset="1">
<name>margin</name>
- <number>2</number>
+ <number>0</number>
</property>
<property stdset="1">
<name>spacing</name>
- <number>2</number>
+ <number>0</number>
</property>
<widget>
- <class>QLayoutWidget</class>
+ <class>QCheckBox</class>
<property stdset="1">
<name>name</name>
- <cstring>Layout4</cstring>
+ <cstring>AnyPAN_CB</cstring>
</property>
- <hbox>
- <property stdset="1">
- <name>margin</name>
- <number>0</number>
- </property>
- <property stdset="1">
- <name>spacing</name>
- <number>6</number>
- </property>
- <widget>
- <class>QLabel</class>
- <property stdset="1">
- <name>name</name>
- <cstring>TextLabel4</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Name</string>
- </property>
- </widget>
- <widget>
- <class>QLineEdit</class>
- <property stdset="1">
- <name>name</name>
- <cstring>Name_LE</cstring>
- </property>
- </widget>
- </hbox>
- </widget>
- <widget>
- <class>QLabel</class>
<property stdset="1">
- <name>name</name>
- <cstring>TextLabel3</cstring>
+ <name>text</name>
+ <string>Any available PAN device</string>
</property>
<property stdset="1">
- <name>text</name>
- <string>Description</string>
+ <name>checked</name>
+ <bool>true</bool>
</property>
</widget>
<widget>
- <class>QMultiLineEdit</class>
+ <class>QGroupBox</class>
<property stdset="1">
<name>name</name>
- <cstring>Description_LE</cstring>
+ <cstring>GroupBox1</cstring>
</property>
- </widget>
- <widget>
- <class>QLayoutWidget</class>
<property stdset="1">
- <name>name</name>
- <cstring>Layout5</cstring>
+ <name>enabled</name>
+ <bool>false</bool>
+ </property>
+ <property stdset="1">
+ <name>title</name>
+ <string>Select Card</string>
+ </property>
+ <property>
+ <name>layoutMargin</name>
</property>
- <hbox>
+ <vbox>
<property stdset="1">
<name>margin</name>
- <number>0</number>
+ <number>5</number>
</property>
<property stdset="1">
<name>spacing</name>
<number>6</number>
</property>
<widget>
- <class>QCheckBox</class>
+ <class>QListView</class>
+ <column>
+ <property>
+ <name>text</name>
+ <string>BDAddress</string>
+ </property>
+ <property>
+ <name>clickable</name>
+ <bool>true</bool>
+ </property>
+ <property>
+ <name>resizeable</name>
+ <bool>true</bool>
+ </property>
+ </column>
<property stdset="1">
<name>name</name>
- <cstring>Automatic_CB</cstring>
+ <cstring>BTPANServers_LV</cstring>
</property>
<property stdset="1">
- <name>text</name>
- <string>Start automatically</string>
+ <name>allColumnsShowFocus</name>
+ <bool>true</bool>
</property>
</widget>
<widget>
- <class>QCheckBox</class>
+ <class>QLayoutWidget</class>
<property stdset="1">
<name>name</name>
- <cstring>Confirm_CB</cstring>
- </property>
- <property stdset="1">
- <name>text</name>
- <string>Confirm before start</string>
+ <cstring>Layout2</cstring>
</property>
+ <hbox>
+ <property stdset="1">
+ <name>margin</name>
+ <number>0</number>
+ </property>
+ <property stdset="1">
+ <name>spacing</name>
+ <number>6</number>
+ </property>
+ <spacer>
+ <property>
+ <name>name</name>
+ <cstring>Spacer1</cstring>
+ </property>
+ <property stdset="1">
+ <name>orientation</name>
+ <enum>Horizontal</enum>
+ </property>
+ <property stdset="1">
+ <name>sizeType</name>
+ <enum>Expanding</enum>
+ </property>
+ <property>
+ <name>sizeHint</name>
+ <size>
+ <width>20</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ <widget>
+ <class>QPushButton</class>
+ <property stdset="1">
+ <name>name</name>
+ <cstring>BTManager_BUT</cstring>
+ </property>
+ <property stdset="1">
+ <name>text</name>
+ <string>Rescan</string>
+ </property>
+ </widget>
+ </hbox>
</widget>
- </hbox>
+ </vbox>
</widget>
</vbox>
</widget>
+<connections>
+ <connection>
+ <sender>BTManager_BUT</sender>
+ <signal>clicked()</signal>
+ <receiver>BluetoothBNEP_FRM</receiver>
+ <slot>SLOT_StartBTMgr()</slot>
+ </connection>
+ <connection>
+ <sender>AnyPAN_CB</sender>
+ <signal>toggled(bool)</signal>
+ <receiver>GroupBox1</receiver>
+ <slot>setDisabled(bool)</slot>
+ </connection>
+ <slot access="public">SLOT_StartBTMgr()</slot>
+</connections>
</UI>
diff --git a/noncore/settings/networksettings2/bluetooth/bluetoothBNEPedit.cpp b/noncore/settings/networksettings2/bluetooth/bluetoothBNEPedit.cpp
index a27f1a7..9a3156b 100644
--- a/noncore/settings/networksettings2/bluetooth/bluetoothBNEPedit.cpp
+++ b/noncore/settings/networksettings2/bluetooth/bluetoothBNEPedit.cpp
@@ -1,3 +1,5 @@
+#include <qtopia/qcopenvelope_qws.h>
+
#include <GUIUtils.h>
#include "bluetoothBNEPedit.h"
@@ -10,9 +12,15 @@ QString BluetoothBNEPEdit::acceptable( void ) {
return QString();
}
-bool BluetoothBNEPEdit::commit( BluetoothBNEPData & Data ) {
+bool BluetoothBNEPEdit::commit( BluetoothBNEPData & ) {
return 0;
}
-void BluetoothBNEPEdit::showData( BluetoothBNEPData & Data ) {
+void BluetoothBNEPEdit::showData( BluetoothBNEPData & ) {
+}
+
+void BluetoothBNEPEdit::SLOT_StartBTMgr( void ) {
+ QCopEnvelope e( "QPE/System", "execute(QString)" );
+ e << QString( "bluetooth-manager" );
+
}
diff --git a/noncore/settings/networksettings2/bluetooth/bluetoothBNEPedit.h b/noncore/settings/networksettings2/bluetooth/bluetoothBNEPedit.h
index d546f1e..82d23ad 100644
--- a/noncore/settings/networksettings2/bluetooth/bluetoothBNEPedit.h
+++ b/noncore/settings/networksettings2/bluetooth/bluetoothBNEPedit.h
@@ -10,4 +10,8 @@ public :
QString acceptable( void );
bool commit( BluetoothBNEPData & Data );
void showData( BluetoothBNEPData & Data );
+
+public slots :
+
+ void SLOT_StartBTMgr( void );
};
diff --git a/noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp b/noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp
index 1d0a0f7..b59b4f0 100644
--- a/noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp
+++ b/noncore/settings/networksettings2/bluetooth/bluetooth_NN.cpp
@@ -48,7 +48,7 @@ const char * BluetoothBNEPNetNode::provides( void ) {
bool BluetoothBNEPNetNode::generateProperFilesFor(
ANetNodeInstance * ) {
- return 1;
+ return 0;
}
bool BluetoothBNEPNetNode::hasDataFor( const QString & S ) {
@@ -56,9 +56,17 @@ bool BluetoothBNEPNetNode::hasDataFor( const QString & S ) {
}
bool BluetoothBNEPNetNode::generateDeviceDataForCommonFile(
- SystemFile & ,
- long ) {
- return 1;
+ SystemFile & S ,
+ long DevNr) {
+ QString NIC = genNic( DevNr );
+
+ if( S.name() == "interfaces" ) {
+ // generate mapping stanza for this interface
+ S << "# check if " << NIC << " can be brought UP" << endl;
+ S << "mapping " << NIC << endl;
+ S << " script networksettings2-request" << endl << endl;
+ }
+ return 0;
}
QString BluetoothBNEPNetNode::genNic( long nr ) {