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
@@ -3,18 +3,22 @@
#include "pppdialog.h"
#include "rfcpopup.h"
+#include "rfcommassigndialogimpl.h"
using namespace OpieTooth;
/*
* c'tor init the QAction
*/
-RfcCommPopup::RfcCommPopup()
+RfcCommPopup::RfcCommPopup( OpieTooth::BTDeviceItem* item )
: QPopupMenu() {
qWarning("RfcCommPopup c'tor");
QAction* a;
+
+ m_item = item;
+
/* connect action */
a = new QAction( ); // so it's get deleted
a->setText("Connect");
@@ -33,10 +37,10 @@ RfcCommPopup::RfcCommPopup()
/* foo action */
a = new QAction( );
- a->setText("Foo");
+ a->setText("Bind table");
a->addTo( this );
connect( a, SIGNAL( activated() ),
- this, SLOT( slotFoo() ) );
+ this, SLOT( slotBind() ) );
/* bar action */
@@ -74,8 +78,15 @@ 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();
+ }
}