author | kergoth <kergoth> | 2002-01-25 22:14:26 (UTC) |
---|---|---|
committer | kergoth <kergoth> | 2002-01-25 22:14:26 (UTC) |
commit | 15318cad33835e4e2dc620d033e43cd930676cdd (patch) (unidiff) | |
tree | c2fa0399a2c47fda8e2cd0092c73a809d17f68eb /noncore/tools/calc2/simple/simpleimpl.cpp | |
download | opie-15318cad33835e4e2dc620d033e43cd930676cdd.zip opie-15318cad33835e4e2dc620d033e43cd930676cdd.tar.gz opie-15318cad33835e4e2dc620d033e43cd930676cdd.tar.bz2 |
Initial revision
Diffstat (limited to 'noncore/tools/calc2/simple/simpleimpl.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/tools/calc2/simple/simpleimpl.cpp | 120 |
1 files changed, 120 insertions, 0 deletions
diff --git a/noncore/tools/calc2/simple/simpleimpl.cpp b/noncore/tools/calc2/simple/simpleimpl.cpp new file mode 100644 index 0000000..f71f000 --- a/dev/null +++ b/noncore/tools/calc2/simple/simpleimpl.cpp | |||
@@ -0,0 +1,120 @@ | |||
1 | /********************************************************************** | ||
2 | ** Copyright (C) 2000 Trolltech AS. All rights reserved. | ||
3 | ** | ||
4 | ** This file is part of Qtopia Environment. | ||
5 | ** | ||
6 | ** This file may be distributed and/or modified under the terms of the | ||
7 | ** GNU General Public License version 2 as published by the Free Software | ||
8 | ** Foundation and appearing in the file LICENSE.GPL included in the | ||
9 | ** packaging of this file. | ||
10 | ** | ||
11 | ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE | ||
12 | ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. | ||
13 | ** | ||
14 | ** See http://www.trolltech.com/gpl/ for GPL licensing information. | ||
15 | ** | ||
16 | ** Contact info@trolltech.com if any conditions of this licensing are | ||
17 | ** not clear to you. | ||
18 | ** | ||
19 | **********************************************************************/ | ||
20 | |||
21 | #include <qpushbutton.h> | ||
22 | #include <qlcdnumber.h> | ||
23 | |||
24 | #include "simpleimpl.h" | ||
25 | #include <stdinstructions.h> | ||
26 | |||
27 | void FormSimpleImpl::CEClicked() { | ||
28 | engine->hardReset(); | ||
29 | } | ||
30 | |||
31 | void FormSimpleImpl::MCClicked() { | ||
32 | engine->memClear(); | ||
33 | } | ||
34 | |||
35 | void FormSimpleImpl::MRClicked() { | ||
36 | engine->memRecall(); | ||
37 | } | ||
38 | |||
39 | void FormSimpleImpl::MPlusClicked() { | ||
40 | engine->memSave(); | ||
41 | } | ||
42 | |||
43 | void FormSimpleImpl::evalClicked() { | ||
44 | engine->eval(); | ||
45 | } | ||
46 | |||
47 | void FormSimpleImpl::addClicked () | ||
48 | { | ||
49 | engine->pushInstruction (new iAdd ()); | ||
50 | } | ||
51 | |||
52 | void FormSimpleImpl::subClicked () | ||
53 | { | ||
54 | engine->pushInstruction (new iSub ()); | ||
55 | } | ||
56 | |||
57 | void FormSimpleImpl::mulClicked () | ||
58 | { | ||
59 | engine->pushInstruction (new iMul ()); | ||
60 | } | ||
61 | |||
62 | void FormSimpleImpl::divClicked () | ||
63 | { | ||
64 | engine->pushInstruction (new iDiv ()); | ||
65 | } | ||
66 | |||
67 | void FormSimpleImpl::decimalClicked () | ||
68 | { | ||
69 | engine->pushValue ('.'); | ||
70 | } | ||
71 | |||
72 | void FormSimpleImpl::val1Clicked () | ||
73 | { | ||
74 | engine->pushValue ('1'); | ||
75 | } | ||
76 | |||
77 | void FormSimpleImpl::val2Clicked () | ||
78 | { | ||
79 | engine->pushValue ('2'); | ||
80 | } | ||
81 | |||
82 | void FormSimpleImpl::val3Clicked () | ||
83 | { | ||
84 | engine->pushValue ('3'); | ||
85 | } | ||
86 | |||
87 | void FormSimpleImpl::val4Clicked () | ||
88 | { | ||
89 | engine->pushValue ('4'); | ||
90 | } | ||
91 | |||
92 | void FormSimpleImpl::val5Clicked () | ||
93 | { | ||
94 | engine->pushValue ('5'); | ||
95 | } | ||
96 | |||
97 | void FormSimpleImpl::val6Clicked () | ||
98 | { | ||
99 | engine->pushValue ('6'); | ||
100 | } | ||
101 | |||
102 | void FormSimpleImpl::val7Clicked () | ||
103 | { | ||
104 | engine->pushValue ('7'); | ||
105 | } | ||
106 | |||
107 | void FormSimpleImpl::val8Clicked () | ||
108 | { | ||
109 | engine->pushValue ('8'); | ||
110 | } | ||
111 | |||
112 | void FormSimpleImpl::val9Clicked () | ||
113 | { | ||
114 | engine->pushValue ('9'); | ||
115 | } | ||
116 | |||
117 | void FormSimpleImpl::val0Clicked () | ||
118 | { | ||
119 | engine->pushValue ('0'); | ||
120 | } | ||