Diffstat (limited to 'noncore/settings/networksettings2/bluetooth') (more/less context) (show whitespace changes)
4 files changed, 109 insertions, 49 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 @@ -12,6 +12,6 @@ <x>0</x> <y>0</y> - <width>283</width> - <height>199</height> + <width>278</width> + <height>339</height> </rect> </property> @@ -29,61 +29,74 @@ <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> + <name>text</name> + <string>Any available PAN device</string> </property> <property stdset="1"> - <name>spacing</name> - <number>6</number> + <name>checked</name> + <bool>true</bool> </property> + </widget> <widget> - <class>QLabel</class> + <class>QGroupBox</class> <property stdset="1"> <name>name</name> - <cstring>TextLabel4</cstring> + <cstring>GroupBox1</cstring> </property> <property stdset="1"> - <name>text</name> - <string>Name</string> + <name>enabled</name> + <bool>false</bool> </property> - </widget> - <widget> - <class>QLineEdit</class> <property stdset="1"> - <name>name</name> - <cstring>Name_LE</cstring> + <name>title</name> + <string>Select Card</string> </property> - </widget> - </hbox> - </widget> - <widget> - <class>QLabel</class> + <property> + <name>layoutMargin</name> + </property> + <vbox> <property stdset="1"> - <name>name</name> - <cstring>TextLabel3</cstring> + <name>margin</name> + <number>5</number> </property> <property stdset="1"> - <name>text</name> - <string>Description</string> + <name>spacing</name> + <number>6</number> </property> - </widget> <widget> - <class>QMultiLineEdit</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>Description_LE</cstring> + <cstring>BTPANServers_LV</cstring> + </property> + <property stdset="1"> + <name>allColumnsShowFocus</name> + <bool>true</bool> </property> </widget> @@ -92,5 +105,5 @@ <property stdset="1"> <name>name</name> - <cstring>Layout5</cstring> + <cstring>Layout2</cstring> </property> <hbox> @@ -103,24 +116,34 @@ <number>6</number> </property> - <widget> - <class>QCheckBox</class> - <property stdset="1"> + <spacer> + <property> <name>name</name> - <cstring>Automatic_CB</cstring> + <cstring>Spacer1</cstring> </property> <property stdset="1"> - <name>text</name> - <string>Start automatically</string> + <name>orientation</name> + <enum>Horizontal</enum> </property> - </widget> + <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>QCheckBox</class> + <class>QPushButton</class> <property stdset="1"> <name>name</name> - <cstring>Confirm_CB</cstring> + <cstring>BTManager_BUT</cstring> </property> <property stdset="1"> <name>text</name> - <string>Confirm before start</string> + <string>Rescan</string> </property> </widget> @@ -129,3 +152,20 @@ </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,2 +1,4 @@ +#include <qtopia/qcopenvelope_qws.h> + #include <GUIUtils.h> #include "bluetoothBNEPedit.h" @@ -11,8 +13,14 @@ QString BluetoothBNEPEdit::acceptable( void ) { } -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 @@ -11,3 +11,7 @@ public : 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 @@ -49,5 +49,5 @@ const char * BluetoothBNEPNetNode::provides( void ) { bool BluetoothBNEPNetNode::generateProperFilesFor( ANetNodeInstance * ) { - return 1; + return 0; } @@ -57,7 +57,15 @@ 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; } |