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) (side-by-side diff)
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 @@
+
+#include <stdio.h>
+
+#include <qcheckbox.h>
+#include <qlabel.h>
+#include <qlineedit.h>
+#include <qtimer.h>
+
+#include <qpe/config.h>
+
+#include "pindlg.h"
+
+using namespace OpieTooth;
+
+PinDlg::PinDlg( const QString& status,
+ const QString& mac, QWidget* parent,
+ const char* name )
+ : PinDlgBase( parent, name, WType_Modal )
+{
+ m_mac = mac;
+ test( mac );
+ txtStatus->setText(status);
+}
+PinDlg::~PinDlg() {
+
+}
+void PinDlg::setMac( const QString& mac ) {
+ txtStatus->setText( mac );
+}
+QString PinDlg::pin() const{
+ return lnePin->text();
+}
+
+void PinDlg::test( const QString& mac ) {
+ if (!mac.isEmpty() ) {
+ Config cfg("bluepin");
+ cfg.setGroup(mac);
+ lnePin->setText(cfg.readEntryCrypt("pin", QString::null ) );
+ if ( !lnePin->text().isEmpty() ) {
+ //QTimer::singleShot(100, this, SLOT(accept() ) );
+ }
+
+ }
+
+}
+void PinDlg::accept() {
+ if ( ckbPin->isChecked() ) {
+ Config cfg("bluepin");
+ cfg.setGroup(m_mac );
+ cfg.writeEntryCrypt("pin", lnePin->text() );
+ }
+ QDialog::accept();
+}