blob: 759a45207dae604b496a5be13f14a7198c6fa3de (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
#include "obexdialog.h"
#include "obexpopup.h"
/* OPIE */
#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(const OpieTooth::Services& service, OpieTooth::BTDeviceItem* item)
: QPopupMenu(), m_service(service)
{
odebug << "ObexPopup c'tor" << oendl;
m_item = item;
/* connect action */
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()
{
QString device = m_item->mac();
int port = m_service.protocolDescriptorList().last().port();
odebug << "push something to " << device << " " << port << oendl;
ObexDialog obexDialog(device, port);
QPEApplication::execDialog( &obexDialog );
}
|