Diffstat (limited to 'noncore/net/opietooth/manager/bluebase.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opietooth/manager/bluebase.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/noncore/net/opietooth/manager/bluebase.cpp b/noncore/net/opietooth/manager/bluebase.cpp index 772dbd1..77eb62b 100644 --- a/noncore/net/opietooth/manager/bluebase.cpp +++ b/noncore/net/opietooth/manager/bluebase.cpp | |||
@@ -52,26 +52,27 @@ namespace OpieTooth { | |||
52 | localDevice = new Manager( "hci0" ); | 52 | localDevice = new Manager( "hci0" ); |
53 | 53 | ||
54 | connect( PushButton2, SIGNAL( clicked() ), this, SLOT(startScan() ) ); | 54 | connect( PushButton2, SIGNAL( clicked() ), this, SLOT(startScan() ) ); |
55 | connect( configApplyButton, SIGNAL(clicked() ), this, SLOT(applyConfigChanges() ) ); | 55 | connect( configApplyButton, SIGNAL(clicked() ), this, SLOT(applyConfigChanges() ) ); |
56 | // not good since lib is async | 56 | // not good since lib is async |
57 | // connect( ListView2, SIGNAL( expanded ( QListViewItem* ) ), | 57 | // connect( ListView2, SIGNAL( expanded ( QListViewItem* ) ), |
58 | // this, SLOT( addServicesToDevice( QListViewItem * ) ) ); | 58 | // this, SLOT( addServicesToDevice( QListViewItem * ) ) ); |
59 | connect( ListView2, SIGNAL( clicked( QListViewItem* )), | 59 | connect( ListView2, SIGNAL( clicked( QListViewItem* )), |
60 | this, SLOT( startServiceActionClicked( QListViewItem* ) ) ); | 60 | this, SLOT( startServiceActionClicked( QListViewItem* ) ) ); |
61 | connect( ListView2, SIGNAL( rightButtonClicked( QListViewItem *, const QPoint &, int ) ), | 61 | connect( ListView2, SIGNAL( rightButtonClicked( QListViewItem *, const QPoint &, int ) ), |
62 | this, SLOT(startServiceActionHold( QListViewItem *, const QPoint &, int) ) ); | 62 | this, SLOT(startServiceActionHold( QListViewItem *, const QPoint &, int) ) ); |
63 | connect( localDevice , SIGNAL( foundServices( const QString& , Services::ValueList ) ), | 63 | connect( localDevice , SIGNAL( foundServices( const QString& , Services::ValueList ) ), |
64 | this, SLOT( addServicesToDevice( const QString& , Services::ValueList ) ) ); | 64 | this, SLOT( addServicesToDevice( const QString& , Services::ValueList ) ) ); |
65 | 65 | // connect( localDevice, SIGNAL( available( const QString& device, bool connected ) ), | |
66 | // this, SLOT() ); | ||
66 | 67 | ||
67 | //Load all icons needed | 68 | //Load all icons needed |
68 | 69 | ||
69 | offPix = Resource::loadPixmap( "editdelete" ); | 70 | offPix = Resource::loadPixmap( "editdelete" ); |
70 | onPix = Resource::loadPixmap( "installed" ); | 71 | onPix = Resource::loadPixmap( "installed" ); |
71 | 72 | ||
72 | QPalette pal = this->palette(); | 73 | QPalette pal = this->palette(); |
73 | QColor col = pal.color( QPalette::Active, QColorGroup::Background ); | 74 | QColor col = pal.color( QPalette::Active, QColorGroup::Background ); |
74 | pal.setColor( QPalette::Active, QColorGroup::Button, col ); | 75 | pal.setColor( QPalette::Active, QColorGroup::Button, col ); |
75 | pal.setColor( QPalette::Inactive, QColorGroup::Button, col ); | 76 | pal.setColor( QPalette::Inactive, QColorGroup::Button, col ); |
76 | pal.setColor( QPalette::Normal, QColorGroup::Button, col ); | 77 | pal.setColor( QPalette::Normal, QColorGroup::Button, col ); |
77 | pal.setColor( QPalette::Disabled, QColorGroup::Button, col ); | 78 | pal.setColor( QPalette::Disabled, QColorGroup::Button, col ); |
@@ -391,24 +392,27 @@ namespace OpieTooth { | |||
391 | /** | 392 | /** |
392 | * Find out if a device can currently be reached | 393 | * Find out if a device can currently be reached |
393 | */ | 394 | */ |
394 | bool BlueBase::deviceActive( RemoteDevice *device ) { | 395 | bool BlueBase::deviceActive( RemoteDevice *device ) { |
395 | 396 | ||
396 | // search by mac | 397 | // search by mac |
397 | localDevice->isAvailable( device->mac() ); | 398 | localDevice->isAvailable( device->mac() ); |
398 | 399 | ||
399 | return true; | 400 | return true; |
400 | } | 401 | } |
401 | 402 | ||
402 | 403 | ||
404 | |||
405 | |||
406 | |||
403 | /** | 407 | /** |
404 | * Open the "scan for devices" dialog | 408 | * Open the "scan for devices" dialog |
405 | */ | 409 | */ |
406 | void BlueBase::startScan() { | 410 | void BlueBase::startScan() { |
407 | 411 | ||
408 | ScanDialog *scan = new ScanDialog( this, "", true); | 412 | ScanDialog *scan = new ScanDialog( this, "", true); |
409 | QObject::connect( scan, SIGNAL( selectedDevices( QList<RemoteDevice>& ) ), | 413 | QObject::connect( scan, SIGNAL( selectedDevices( QList<RemoteDevice>& ) ), |
410 | this, SLOT( addSearchedDevices( QList<RemoteDevice>& ) ) ); | 414 | this, SLOT( addSearchedDevices( QList<RemoteDevice>& ) ) ); |
411 | 415 | ||
412 | scan->showMaximized(); | 416 | scan->showMaximized(); |
413 | } | 417 | } |
414 | 418 | ||