author | harlekin <harlekin> | 2003-03-26 22:30:46 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2003-03-26 22:30:46 (UTC) |
commit | a57325de7183c21df6b5ff06eff8cf7e3c328ef4 (patch) (unidiff) | |
tree | 8724c094150cf0e977c54afa5c41a7e8da964e55 /noncore/net/opietooth/manager/dunpopup.cpp | |
parent | c6e22820a2c28eb8a8f6bab690a36c3fa2605387 (diff) | |
download | opie-a57325de7183c21df6b5ff06eff8cf7e3c328ef4.zip opie-a57325de7183c21df6b5ff06eff8cf7e3c328ef4.tar.gz opie-a57325de7183c21df6b5ff06eff8cf7e3c328ef4.tar.bz2 |
ups
Diffstat (limited to 'noncore/net/opietooth/manager/dunpopup.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opietooth/manager/dunpopup.cpp | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/noncore/net/opietooth/manager/dunpopup.cpp b/noncore/net/opietooth/manager/dunpopup.cpp new file mode 100644 index 0000000..3043f71 --- a/dev/null +++ b/noncore/net/opietooth/manager/dunpopup.cpp | |||
@@ -0,0 +1,63 @@ | |||
1 | #include <qpe/qcopenvelope_qws.h> | ||
2 | |||
3 | #include <qtimer.h> | ||
4 | |||
5 | #include "dunpopup.h" | ||
6 | |||
7 | using namespace OpieTooth; | ||
8 | |||
9 | /* | ||
10 | * c'tor init the QAction | ||
11 | */ | ||
12 | DunPopup::DunPopup( OpieTooth::BTDeviceItem* item ) : QPopupMenu() { | ||
13 | |||
14 | qWarning("DunPopup c'tor"); | ||
15 | |||
16 | m_item = item; | ||
17 | QAction *a, *b, *c; | ||
18 | |||
19 | m_dunconnection = 0l; | ||
20 | /* connect action */ | ||
21 | |||
22 | |||
23 | a = new QAction(); // so it's get deleted | ||
24 | a->setText( tr("connect") ); | ||
25 | a->addTo( this ); | ||
26 | connect( a, SIGNAL( activated() ), this, SLOT( slotConnect() ) ); | ||
27 | |||
28 | |||
29 | b = new QAction(); | ||
30 | b->setText( tr( "connect+conf" ) ); | ||
31 | b->addTo( this ); | ||
32 | connect( b, SIGNAL( activated() ), this, SLOT( slotConnectAndConfig() ) ); | ||
33 | |||
34 | c = new QAction(); | ||
35 | c->setText( tr( "disconnect" ) ); | ||
36 | c->addTo( this ); | ||
37 | connect( c, SIGNAL( activated() ), this, SLOT( slotDisconnect() ) ); | ||
38 | |||
39 | }; | ||
40 | |||
41 | DunPopup::~DunPopup() { | ||
42 | |||
43 | } | ||
44 | |||
45 | void DunPopup::slotConnect() { | ||
46 | |||
47 | m_dunconnection = new StartDunConnection( m_item->mac() ); | ||
48 | m_dunconnection->start(); | ||
49 | } | ||
50 | |||
51 | void DunPopup::slotDisconnect() { | ||
52 | m_dunconnection->stop(); | ||
53 | } | ||
54 | |||
55 | |||
56 | void DunPopup::slotConnectAndConfig() { | ||
57 | slotConnect(); | ||
58 | |||
59 | // more intelligence here later like passing the device ( bnepX ) | ||
60 | QCopEnvelope e( "QPE/System", "execute(QString)" ); | ||
61 | e << QString( "networksettings" ); | ||
62 | |||
63 | } | ||