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) (ignore 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
@@ -1,23 +1,27 @@
#include <qtimer.h>
#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");
a->addTo( this );
connect( a, SIGNAL( activated() ),
this, SLOT( slotConnect() ) );
@@ -30,16 +34,16 @@ RfcCommPopup::RfcCommPopup()
connect( a, SIGNAL( activated() ) ,
this, SLOT( slotDisconnect() ) );
/* 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 */
a = new QAction( );
a->setText( "Bar" );
a->addTo( this );
@@ -71,14 +75,21 @@ void RfcCommPopup::slotConnect() {
void RfcCommPopup::slotDisconnect() {
qWarning("slot disconnected");
}
-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();
+ }
}
void RfcCommPopup::slotBar() {
qWarning("slotBar");
};