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.cc | 22 |
1 files changed, 22 insertions, 0 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 @@ -74,46 +74,68 @@ QString PinDlg::makeTextFromArgs() QString status; if (dir == "out" ) { status = QObject::tr("Outgoing connection to "); } else status = QObject::tr("Incoming connection from "); status += name; status += "<br>"; status += "[" + bdaddr + "]"; return status ; } else return QString::null; } QString PinDlg::makeMacFromArgs() { if(qApp->argc() < 3) return QString::null; else return qApp->argv()[2] ; } +/* + * Add a number to the PIN number + */ void PinDlg::addnum() { if( sender()->inherits( "QPushButton") ) { const QPushButton* btn = static_cast<const QPushButton*> (sender()); lnePin->setText(lnePin->text() + btn->text()); } } +/* + * 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() { 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); } +void PinDlg::reject() +{ + printf("ERR\n"); + QDialog::reject(); + qApp->quit(); + ::exit(0); +} + |