summaryrefslogtreecommitdiff
path: root/noncore/tools/euroconv/calckeypad.cpp
Unidiff
Diffstat (limited to 'noncore/tools/euroconv/calckeypad.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/tools/euroconv/calckeypad.cpp48
1 files changed, 32 insertions, 16 deletions
diff --git a/noncore/tools/euroconv/calckeypad.cpp b/noncore/tools/euroconv/calckeypad.cpp
index 4156570..f1d61c0 100644
--- a/noncore/tools/euroconv/calckeypad.cpp
+++ b/noncore/tools/euroconv/calckeypad.cpp
@@ -23,2 +23,4 @@ KeyPad::KeyPad(LCDDisplay *lcd, QWidget *parent, const char *name )
23 23
24int i;
25QButton *btnButton;
24 26
@@ -72,2 +74,8 @@ grpbtnDigits->insert(btn9, 9);
72 74
75// set appearance of buttons
76for(i=0; i<10; i++){
77 btnButton = grpbtnDigits->find(i);
78 btnButton->setFixedSize(30,30);
79}
80
73// Operator key 81// Operator key
@@ -79,2 +87,13 @@ grpbtnOperators->insert(btnDivide,4);
79grpbtnOperators->insert(btnEqual,5); 87grpbtnOperators->insert(btnEqual,5);
88// set appearance of buttons
89for(i=1; i<6; i++){
90 btnButton = grpbtnOperators->find(i);
91 btnButton->setFixedSize(30,30);
92}
93btnClear->setFixedSize(30,30);
94btnClear->setPalette(QPalette( QColor(255, 99, 71) ) );
95btnDot->setFixedSize(30,30);
96btnPercent->setFixedSize(30,30);
97btnF1->setFixedSize(30,30);
98btnAbout->setFixedSize(30,30);
80 99
@@ -137,18 +156,11 @@ if(iPreviousOperator){
137} 156}
138if(i == 5){
139 // key '=' pressed
140 dPreviousValue = 0;
141 iPreviousOperator = 0;
142 // We don't want to add digits
143 iLenCurrent = 100;
144}else{
145 dPreviousValue = dCurrent;
146 iPreviousOperator = i;
147 // reset LCD for next digit
148 dCurrent = 0;
149 iLenCurrent = 1;
150 bIsDec = false;
151 dDecCurrent = 0;
152}
153 157
158dPreviousValue = dCurrent;
159iPreviousOperator = i;
160
161// reset LCD for next digit
162dCurrent = 0;
163iLenCurrent = 1;
164bIsDec = false;
165dDecCurrent = 0;
154} 166}
@@ -189,3 +201,7 @@ QMessageBox::about( this, "About Euroconv",
189 "Written by Eric Santonacci for Opie\n" 201 "Written by Eric Santonacci for Opie\n"
190 "http://opie.handhelds.org\n" ); 202 "http://opie.handhelds.org\n\n"
203 "Version 0.2\n\n"
204 "Any comment or feedback to:\n"
205 "Eric.Santonacci@talc.fr\n");
206
191} 207}