author | korovkin <korovkin> | 2006-05-06 19:19:00 (UTC) |
---|---|---|
committer | korovkin <korovkin> | 2006-05-06 19:19:00 (UTC) |
commit | dc719be35432469c24dd8d10136c1ea25c6861d2 (patch) (side-by-side diff) | |
tree | 6b4e970c2118a695a89ee4c46ac16fc68ec3bf4f | |
parent | 2d9247d6c2917fd967d0d01d4d9aa6de4fb820f1 (diff) | |
download | opie-dc719be35432469c24dd8d10136c1ea25c6861d2.zip opie-dc719be35432469c24dd8d10136c1ea25c6861d2.tar.gz opie-dc719be35432469c24dd8d10136c1ea25c6861d2.tar.bz2 |
Added reject function to a Cancel button.
Added "AC" == "Backspace" button.
-rw-r--r-- | noncore/net/opietooth/blue-pin/pindlg.cc | 22 | ||||
-rw-r--r-- | noncore/net/opietooth/blue-pin/pindlg.h | 5 |
2 files changed, 25 insertions, 2 deletions
diff --git a/noncore/net/opietooth/blue-pin/pindlg.cc b/noncore/net/opietooth/blue-pin/pindlg.cc index 3db6095..b03ae7d 100644 --- a/noncore/net/opietooth/blue-pin/pindlg.cc +++ b/noncore/net/opietooth/blue-pin/pindlg.cc @@ -97,2 +97,5 @@ QString PinDlg::makeMacFromArgs() +/* + * Add a number to the PIN number + */ void PinDlg::addnum() @@ -105,2 +108,13 @@ void PinDlg::addnum() +/* + * Delete a number from the end of the line + */ +void PinDlg::delnum() +{ + if( sender()->inherits( "QPushButton") ) { + const QPushButton* btn = static_cast<const QPushButton*> (sender()); + lnePin->setText(lnePin->text().remove(lnePin->text().length() - 1, 1)); + } +} + void PinDlg::accept() @@ -119 +133,9 @@ void PinDlg::accept() +void PinDlg::reject() +{ + printf("ERR\n"); + QDialog::reject(); + qApp->quit(); + ::exit(0); +} + diff --git a/noncore/net/opietooth/blue-pin/pindlg.h b/noncore/net/opietooth/blue-pin/pindlg.h index 1817aa8..8557010 100644 --- a/noncore/net/opietooth/blue-pin/pindlg.h +++ b/noncore/net/opietooth/blue-pin/pindlg.h @@ -30,4 +30,5 @@ namespace OpieTooth { void accept(); - void addnum(); - + void reject(); + void addnum(); + void delnum(); }; |