Diffstat (limited to 'noncore/net/opietooth/manager/rfcpopup.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/opietooth/manager/rfcpopup.cpp | 21 |
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 @@ -4,4 +4,5 @@ #include "pppdialog.h" #include "rfcpopup.h" +#include "rfcommassigndialogimpl.h" using namespace OpieTooth; @@ -10,5 +11,5 @@ using namespace OpieTooth; * c'tor init the QAction */ -RfcCommPopup::RfcCommPopup() +RfcCommPopup::RfcCommPopup( OpieTooth::BTDeviceItem* item ) : QPopupMenu() { qWarning("RfcCommPopup c'tor"); @@ -16,4 +17,7 @@ RfcCommPopup::RfcCommPopup() QAction* a; + + m_item = item; + /* connect action */ a = new QAction( ); // so it's get deleted @@ -34,8 +38,8 @@ 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() ) ); @@ -75,6 +79,13 @@ 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(); + } } |