summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/blue-pin/pindlg.cc
Side-by-side diff
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.cc12
1 files changed, 11 insertions, 1 deletions
diff --git a/noncore/net/opietooth/blue-pin/pindlg.cc b/noncore/net/opietooth/blue-pin/pindlg.cc
index e40fe33..3db6095 100644
--- a/noncore/net/opietooth/blue-pin/pindlg.cc
+++ b/noncore/net/opietooth/blue-pin/pindlg.cc
@@ -1,47 +1,48 @@
#include "pindlg.h"
/* OPIE */
#include <qpe/config.h>
#include <qpe/qpeapplication.h>
/* QT */
#include <qcheckbox.h>
#include <qlabel.h>
#include <qlineedit.h>
+#include <qpushbutton.h>
/* STD */
#include <stdio.h>
using namespace OpieTooth;
PinDlg::PinDlg(QWidget* parent,
const char* name,
Qt::WFlags f )
: PinDlgBase( parent, name, f )
{
m_mac = makeMacFromArgs();
if(m_mac.isEmpty())
{
// can't obtain MAC
printf("ERR\n");
::exit(0);
}
else
{
test( m_mac );
txtStatus->setText(makeTextFromArgs());
- QPEApplication::showDialog( this , true) ;
+ QPEApplication::showDialog( this , false) ;
}
}
PinDlg::~PinDlg()
{}
void PinDlg::setMac( const QString& mac )
{
txtStatus->setText( mac );
}
QString PinDlg::pin() const
@@ -85,25 +86,34 @@ QString PinDlg::makeTextFromArgs()
else
return QString::null;
}
QString PinDlg::makeMacFromArgs()
{
if(qApp->argc() < 3)
return QString::null;
else
return qApp->argv()[2] ;
}
+void PinDlg::addnum()
+{
+ if( sender()->inherits( "QPushButton") ) {
+ const QPushButton* btn = static_cast<const QPushButton*> (sender());
+ lnePin->setText(lnePin->text() + btn->text());
+ }
+}
+
void PinDlg::accept()
{
if ( ckbPin->isChecked() )
{
Config cfg("bluepin");
cfg.setGroup(m_mac );
cfg.writeEntryCrypt("pin", lnePin->text() );
}
printf("PIN:%s\n", lnePin->text().latin1());
QDialog::accept();
qApp->quit();
::exit(0);
}
+