From 9b8dd642c4b135070911c78bb5d31a7add7162ee Mon Sep 17 00:00:00 2001 From: mickeyl Date: Tue, 19 Apr 2005 10:11:09 +0000 Subject: This patch courtesy Gints Polis: * gives possibility to enter numerical PIN with dialog buttons for keybordless PDA. * dialog run in full screen mode. --- 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 @@ -9,6 +9,7 @@ #include #include #include +#include /* STD */ #include @@ -32,7 +33,7 @@ PinDlg::PinDlg(QWidget* parent, { test( m_mac ); txtStatus->setText(makeTextFromArgs()); - QPEApplication::showDialog( this , true) ; + QPEApplication::showDialog( this , false) ; } } @@ -94,6 +95,14 @@ QString PinDlg::makeMacFromArgs() return qApp->argv()[2] ; } +void PinDlg::addnum() +{ + if( sender()->inherits( "QPushButton") ) { + const QPushButton* btn = static_cast (sender()); + lnePin->setText(lnePin->text() + btn->text()); + } +} + void PinDlg::accept() { if ( ckbPin->isChecked() ) @@ -107,3 +116,4 @@ void PinDlg::accept() qApp->quit(); ::exit(0); } + diff --git a/noncore/net/opietooth/blue-pin/pindlg.h b/noncore/net/opietooth/blue-pin/pindlg.h index 8623274..1817aa8 100644 --- a/noncore/net/opietooth/blue-pin/pindlg.h +++ b/noncore/net/opietooth/blue-pin/pindlg.h @@ -28,6 +28,7 @@ namespace OpieTooth { protected slots: void accept(); + void addnum(); }; }; diff --git a/noncore/net/opietooth/blue-pin/pindlgbase.ui b/noncore/net/opietooth/blue-pin/pindlgbase.ui index a79bb49..6586014 100644 --- a/noncore/net/opietooth/blue-pin/pindlgbase.ui +++ b/noncore/net/opietooth/blue-pin/pindlgbase.ui @@ -1,6 +1,6 @@ PinDlgBase -zecke +gints QDialog @@ -12,131 +12,359 @@ 0 0 - 267 - 161 + 196 + 175 + sizePolicy + + 3 + 3 + + + caption Please enter pin - + + sizeGripEnabled + false + + + layoutMargin + + + layoutSpacing + + margin - 11 + 5 spacing - 6 + 2 - - QLabel + + QLayoutWidget name - txtStatus + Layout9 + + + margin + 0 + + + spacing + 6 + + + QLabel + + name + txtStatus + + + font + + + + + text + Enter PIN: + + + + + name + Spacer1 + + + orientation + Horizontal + + + sizeType + Expanding + + + sizeHint + + 20 + 20 + + + + + + + QLayoutWidget - text - + name + Layout8 + + + margin + 0 + + + spacing + 6 + + + + name + Spacer2 + + + orientation + Horizontal + + + sizeType + Expanding + + + sizeHint + + 20 + 20 + + + + + QLineEdit + + name + lnePin + + + frame + true + + + + + name + Spacer3 + + + orientation + Horizontal + + + sizeType + Expanding + + + sizeHint + + 20 + 20 + + + + + QCheckBox + + name + ckbPin + + + text + Save + + + checked + true + + + + + + QLayoutWidget - textFormat - RichText + name + Layout22 + + + maximumSize + + 32767 + 35 + + + + layoutMargin + + layoutSpacing + + + + margin + 0 + + + spacing + 2 + + + QPushButton + + name + bt1 + + + maximumSize + + 60 + 25 + + + + text + 1 + + + + QPushButton + + name + bt2 + + + maximumSize + + 60 + 25 + + + + text + 2 + + + + QPushButton + + name + bt3 + + + maximumSize + + 60 + 25 + + + + text + 3 + + + - + QLayoutWidget name - Layout6 + Layout22_2 + + + maximumSize + + 32767 + 35 + + + + layoutSpacing - + margin 0 spacing - 6 + 2 - QLabel + QPushButton name - TextLabel3 + bt4 + + + maximumSize + + 60 + 25 + text - Please enter PIN: + 4 - QLayoutWidget - - name - Layout5 - - - - margin - 0 - - - spacing - 6 - - - QLineEdit - - name - lnePin - - - echoMode - Password - - - - - name - Spacer4 - - - orientation - Horizontal - - - sizeType - Fixed - - - sizeHint - - 21 - 20 - - - - + QPushButton + + name + bt5 + + + maximumSize + + 60 + 25 + + + + text + 5 + - QCheckBox + QPushButton name - ckbPin + bt6 + + + maximumSize + + 60 + 25 + text - Save pin + 6 - + - + QLayoutWidget name - Layout7 + Layout22_2_2 + + + maximumSize + + 32767 + 35 + + + + layoutSpacing @@ -145,29 +373,89 @@ spacing - 6 + 2 - - + + QPushButton + name - Spacer1 + bt7 - orientation - Horizontal + maximumSize + + 60 + 25 + - sizeType - Fixed + text + 7 - - sizeHint + + + QPushButton + + name + bt8 + + + maximumSize - 30 - 20 + 60 + 25 - + + text + 8 + + + + QPushButton + + name + bt9 + + + maximumSize + + 60 + 25 + + + + text + 9 + + + + + + QLayoutWidget + + name + Layout24 + + + maximumSize + + 32767 + 35 + + + + layoutSpacing + + + + margin + 0 + + + spacing + 2 + QPushButton @@ -175,6 +463,13 @@ PushButton1 + maximumSize + + 60 + 25 + + + text &Ok @@ -183,50 +478,144 @@ QPushButton name - PushButton2 + bt0 + + + sizePolicy + + 1 + 1 + + + + maximumSize + + 60 + 25 + text - &Cancel + 0 - - + + QPushButton + name - Spacer2 + PushButton2 - orientation - Horizontal + sizePolicy + + 1 + 1 + - sizeType - Fixed - - - sizeHint + maximumSize - 16 - 20 + 60 + 25 - + + text + &Cancel + + - + + PushButton2 + clicked() + Form1 + reject() + + PushButton1 clicked() Form1 accept() - PushButton2 + bt0 clicked() Form1 - reject() + addnum() + + + bt1 + clicked() + Form1 + addnum() + + + bt2 + clicked() + Form1 + addnum() + + + bt3 + clicked() + Form1 + addnum() + + + bt4 + clicked() + Form1 + addnum() + + + bt5 + clicked() + Form1 + addnum() + + + bt6 + clicked() + Form1 + addnum() + + + bt7 + clicked() + Form1 + addnum() + + + bt8 + clicked() + Form1 + addnum() + + + bt9 + clicked() + Form1 + addnum() + addnum() + + lnePin + PushButton1 + PushButton2 + bt1 + bt2 + bt3 + bt4 + bt5 + bt6 + bt7 + bt8 + bt9 + bt0 + -- cgit v0.9.0.2