summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/blue-pin
authorar <ar>2004-02-21 15:27:41 (UTC)
committer ar <ar>2004-02-21 15:27:41 (UTC)
commit460258f203be746ff79e14f32a823f381b8ea513 (patch) (unidiff)
tree87dddbacda3050027d343730cf021b53045e80cb /noncore/net/opietooth/blue-pin
parent76b70b355d2c1c32c0f74e844e0654e39db2a175 (diff)
downloadopie-460258f203be746ff79e14f32a823f381b8ea513.zip
opie-460258f203be746ff79e14f32a823f381b8ea513.tar.gz
opie-460258f203be746ff79e14f32a823f381b8ea513.tar.bz2
improve support for BigScreen
Diffstat (limited to 'noncore/net/opietooth/blue-pin') (more/less context) (show whitespace changes)
-rw-r--r--noncore/net/opietooth/blue-pin/pindlg.cc39
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,14 +1,18 @@
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>
6#include <qlineedit.h> 11#include <qlineedit.h>
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
13using namespace OpieTooth; 17using namespace OpieTooth;
14 18
@@ -20,32 +24,39 @@ PinDlg::PinDlg( const QString& status,
20 m_mac = mac; 24 m_mac = mac;
21 test( mac ); 25 test( mac );
22 txtStatus->setText(status); 26 txtStatus->setText(status);
23 showMaximized(); 27 QPEApplication::showDialog( this );
24} 28}
25PinDlg::~PinDlg() {
26 29
27} 30PinDlg::~PinDlg()
28void PinDlg::setMac( const QString& mac ) { 31{}
32void PinDlg::setMac( const QString& mac )
33{
29 txtStatus->setText( mac ); 34 txtStatus->setText( mac );
30} 35}
31QString PinDlg::pin() const{ 36QString PinDlg::pin() const
37{
32 return lnePin->text(); 38 return lnePin->text();
33} 39}
34 40
35void PinDlg::test( const QString& mac ) { 41void 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 }
43 52
44 } 53 }
45 54
46} 55}
47void PinDlg::accept() { 56void 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 );
51 cfg.writeEntryCrypt("pin", lnePin->text() ); 62 cfg.writeEntryCrypt("pin", lnePin->text() );