Diffstat (limited to 'noncore/net/opietooth/manager/rfcpopup.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/opietooth/manager/rfcpopup.cpp | 49 |
1 files changed, 28 insertions, 21 deletions
diff --git a/noncore/net/opietooth/manager/rfcpopup.cpp b/noncore/net/opietooth/manager/rfcpopup.cpp index d95f14b..04bfe48 100644 --- a/noncore/net/opietooth/manager/rfcpopup.cpp +++ b/noncore/net/opietooth/manager/rfcpopup.cpp | |||
@@ -1,17 +1,22 @@ | |||
1 | 1 | ||
2 | #include <qtimer.h> | ||
3 | |||
4 | #include "pppdialog.h" | 2 | #include "pppdialog.h" |
5 | #include "rfcpopup.h" | 3 | #include "rfcpopup.h" |
6 | #include "rfcommassigndialogimpl.h" | 4 | #include "rfcommassigndialogimpl.h" |
7 | 5 | ||
6 | /* OPIE */ | ||
7 | #include <qpe/qpeapplication.h> | ||
8 | |||
9 | /* QT */ | ||
10 | #include <qtimer.h> | ||
11 | |||
8 | using namespace OpieTooth; | 12 | using namespace OpieTooth; |
9 | 13 | ||
10 | /* | 14 | /* |
11 | * c'tor init the QAction | 15 | * c'tor init the QAction |
12 | */ | 16 | */ |
13 | RfcCommPopup::RfcCommPopup( OpieTooth::BTDeviceItem* item ) | 17 | RfcCommPopup::RfcCommPopup( OpieTooth::BTDeviceItem* item ) |
14 | : QPopupMenu() { | 18 | : QPopupMenu() |
19 | { | ||
15 | qWarning("RfcCommPopup c'tor"); | 20 | qWarning("RfcCommPopup c'tor"); |
16 | 21 | ||
17 | QAction* a; | 22 | QAction* a; |
@@ -32,7 +37,7 @@ RfcCommPopup::RfcCommPopup( OpieTooth::BTDeviceItem* item ) | |||
32 | a->setText("Disconnect"); | 37 | a->setText("Disconnect"); |
33 | a->addTo( this ); | 38 | a->addTo( this ); |
34 | connect( a, SIGNAL( activated() ) , | 39 | connect( a, SIGNAL( activated() ) , |
35 | this, SLOT( slotDisconnect() ) ); | 40 | this, SLOT( slotDisconnect() ) ); |
36 | 41 | ||
37 | 42 | ||
38 | /* foo action */ | 43 | /* foo action */ |
@@ -40,7 +45,7 @@ RfcCommPopup::RfcCommPopup( OpieTooth::BTDeviceItem* item ) | |||
40 | a->setText("Bind table"); | 45 | a->setText("Bind table"); |
41 | a->addTo( this ); | 46 | a->addTo( this ); |
42 | connect( a, SIGNAL( activated() ), | 47 | connect( a, SIGNAL( activated() ), |
43 | this, SLOT( slotBind() ) ); | 48 | this, SLOT( slotBind() ) ); |
44 | 49 | ||
45 | 50 | ||
46 | /* bar action */ | 51 | /* bar action */ |
@@ -48,49 +53,51 @@ RfcCommPopup::RfcCommPopup( OpieTooth::BTDeviceItem* item ) | |||
48 | a->setText( "Bar" ); | 53 | a->setText( "Bar" ); |
49 | a->addTo( this ); | 54 | a->addTo( this ); |
50 | connect( a, SIGNAL( activated() ), | 55 | connect( a, SIGNAL( activated() ), |
51 | this, SLOT( slotBar() ) ); | 56 | this, SLOT( slotBar() ) ); |
52 | 57 | ||
53 | }; | 58 | }; |
54 | 59 | ||
55 | 60 | ||
56 | RfcCommPopup::~RfcCommPopup() { | 61 | RfcCommPopup::~RfcCommPopup() |
57 | /* delete m_con; | 62 | { |
58 | delete m_dis; | 63 | /* delete m_con; |
59 | delete m_foo; | 64 | delete m_dis; |
60 | delete m_bar; */ | 65 | delete m_foo; |
66 | delete m_bar; */ | ||
61 | } | 67 | } |
62 | 68 | ||
63 | 69 | ||
64 | void RfcCommPopup::slotConnect() { | 70 | void RfcCommPopup::slotConnect() |
71 | { | ||
65 | 72 | ||
66 | qWarning("connect"); | 73 | qWarning("connect"); |
67 | 74 | ||
68 | |||
69 | |||
70 | PPPDialog pppDialog; | 75 | PPPDialog pppDialog; |
71 | pppDialog.showMaximized(); | 76 | QPEApplication::execDialog( &pppDialog ); |
72 | pppDialog.exec(); | ||
73 | } | 77 | } |
74 | 78 | ||
75 | 79 | ||
76 | void RfcCommPopup::slotDisconnect() { | 80 | void RfcCommPopup::slotDisconnect() |
81 | { | ||
77 | qWarning("slot disconnected"); | 82 | qWarning("slot disconnected"); |
78 | } | 83 | } |
79 | 84 | ||
80 | 85 | ||
81 | void RfcCommPopup::slotBind() { | 86 | void RfcCommPopup::slotBind() |
87 | { | ||
82 | RfcommAssignDialog rfcommAssign ( this, "RfcommAssignDialog", true, WStyle_ContextHelp ); | 88 | RfcommAssignDialog rfcommAssign ( this, "RfcommAssignDialog", true, WStyle_ContextHelp ); |
83 | 89 | ||
84 | rfcommAssign.showMaximized(); | ||
85 | rfcommAssign.newDevice( m_item->mac() ); | 90 | rfcommAssign.newDevice( m_item->mac() ); |
86 | 91 | ||
87 | if ( rfcommAssign.exec() == QDialog::Accepted ) { | 92 | if ( QPEApplication::execDialog( &rfcommAssign ) == QDialog::Accepted ) |
93 | { | ||
88 | rfcommAssign.saveConfig(); | 94 | rfcommAssign.saveConfig(); |
89 | } | 95 | } |
90 | } | 96 | } |
91 | 97 | ||
92 | 98 | ||
93 | void RfcCommPopup::slotBar() { | 99 | void RfcCommPopup::slotBar() |
100 | { | ||
94 | qWarning("slotBar"); | 101 | qWarning("slotBar"); |
95 | }; | 102 | }; |
96 | 103 | ||