summaryrefslogtreecommitdiff
path: root/noncore/net/opietooth/blue-pin/pindlg.cc
authormickeyl <mickeyl>2005-04-19 10:11:09 (UTC)
committer mickeyl <mickeyl>2005-04-19 10:11:09 (UTC)
commit9b8dd642c4b135070911c78bb5d31a7add7162ee (patch) (side-by-side diff)
tree1d0ac94b911609605403ef83ceda0f5052757e7a /noncore/net/opietooth/blue-pin/pindlg.cc
parent16202ec32c1647b113fd7c06bc652bff32e6d6d2 (diff)
downloadopie-9b8dd642c4b135070911c78bb5d31a7add7162ee.zip
opie-9b8dd642c4b135070911c78bb5d31a7add7162ee.tar.gz
opie-9b8dd642c4b135070911c78bb5d31a7add7162ee.tar.bz2
This patch courtesy Gints Polis:
* gives possibility to enter numerical PIN with dialog buttons for keybordless PDA. * dialog run in full screen mode.
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.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
@@ -6,12 +6,13 @@
#include <qpe/qpeapplication.h>
/* QT */
#include <qcheckbox.h>
#include <qlabel.h>
#include <qlineedit.h>
+#include <qpushbutton.h>
/* STD */
#include <stdio.h>
using namespace OpieTooth;
@@ -29,13 +30,13 @@ PinDlg::PinDlg(QWidget* parent,
::exit(0);
}
else
{
test( m_mac );
txtStatus->setText(makeTextFromArgs());
- QPEApplication::showDialog( this , true) ;
+ QPEApplication::showDialog( this , false) ;
}
}
PinDlg::~PinDlg()
{}
@@ -91,12 +92,20 @@ 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 );
@@ -104,6 +113,7 @@ void PinDlg::accept()
}
printf("PIN:%s\n", lnePin->text().latin1());
QDialog::accept();
qApp->quit();
::exit(0);
}
+