btsingledeviceselector.h 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. /**********************************************************************
  2. ** Copyright (C) 2009 Nokia Corporation.
  3. ** All rights reserved.
  4. **
  5. ** $LICENSE_TEXT$
  6. **********************************************************************/
  7. #ifndef BTSINGLEDEVICESELECTOR_H
  8. #define BTSINGLEDEVICESELECTOR_H
  9. #include <QObject>
  10. class QDBusInterface;
  11. class QDBusMessage;
  12. /**
  13. * @brief The BtSingleDeviceSelector class encapsulates the algorithm necessary to show a bluetooth
  14. * connection dialog on maemo.
  15. */
  16. class BtSingleDeviceSelector : public QObject
  17. {
  18. Q_OBJECT
  19. public:
  20. /**
  21. * Constructs a BtSingleDeviceSelector object with the given parent.
  22. *
  23. * @param parent Parent.
  24. */
  25. explicit BtSingleDeviceSelector(QObject *parent = 0);
  26. public slots:
  27. /**
  28. * Shows the maemo bluetooth device selection dialog.
  29. */
  30. void show();
  31. private slots:
  32. /**
  33. * Called by DBus as a result of bluetooth device selection dialog.
  34. *
  35. * @param message DBus return message.
  36. */
  37. void searchResult(const QDBusMessage& message);
  38. signals:
  39. /**
  40. * Signal emitted after device has been selected.
  41. *
  42. * @param deviceAddress Bluetooth device MAC address.
  43. */
  44. void deviceSelected(QString deviceAddress);
  45. };
  46. #endif // BTSINGLEDEVICESELECTOR_H