From dc719be35432469c24dd8d10136c1ea25c6861d2 Mon Sep 17 00:00:00 2001 From: korovkin Date: Sat, 06 May 2006 19:19:00 +0000 Subject: Added reject function to a Cancel button. Added "AC" == "Backspace" button. --- (limited to 'noncore/net/opietooth/blue-pin/pindlg.cc') 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 @@ -95,6 +95,9 @@ QString PinDlg::makeMacFromArgs() return qApp->argv()[2] ; } +/* + * Add a number to the PIN number + */ void PinDlg::addnum() { if( sender()->inherits( "QPushButton") ) { @@ -103,6 +106,17 @@ void PinDlg::addnum() } } +/* + * Delete a number from the end of the line + */ +void PinDlg::delnum() +{ + if( sender()->inherits( "QPushButton") ) { + const QPushButton* btn = static_cast (sender()); + lnePin->setText(lnePin->text().remove(lnePin->text().length() - 1, 1)); + } +} + void PinDlg::accept() { if ( ckbPin->isChecked() ) @@ -117,3 +131,11 @@ void PinDlg::accept() ::exit(0); } +void PinDlg::reject() +{ + printf("ERR\n"); + QDialog::reject(); + qApp->quit(); + ::exit(0); +} + -- cgit v0.9.0.2