author | mickeyl <mickeyl> | 2003-10-29 18:18:19 (UTC) |
---|---|---|
committer | mickeyl <mickeyl> | 2003-10-29 18:18:19 (UTC) |
commit | 1af1f1d9f398d38a2bc666cd2edff5725da7a770 (patch) (unidiff) | |
tree | b3bb0d90cafc1e933b5b9297a7b2669ce3b184ea /noncore/net/opietooth/manager/rfcpopup.cpp | |
parent | 35615947e11575a61456c8483e7f6d67fe59d5ed (diff) | |
download | opie-1af1f1d9f398d38a2bc666cd2edff5725da7a770.zip opie-1af1f1d9f398d38a2bc666cd2edff5725da7a770.tar.gz opie-1af1f1d9f398d38a2bc666cd2edff5725da7a770.tar.bz2 |
mrege noncore/net/*
Diffstat (limited to 'noncore/net/opietooth/manager/rfcpopup.cpp') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/opietooth/manager/rfcpopup.cpp | 21 |
1 files changed, 16 insertions, 5 deletions
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 | |||
@@ -1,23 +1,27 @@ | |||
1 | 1 | ||
2 | #include <qtimer.h> | 2 | #include <qtimer.h> |
3 | 3 | ||
4 | #include "pppdialog.h" | 4 | #include "pppdialog.h" |
5 | #include "rfcpopup.h" | 5 | #include "rfcpopup.h" |
6 | #include "rfcommassigndialogimpl.h" | ||
6 | 7 | ||
7 | using namespace OpieTooth; | 8 | using namespace OpieTooth; |
8 | 9 | ||
9 | /* | 10 | /* |
10 | * c'tor init the QAction | 11 | * c'tor init the QAction |
11 | */ | 12 | */ |
12 | RfcCommPopup::RfcCommPopup() | 13 | RfcCommPopup::RfcCommPopup( OpieTooth::BTDeviceItem* item ) |
13 | : QPopupMenu() { | 14 | : QPopupMenu() { |
14 | qWarning("RfcCommPopup c'tor"); | 15 | qWarning("RfcCommPopup c'tor"); |
15 | 16 | ||
16 | QAction* a; | 17 | QAction* a; |
17 | 18 | ||
19 | |||
20 | m_item = item; | ||
21 | |||
18 | /* connect action */ | 22 | /* connect action */ |
19 | a = new QAction( ); // so it's get deleted | 23 | a = new QAction( ); // so it's get deleted |
20 | a->setText("Connect"); | 24 | a->setText("Connect"); |
21 | a->addTo( this ); | 25 | a->addTo( this ); |
22 | connect( a, SIGNAL( activated() ), | 26 | connect( a, SIGNAL( activated() ), |
23 | this, SLOT( slotConnect() ) ); | 27 | this, SLOT( slotConnect() ) ); |
@@ -30,16 +34,16 @@ RfcCommPopup::RfcCommPopup() | |||
30 | connect( a, SIGNAL( activated() ) , | 34 | connect( a, SIGNAL( activated() ) , |
31 | this, SLOT( slotDisconnect() ) ); | 35 | this, SLOT( slotDisconnect() ) ); |
32 | 36 | ||
33 | 37 | ||
34 | /* foo action */ | 38 | /* foo action */ |
35 | a = new QAction( ); | 39 | a = new QAction( ); |
36 | a->setText("Foo"); | 40 | a->setText("Bind table"); |
37 | a->addTo( this ); | 41 | a->addTo( this ); |
38 | connect( a, SIGNAL( activated() ), | 42 | connect( a, SIGNAL( activated() ), |
39 | this, SLOT( slotFoo() ) ); | 43 | this, SLOT( slotBind() ) ); |
40 | 44 | ||
41 | 45 | ||
42 | /* bar action */ | 46 | /* bar action */ |
43 | a = new QAction( ); | 47 | a = new QAction( ); |
44 | a->setText( "Bar" ); | 48 | a->setText( "Bar" ); |
45 | a->addTo( this ); | 49 | a->addTo( this ); |
@@ -71,14 +75,21 @@ void RfcCommPopup::slotConnect() { | |||
71 | 75 | ||
72 | void RfcCommPopup::slotDisconnect() { | 76 | void RfcCommPopup::slotDisconnect() { |
73 | qWarning("slot disconnected"); | 77 | qWarning("slot disconnected"); |
74 | } | 78 | } |
75 | 79 | ||
76 | 80 | ||
77 | void RfcCommPopup::slotFoo() { | 81 | void RfcCommPopup::slotBind() { |
78 | qWarning("slotFoo"); | 82 | RfcommAssignDialog rfcommAssign ( this, "RfcommAssignDialog", true, WStyle_ContextHelp ); |
83 | |||
84 | rfcommAssign.showMaximized(); | ||
85 | rfcommAssign.newDevice( m_item->mac() ); | ||
86 | |||
87 | if ( rfcommAssign.exec() == QDialog::Accepted ) { | ||
88 | rfcommAssign.saveConfig(); | ||
89 | } | ||
79 | } | 90 | } |
80 | 91 | ||
81 | 92 | ||
82 | void RfcCommPopup::slotBar() { | 93 | void RfcCommPopup::slotBar() { |
83 | qWarning("slotBar"); | 94 | qWarning("slotBar"); |
84 | }; | 95 | }; |