summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-06-19 22:24:52 (UTC)
committer harlekin <harlekin>2002-06-19 22:24:52 (UTC)
commit3cff4da41a61679e0222be190af8a98682f07393 (patch) (unidiff)
tree6b791ffc929c1347826b949935d37e046e8a9930
parent6afbacb8353e539b9e6d279d20220445614b42c2 (diff)
downloadopie-3cff4da41a61679e0222be190af8a98682f07393.zip
opie-3cff4da41a61679e0222be190af8a98682f07393.tar.gz
opie-3cff4da41a61679e0222be190af8a98682f07393.tar.bz2
update
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/bluebase.cpp29
-rw-r--r--noncore/net/opietooth/manager/bluebase.h8
2 files changed, 20 insertions, 17 deletions
diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp
index c7e1fe4..6328b59 100644
--- a/noncore/net/opietooth/manager/bluebase.cpp
+++ b/noncore/net/opietooth/manager/bluebase.cpp
@@ -50,16 +50,15 @@ namespace OpieTooth {
50 50
51 localDevice = new Manager( "hci0" ); 51 localDevice = new Manager( "hci0" );
52 52
53 QObject::connect( PushButton2, SIGNAL( clicked() ), this, SLOT(startScan() ) ); 53 connect( PushButton2, SIGNAL( clicked() ), this, SLOT(startScan() ) );
54 QObject::connect( configApplyButton, SIGNAL(clicked() ), this, SLOT(applyConfigChanges() ) ); 54 connect( configApplyButton, SIGNAL(clicked() ), this, SLOT(applyConfigChanges() ) );
55 QObject::connect( ListView2, SIGNAL( expanded( QListViewItem * item ) ), 55 connect( ListView2, SIGNAL( expanded ( QListViewItem *item ) ),
56 this, SLOT( addServicesToDevice( QListViewItem * item ) ) ); 56 this, SLOT( addServicesToDevice( QListViewItem *item ) ) );
57 QObject::connect( ListView2, SIGNAL( clicked( QListViewItem * )), 57 connect( ListView2, SIGNAL( clicked( QListViewItem* )),
58 this, SLOT( startServiceActionClicked( QListViewItem * item ) ) ); 58 this, SLOT( startServiceActionClicked( QListViewItem *item ) ) );
59 connect( localDevice, SIGNAL( foundServices( const QString& device, Services::ValueList ) ), 59 connect( localDevice, SIGNAL( foundServices( const QString& device, Services::ValueList ) ),
60 this, SLOT( addServicesToDevice( const QString& device, Services::ValueList ) ) ); 60 this, SLOT( addServicesToDevice( const QString& device, Services::ValueList ) ) );
61 61
62 // QObject::connect( (QObject*) Manager, SIGNAL (foundServices( const QString& device, Services::ValueList ), this () ) );
63 62
64 //Load all icons needed 63 //Load all icons needed
65 64
@@ -87,8 +86,8 @@ namespace OpieTooth {
87 86
88 QListViewItem *topLV = new QListViewItem( ListView2, "Harlekins Dongle" , "yes"); 87 QListViewItem *topLV = new QListViewItem( ListView2, "Harlekins Dongle" , "yes");
89 topLV->setPixmap( 0, offPix ); 88 topLV->setPixmap( 0, offPix );
90 (void) new QListViewItem( topLV, "on" ); 89 // (void) new QListViewItem( topLV, "on" );
91 (void) new QListViewItem( topLV, "off" ); 90 //(void) new QListViewItem( topLV, "off" );
92 91
93 QListViewItem *topLV2 = new QListViewItem( ListView2, "Siemens S45" , "no" ); 92 QListViewItem *topLV2 = new QListViewItem( ListView2, "Siemens S45" , "no" );
94 topLV2->setPixmap( 0, onPix ); 93 topLV2->setPixmap( 0, onPix );
@@ -239,7 +238,7 @@ namespace OpieTooth {
239 238
240 239
241 RemoteDevice *dev = it.current(); 240 RemoteDevice *dev = it.current();
242 deviceItem = new QListViewItem( ListView2, dev->name() ); 241 deviceItem = new QListViewItem( ListView2 , dev->name() );
243 242
244 if ( deviceActive( dev ) ) { 243 if ( deviceActive( dev ) ) {
245 deviceItem->setPixmap( 1 , onPix ); 244 deviceItem->setPixmap( 1 , onPix );
@@ -248,6 +247,9 @@ namespace OpieTooth {
248 } 247 }
249 248
250 deviceItem->setText( 3, dev->mac() ); 249 deviceItem->setText( 3, dev->mac() );
250
251 // ggf auch hier?
252 addServicesToDevice( deviceItem );
251 } 253 }
252 } 254 }
253 255
@@ -274,6 +276,7 @@ namespace OpieTooth {
274 */ 276 */
275 void BlueBase::addServicesToDevice( QListViewItem * item ) { 277 void BlueBase::addServicesToDevice( QListViewItem * item ) {
276 278
279 qDebug("addServicesToDevice");
277 // row of mac adress 280 // row of mac adress
278 RemoteDevice *device = new RemoteDevice(item->text(3), item->text(0)); 281 RemoteDevice *device = new RemoteDevice(item->text(3), item->text(0));
279 282
@@ -313,8 +316,8 @@ namespace OpieTooth {
313 QListViewItem * serviceItem; 316 QListViewItem * serviceItem;
314 317
315 for( it2 = servicesList.begin(); it2 != servicesList.end(); ++it2 ) { 318 for( it2 = servicesList.begin(); it2 != servicesList.end(); ++it2 ) {
316 it2.serviceName() 319// it2.serviceName()
317 serviceItem = new QListViewItem( deviceItem , it2.serviceName() ); 320 serviceItem = new QListViewItem( deviceItem , (*it2).serviceName() );
318 } 321 }
319 322
320 } 323 }
diff --git a/noncore/net/opietooth/manager/bluebase.h b/noncore/net/opietooth/manager/bluebase.h
index dcb7681..d20d05c 100644
--- a/noncore/net/opietooth/manager/bluebase.h
+++ b/noncore/net/opietooth/manager/bluebase.h
@@ -65,12 +65,12 @@ namespace OpieTooth {
65 QPixmap offPix; 65 QPixmap offPix;
66 QPixmap onPix; 66 QPixmap onPix;
67 67
68 private slots: 68 public slots:
69 void addSearchedDevices( QList<RemoteDevice> &newDevices ); 69 void addSearchedDevices( QList<RemoteDevice> &newDevices );
70 void addServicesToDevice( QListViewItem * item ); 70 void addServicesToDevice( QListViewItem *item );
71 void addServicesToDevice( const QString& device, Services::ValueList ); 71 void addServicesToDevice( const QString& device, Services::ValueList );
72 void startServiceActionClicked( QListViewItem * item ); 72 void startServiceActionClicked( QListViewItem *item );
73 void startServiceActionHold( QListViewItem * item, const QPoint & point, int column); 73 void startServiceActionHold( QListViewItem *item, const QPoint &point, int column);
74 void applyConfigChanges(); 74 void applyConfigChanges();
75 75
76 }; 76 };