author | korovkin <korovkin> | 2006-03-19 14:49:25 (UTC) |
---|---|---|
committer | korovkin <korovkin> | 2006-03-19 14:49:25 (UTC) |
commit | 73c1b0c47a02696061466c706f4eafb85fe1aa3b (patch) (side-by-side diff) | |
tree | 2d5507ee138c0585fc6937e4566dd5fb05dbb849 /noncore/net/opietooth/manager/obexpopup.cpp | |
parent | d17df3ff1677779bfc23cfb08d27c83b03a3dfb4 (diff) | |
download | opie-73c1b0c47a02696061466c706f4eafb85fe1aa3b.zip opie-73c1b0c47a02696061466c706f4eafb85fe1aa3b.tar.gz opie-73c1b0c47a02696061466c706f4eafb85fe1aa3b.tar.bz2 |
OBEX popup processes MAC address and port number.
Diffstat (limited to 'noncore/net/opietooth/manager/obexpopup.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opietooth/manager/obexpopup.cpp | 34 |
1 files changed, 18 insertions, 16 deletions
diff --git a/noncore/net/opietooth/manager/obexpopup.cpp b/noncore/net/opietooth/manager/obexpopup.cpp index 010f7de..d1d1b4a 100644 --- a/noncore/net/opietooth/manager/obexpopup.cpp +++ b/noncore/net/opietooth/manager/obexpopup.cpp @@ -6,42 +6,44 @@ #include <qpe/qpeapplication.h> #include <opie2/odebug.h> using namespace Opie::Core; /* QT */ #include <qtimer.h> using namespace OpieTooth; /* * c'tor init the QAction */ -ObexPopup::ObexPopup() - : QPopupMenu() +ObexPopup::ObexPopup(const OpieTooth::Services& service, OpieTooth::BTDeviceItem* item) + : QPopupMenu(), m_service(service) { - owarn << "RfcCommPopup c'tor" << oendl; - - QAction* a; + owarn << "ObexPopup c'tor" << oendl; + m_item = item; /* connect action */ - a = new QAction( ); // so it's get deleted - a->setText("Push file"); - a->addTo( this ); - connect( a, SIGNAL( activated() ), - this, SLOT( slotPush() ) ); -}; + m_push = new QAction( ); // so it's get deleted + m_push->setText("Push file"); + m_push->addTo( this ); + connect(m_push, SIGNAL(activated()), SLOT(slotPush())); +} ObexPopup::~ObexPopup() -{} +{ + delete m_push; +} void ObexPopup::slotPush() { - - owarn << "push something" << oendl; - - ObexDialog obexDialog; + QString device = m_item->mac(); + int port = m_service.protocolDescriptorList().last().port(); + device += "@"; + device += QString::number(port); + owarn << "push something to " << device << oendl; + ObexDialog obexDialog(device); QPEApplication::execDialog( &obexDialog ); } |