Diffstat (limited to 'noncore/net/opietooth/blue-pin/pindlg.cc') (more/less context) (show whitespace changes)
-rw-r--r-- | noncore/net/opietooth/blue-pin/pindlg.cc | 39 |
1 files changed, 25 insertions, 14 deletions
diff --git a/noncore/net/opietooth/blue-pin/pindlg.cc b/noncore/net/opietooth/blue-pin/pindlg.cc index 7d60d6c..9418a20 100644 --- a/noncore/net/opietooth/blue-pin/pindlg.cc +++ b/noncore/net/opietooth/blue-pin/pindlg.cc | |||
@@ -1,5 +1,10 @@ | |||
1 | 1 | ||
2 | #include <stdio.h> | 2 | #include "pindlg.h" |
3 | |||
4 | /* OPIE */ | ||
5 | #include <qpe/config.h> | ||
6 | #include <qpe/qpeapplication.h> | ||
3 | 7 | ||
8 | /* QT */ | ||
4 | #include <qcheckbox.h> | 9 | #include <qcheckbox.h> |
5 | #include <qlabel.h> | 10 | #include <qlabel.h> |
@@ -7,7 +12,6 @@ | |||
7 | #include <qtimer.h> | 12 | #include <qtimer.h> |
8 | 13 | ||
9 | #include <qpe/config.h> | 14 | /* STD */ |
10 | 15 | #include <stdio.h> | |
11 | #include "pindlg.h" | ||
12 | 16 | ||
13 | using namespace OpieTooth; | 17 | using namespace OpieTooth; |
@@ -21,22 +25,27 @@ PinDlg::PinDlg( const QString& status, | |||
21 | test( mac ); | 25 | test( mac ); |
22 | txtStatus->setText(status); | 26 | txtStatus->setText(status); |
23 | showMaximized(); | 27 | QPEApplication::showDialog( this ); |
24 | } | 28 | } |
25 | PinDlg::~PinDlg() { | ||
26 | 29 | ||
27 | } | 30 | PinDlg::~PinDlg() |
28 | void PinDlg::setMac( const QString& mac ) { | 31 | {} |
32 | void PinDlg::setMac( const QString& mac ) | ||
33 | { | ||
29 | txtStatus->setText( mac ); | 34 | txtStatus->setText( mac ); |
30 | } | 35 | } |
31 | QString PinDlg::pin() const{ | 36 | QString PinDlg::pin() const |
37 | { | ||
32 | return lnePin->text(); | 38 | return lnePin->text(); |
33 | } | 39 | } |
34 | 40 | ||
35 | void PinDlg::test( const QString& mac ) { | 41 | void PinDlg::test( const QString& mac ) |
36 | if (!mac.isEmpty() ) { | 42 | { |
43 | if (!mac.isEmpty() ) | ||
44 | { | ||
37 | Config cfg("bluepin"); | 45 | Config cfg("bluepin"); |
38 | cfg.setGroup(mac); | 46 | cfg.setGroup(mac); |
39 | lnePin->setText(cfg.readEntryCrypt("pin", QString::null ) ); | 47 | lnePin->setText(cfg.readEntryCrypt("pin", QString::null ) ); |
40 | if ( !lnePin->text().isEmpty() ) { | 48 | if ( !lnePin->text().isEmpty() ) |
49 | { | ||
41 | //QTimer::singleShot(100, this, SLOT(accept() ) ); | 50 | //QTimer::singleShot(100, this, SLOT(accept() ) ); |
42 | } | 51 | } |
@@ -45,6 +54,8 @@ void PinDlg::test( const QString& mac ) { | |||
45 | 54 | ||
46 | } | 55 | } |
47 | void PinDlg::accept() { | 56 | void PinDlg::accept() |
48 | if ( ckbPin->isChecked() ) { | 57 | { |
58 | if ( ckbPin->isChecked() ) | ||
59 | { | ||
49 | Config cfg("bluepin"); | 60 | Config cfg("bluepin"); |
50 | cfg.setGroup(m_mac ); | 61 | cfg.setGroup(m_mac ); |