summaryrefslogtreecommitdiff
authorkorovkin <korovkin>2006-05-06 19:19:00 (UTC)
committer korovkin <korovkin>2006-05-06 19:19:00 (UTC)
commitdc719be35432469c24dd8d10136c1ea25c6861d2 (patch) (unidiff)
tree6b4e970c2118a695a89ee4c46ac16fc68ec3bf4f
parent2d9247d6c2917fd967d0d01d4d9aa6de4fb820f1 (diff)
downloadopie-dc719be35432469c24dd8d10136c1ea25c6861d2.zip
opie-dc719be35432469c24dd8d10136c1ea25c6861d2.tar.gz
opie-dc719be35432469c24dd8d10136c1ea25c6861d2.tar.bz2
Added reject function to a Cancel button.
Added "AC" == "Backspace" button.
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
@@ -95,6 +95,9 @@ QString PinDlg::makeMacFromArgs()
95 return qApp->argv()[2] ; 95 return qApp->argv()[2] ;
96} 96}
97 97
98/*
99 * Add a number to the PIN number
100 */
98void PinDlg::addnum() 101void PinDlg::addnum()
99{ 102{
100 if( sender()->inherits( "QPushButton") ) { 103 if( sender()->inherits( "QPushButton") ) {
@@ -103,6 +106,17 @@ void PinDlg::addnum()
103 } 106 }
104} 107}
105 108
109/*
110 * Delete a number from the end of the line
111 */
112void PinDlg::delnum()
113{
114 if( sender()->inherits( "QPushButton") ) {
115 const QPushButton* btn = static_cast<const QPushButton*> (sender());
116 lnePin->setText(lnePin->text().remove(lnePin->text().length() - 1, 1));
117 }
118}
119
106void PinDlg::accept() 120void PinDlg::accept()
107{ 121{
108 if ( ckbPin->isChecked() ) 122 if ( ckbPin->isChecked() )
@@ -117,3 +131,11 @@ void PinDlg::accept()
117 ::exit(0); 131 ::exit(0);
118} 132}
119 133
134void PinDlg::reject()
135{
136 printf("ERR\n");
137 QDialog::reject();
138 qApp->quit();
139 ::exit(0);
140}
141
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
@@ -28,7 +28,8 @@ namespace OpieTooth {
28 28
29 protected slots: 29 protected slots:
30 void accept(); 30 void accept();
31 void addnum(); 31 void reject();
32 32 void addnum();
33 void delnum();
33 }; 34 };
34}; 35};