From 1af1f1d9f398d38a2bc666cd2edff5725da7a770 Mon Sep 17 00:00:00 2001 From: mickeyl Date: Wed, 29 Oct 2003 18:18:19 +0000 Subject: mrege noncore/net/* --- (limited to 'noncore/net/opietooth/manager/rfcpopup.cpp') 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(); + } } -- cgit v0.9.0.2