author | korovkin <korovkin> | 2006-03-19 14:49:25 (UTC) |
---|---|---|
committer | korovkin <korovkin> | 2006-03-19 14:49:25 (UTC) |
commit | 73c1b0c47a02696061466c706f4eafb85fe1aa3b (patch) (unidiff) | |
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 | |||
@@ -15,32 +15,34 @@ using namespace OpieTooth; | |||
15 | /* | 15 | /* |
16 | * c'tor init the QAction | 16 | * c'tor init the QAction |
17 | */ | 17 | */ |
18 | ObexPopup::ObexPopup() | 18 | ObexPopup::ObexPopup(const OpieTooth::Services& service, OpieTooth::BTDeviceItem* item) |
19 | : QPopupMenu() | 19 | : QPopupMenu(), m_service(service) |
20 | { | 20 | { |
21 | owarn << "RfcCommPopup c'tor" << oendl; | 21 | owarn << "ObexPopup c'tor" << oendl; |
22 | |||
23 | QAction* a; | ||
24 | 22 | ||
23 | m_item = item; | ||
25 | /* connect action */ | 24 | /* connect action */ |
26 | a = new QAction( ); // so it's get deleted | 25 | m_push = new QAction( ); // so it's get deleted |
27 | a->setText("Push file"); | 26 | m_push->setText("Push file"); |
28 | a->addTo( this ); | 27 | m_push->addTo( this ); |
29 | connect( a, SIGNAL( activated() ), | 28 | connect(m_push, SIGNAL(activated()), SLOT(slotPush())); |
30 | this, SLOT( slotPush() ) ); | 29 | } |
31 | }; | ||
32 | 30 | ||
33 | 31 | ||
34 | ObexPopup::~ObexPopup() | 32 | ObexPopup::~ObexPopup() |
35 | {} | 33 | { |
34 | delete m_push; | ||
35 | } | ||
36 | 36 | ||
37 | 37 | ||
38 | void ObexPopup::slotPush() | 38 | void ObexPopup::slotPush() |
39 | { | 39 | { |
40 | 40 | QString device = m_item->mac(); | |
41 | owarn << "push something" << oendl; | 41 | int port = m_service.protocolDescriptorList().last().port(); |
42 | 42 | device += "@"; | |
43 | ObexDialog obexDialog; | 43 | device += QString::number(port); |
44 | owarn << "push something to " << device << oendl; | ||
45 | ObexDialog obexDialog(device); | ||
44 | QPEApplication::execDialog( &obexDialog ); | 46 | QPEApplication::execDialog( &obexDialog ); |
45 | } | 47 | } |
46 | 48 | ||