summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/manager/rfcpopup.cpp
Side-by-side diff
Diffstat (limited to 'noncore/net/opietooth/manager/rfcpopup.cpp') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/opietooth/manager/rfcpopup.cpp21
1 files changed, 16 insertions, 5 deletions
diff --git a/noncore/net/opietooth/manager/rfcpopup.cpp b/noncore/net/opietooth/manager/rfcpopup.cpp
index cc87b6c..d95f14b 100644
--- a/noncore/net/opietooth/manager/rfcpopup.cpp
+++ b/noncore/net/opietooth/manager/rfcpopup.cpp
@@ -5,2 +5,3 @@
#include "rfcpopup.h"
+#include "rfcommassigndialogimpl.h"
@@ -11,3 +12,3 @@ using namespace OpieTooth;
*/
-RfcCommPopup::RfcCommPopup()
+RfcCommPopup::RfcCommPopup( OpieTooth::BTDeviceItem* item )
: QPopupMenu() {
@@ -17,2 +18,5 @@ RfcCommPopup::RfcCommPopup()
+
+ m_item = item;
+
/* connect action */
@@ -35,6 +39,6 @@ RfcCommPopup::RfcCommPopup()
a = new QAction( );
- a->setText("Foo");
+ a->setText("Bind table");
a->addTo( this );
connect( a, SIGNAL( activated() ),
- this, SLOT( slotFoo() ) );
+ this, SLOT( slotBind() ) );
@@ -76,4 +80,11 @@ void RfcCommPopup::slotDisconnect() {
-void RfcCommPopup::slotFoo() {
- qWarning("slotFoo");
+void RfcCommPopup::slotBind() {
+ RfcommAssignDialog rfcommAssign ( this, "RfcommAssignDialog", true, WStyle_ContextHelp );
+
+ rfcommAssign.showMaximized();
+ rfcommAssign.newDevice( m_item->mac() );
+
+ if ( rfcommAssign.exec() == QDialog::Accepted ) {
+ rfcommAssign.saveConfig();
+ }
}