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 @@ -2,130 +2,170 @@ <class>BluetoothBNEPGUI</class> <widget> <class>QWidget</class> <property stdset="1"> <name>name</name> <cstring>BluetoothBNEP_FRM</cstring> </property> <property stdset="1"> <name>geometry</name> <rect> <x>0</x> <y>0</y> - <width>283</width> - <height>199</height> + <width>278</width> + <height>339</height> </rect> </property> <property stdset="1"> <name>caption</name> <string>Bluetooth-bnep</string> </property> <property> <name>layoutMargin</name> </property> <property> <name>layoutSpacing</name> </property> <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> + <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> <widget> <class>QLayoutWidget</class> <property stdset="1"> <name>name</name> - <cstring>Layout5</cstring> + <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> - <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> </hbox> </widget> </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,18 +1,26 @@ +#include <qtopia/qcopenvelope_qws.h> + #include <GUIUtils.h> #include "bluetoothBNEPedit.h" BluetoothBNEPEdit::BluetoothBNEPEdit( QWidget * Parent ) : BluetoothBNEPGUI( Parent ){ } 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 @@ -1,13 +1,17 @@ #include "bluetoothBNEPdata.h" #include "bluetoothBNEPGUI.h" class BluetoothBNEPEdit : public BluetoothBNEPGUI { public : BluetoothBNEPEdit( QWidget * parent ); 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 @@ -39,35 +39,43 @@ ANetNodeInstance * BluetoothBNEPNetNode::createInstance( void ) { } const char ** BluetoothBNEPNetNode::needs( void ) { return BluetoothBNEPNeeds; } const char * BluetoothBNEPNetNode::provides( void ) { return "device"; } bool BluetoothBNEPNetNode::generateProperFilesFor( ANetNodeInstance * ) { - return 1; + return 0; } bool BluetoothBNEPNetNode::hasDataFor( const QString & S ) { return S == "interfaces"; } 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 ) { QString S; return S.sprintf( "bnep%ld", nr ); } void BluetoothBNEPNetNode::setSpecificAttribute( QString & A, QString & V ) { if( A == "interfacecount" ) { InstanceCount = V.toLong(); } |