summaryrefslogtreecommitdiff
Side-by-side diff
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/net/opietooth/blue-pin/pindlg.cc22
-rw-r--r--noncore/net/opietooth/blue-pin/pindlg.h5
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
@@ -94,16 +94,30 @@ QString PinDlg::makeMacFromArgs()
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() )
{
@@ -116,4 +130,12 @@ void PinDlg::accept()
qApp->quit();
::exit(0);
}
+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
@@ -27,8 +27,9 @@ namespace OpieTooth {
QString m_mac;
protected slots:
void accept();
- void addnum();
-
+ void reject();
+ void addnum();
+ void delnum();
};
};