blob: 195dbae8edbbbd5896484c02832e640651dc318f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
#include <qtopia/qcopenvelope_qws.h>
#include <qlistview.h>
#include <qcheckbox.h>
#include <GUIUtils.h>
#include "bluetoothBNEPedit.h"
BluetoothBNEPEdit::BluetoothBNEPEdit( QWidget * Parent ) : BluetoothBNEPGUI( Parent ){
}
QString BluetoothBNEPEdit::acceptable( void ) {
if( ( ! AnyPAN_CB->isChecked() ) &&
BTPANServers_LV->firstChild() == 0 ) {
return tr("<p>No bluetooth device addresses specified</p>");
}
return QString();
}
bool BluetoothBNEPEdit::commit( BluetoothBNEPData & Data ) {
QListViewItem * it = BTPANServers_LV->firstChild();
Data.BDAddress.clear();
while( it ) {
Data.BDAddress << it->text(0);
it = it->nextSibling();
}
return 0;
}
void BluetoothBNEPEdit::showData( BluetoothBNEPData & Data ) {
QListViewItem * lvit;
BTPANServers_LV->clear();
for ( QStringList::Iterator it = Data.BDAddress.begin();
it != Data.BDAddress.end();
++it ) {
lvit = new QListViewItem(BTPANServers_LV);
lvit->setText( 0, (*it) );
}
}
void BluetoothBNEPEdit::SLOT_StartBTMgr( void ) {
QCopEnvelope e( "QPE/System", "execute(QString)" );
e << QString( "bluetooth-manager" );
}
|