summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/blue-pin/pindlg.cc
authorzecke <zecke>2002-06-18 16:41:18 (UTC)
committer zecke <zecke>2002-06-18 16:41:18 (UTC)
commit46543a909fc88017998ede20ed25cd85992938e4 (patch) (unidiff)
tree1afafb1b96dadd2d9d320ae81820578245f74f98 /noncore/net/opietooth/blue-pin/pindlg.cc
parenteacd774d0bf520d17dac5eea092197174b43c9f9 (diff)
downloadopie-46543a909fc88017998ede20ed25cd85992938e4.zip
opie-46543a909fc88017998ede20ed25cd85992938e4.tar.gz
opie-46543a909fc88017998ede20ed25cd85992938e4.tar.bz2
add the inital version of blue-pin for Opie
Diffstat (limited to 'noncore/net/opietooth/blue-pin/pindlg.cc') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/blue-pin/pindlg.cc53
1 files changed, 53 insertions, 0 deletions
diff --git a/noncore/net/opietooth/blue-pin/pindlg.cc b/noncore/net/opietooth/blue-pin/pindlg.cc
new file mode 100644
index 0000000..54f096e
--- a/dev/null
+++ b/noncore/net/opietooth/blue-pin/pindlg.cc
@@ -0,0 +1,53 @@
1
2#include <stdio.h>
3
4#include <qcheckbox.h>
5#include <qlabel.h>
6#include <qlineedit.h>
7#include <qtimer.h>
8
9#include <qpe/config.h>
10
11#include "pindlg.h"
12
13using namespace OpieTooth;
14
15PinDlg::PinDlg( const QString& status,
16 const QString& mac, QWidget* parent,
17 const char* name )
18 : PinDlgBase( parent, name, WType_Modal )
19{
20 m_mac = mac;
21 test( mac );
22 txtStatus->setText(status);
23}
24PinDlg::~PinDlg() {
25
26}
27void PinDlg::setMac( const QString& mac ) {
28 txtStatus->setText( mac );
29}
30QString PinDlg::pin() const{
31 return lnePin->text();
32}
33
34void PinDlg::test( const QString& mac ) {
35 if (!mac.isEmpty() ) {
36 Config cfg("bluepin");
37 cfg.setGroup(mac);
38 lnePin->setText(cfg.readEntryCrypt("pin", QString::null ) );
39 if ( !lnePin->text().isEmpty() ) {
40 //QTimer::singleShot(100, this, SLOT(accept() ) );
41 }
42
43 }
44
45}
46void PinDlg::accept() {
47 if ( ckbPin->isChecked() ) {
48 Config cfg("bluepin");
49 cfg.setGroup(m_mac );
50 cfg.writeEntryCrypt("pin", lnePin->text() );
51 }
52 QDialog::accept();
53}