-rw-r--r-- | noncore/tools/euroconv/calcdisplay.cpp | 188 | ||||
-rw-r--r-- | noncore/tools/euroconv/calcdisplay.h | 57 | ||||
-rw-r--r-- | noncore/tools/euroconv/calckeypad.cpp | 191 | ||||
-rw-r--r-- | noncore/tools/euroconv/calckeypad.h | 78 | ||||
-rw-r--r-- | noncore/tools/euroconv/config.in | 4 | ||||
-rw-r--r-- | noncore/tools/euroconv/currency.h | 20 | ||||
-rw-r--r-- | noncore/tools/euroconv/euroconv.pro | 12 | ||||
-rw-r--r-- | noncore/tools/euroconv/main.cpp | 39 | ||||
-rw-r--r-- | noncore/tools/euroconv/opie-euroconv.control | 9 |
9 files changed, 598 insertions, 0 deletions
diff --git a/noncore/tools/euroconv/calcdisplay.cpp b/noncore/tools/euroconv/calcdisplay.cpp new file mode 100644 index 0000000..06e5158 --- a/dev/null +++ b/noncore/tools/euroconv/calcdisplay.cpp | |||
@@ -0,0 +1,188 @@ | |||
1 | /**************************************************************************** | ||
2 | * | ||
3 | * File: calcdisplay.cpp | ||
4 | * | ||
5 | * Description: | ||
6 | * | ||
7 | * | ||
8 | * Authors: Eric Santonacci <Eric.Santonacci@talc.fr> | ||
9 | * | ||
10 | * Requirements: Qt | ||
11 | * | ||
12 | * $Id$ | ||
13 | * | ||
14 | ***************************************************************************/ | ||
15 | |||
16 | #include <stdio.h> | ||
17 | #include <qvbox.h> | ||
18 | |||
19 | #include "currency.h" | ||
20 | #include "calcdisplay.h" | ||
21 | |||
22 | |||
23 | LCDDisplay::LCDDisplay( QWidget *parent, const char *name ) | ||
24 | : QHBox( parent, name ){ | ||
25 | |||
26 | |||
27 | // Create display | ||
28 | QVBox *vbxlayout = new QVBox (this); | ||
29 | |||
30 | grpbxTop = new QVGroupBox(vbxlayout, "grpbxTop"); | ||
31 | cbbxTop = new QComboBox(grpbxTop, "cbbxTop"); | ||
32 | lcdTop = new QLCDNumber(10, grpbxTop, "lcdTop"); | ||
33 | lcdTop->setMode( QLCDNumber::DEC ); | ||
34 | lcdTop->setSmallDecimalPoint(true); | ||
35 | lcdTop->setSegmentStyle(QLCDNumber::Flat); | ||
36 | cbbxTop->insertStrList(aCurrency); | ||
37 | |||
38 | grpbxBottom = new QVGroupBox(vbxlayout, "grpbxBottom"); | ||
39 | cbbxBottom = new QComboBox(grpbxBottom, "cbbxBottom"); | ||
40 | lcdBottom = new QLCDNumber(10, grpbxBottom, "lcdBottom"); | ||
41 | lcdBottom->setMode( QLCDNumber::DEC ); | ||
42 | lcdBottom->setSmallDecimalPoint(true); | ||
43 | lcdBottom->setSegmentStyle(QLCDNumber::Flat); | ||
44 | cbbxBottom->insertStrList(aCurrency); | ||
45 | |||
46 | // set combo box signals | ||
47 | connect(cbbxTop, SIGNAL(activated(int)), this, SLOT(cbbxChange())); | ||
48 | connect(cbbxBottom, SIGNAL(activated(int)), this, SLOT(cbbxChange())); | ||
49 | |||
50 | btnSwap = new QPushButton("S",this, "swap"); | ||
51 | btnSwap->setMaximumSize(20,50); | ||
52 | btnSwap->setMinimumSize(20,50); | ||
53 | // set signal | ||
54 | connect(btnSwap, SIGNAL(clicked()), this, SLOT(swapLCD())); | ||
55 | |||
56 | // set default LCD to top | ||
57 | iCurrentLCD = 0; | ||
58 | |||
59 | //setValue(123.456); | ||
60 | |||
61 | } | ||
62 | |||
63 | /*********************************************************************** | ||
64 | * SLOT: Display value in the correct LCD | ||
65 | **********************************************************************/ | ||
66 | void LCDDisplay::setValue(double dSrcValue){ | ||
67 | |||
68 | double dDstValue=0; | ||
69 | |||
70 | int iSrcIndex; | ||
71 | int iDstIndex; | ||
72 | |||
73 | |||
74 | // get item index of the focused | ||
75 | if(!iCurrentLCD){ | ||
76 | iSrcIndex = cbbxTop->currentItem(); | ||
77 | iDstIndex = cbbxBottom->currentItem(); | ||
78 | }else{ | ||
79 | iSrcIndex = cbbxBottom->currentItem(); | ||
80 | iDstIndex = cbbxTop->currentItem(); | ||
81 | } | ||
82 | |||
83 | if(iSrcIndex == iDstIndex) | ||
84 | dDstValue = dSrcValue; | ||
85 | else{ | ||
86 | if(iSrcIndex){ | ||
87 | // we are NOT in Euro as iDstIndex <> 0 | ||
88 | // Convert to Euro | ||
89 | dDstValue = x2Euro(iSrcIndex, dSrcValue); | ||
90 | dDstValue = Euro2x(iDstIndex, dDstValue); | ||
91 | }else | ||
92 | // We are in Euro | ||
93 | dDstValue = Euro2x(iDstIndex, dSrcValue); | ||
94 | } | ||
95 | |||
96 | |||
97 | if(!iCurrentLCD){ | ||
98 | lcdTop->display(dSrcValue); | ||
99 | lcdBottom->display(dDstValue); | ||
100 | }else{ | ||
101 | lcdBottom->display(dSrcValue); | ||
102 | lcdTop->display(dDstValue); | ||
103 | } | ||
104 | |||
105 | } | ||
106 | |||
107 | /*********************************************************************** | ||
108 | * SLOT: Swap output keypad between LCD displays | ||
109 | **********************************************************************/ | ||
110 | void LCDDisplay::swapLCD(void){ | ||
111 | |||
112 | double dCurrentValue; | ||
113 | |||
114 | // get current value | ||
115 | if(!iCurrentLCD){ | ||
116 | dCurrentValue = lcdTop->value(); | ||
117 | iCurrentLCD = 1; | ||
118 | }else{ | ||
119 | dCurrentValue = lcdBottom->value(); | ||
120 | iCurrentLCD = 0; | ||
121 | } | ||
122 | |||
123 | setValue(dCurrentValue); | ||
124 | } | ||
125 | |||
126 | /*********************************************************************** | ||
127 | * SLOT: Currency change | ||
128 | **********************************************************************/ | ||
129 | void LCDDisplay::cbbxChange(void){ | ||
130 | |||
131 | double dCurrentValue; | ||
132 | |||
133 | printf("combo changes...\n"); | ||
134 | |||
135 | // get current value | ||
136 | if(!iCurrentLCD){ | ||
137 | dCurrentValue = lcdTop->value(); | ||
138 | }else{ | ||
139 | dCurrentValue = lcdBottom->value(); | ||
140 | } | ||
141 | |||
142 | setValue(dCurrentValue); | ||
143 | } | ||
144 | |||
145 | |||
146 | /*********************************************************************** | ||
147 | * Euro2x converts dValue from Euro to the currency which combo box | ||
148 | * index is provided in iIndex. | ||
149 | **********************************************************************/ | ||
150 | double LCDDisplay::Euro2x(int iIndex, double dValue){ | ||
151 | |||
152 | switch (iIndex){ | ||
153 | case 0: // Euro | ||
154 | return(dValue); | ||
155 | break; | ||
156 | |||
157 | case 1: // FF: French Francs | ||
158 | return(dValue*FF); | ||
159 | break; | ||
160 | |||
161 | case 2: // DM: Deutch Mark | ||
162 | return(dValue*DM); | ||
163 | break; | ||
164 | }//switch (iIndex) | ||
165 | }// fct Eur2x | ||
166 | |||
167 | |||
168 | |||
169 | /*********************************************************************** | ||
170 | * x2Euro converts dValue to Euro from the currency which combo box | ||
171 | * index is provided in iIndex. | ||
172 | **********************************************************************/ | ||
173 | double LCDDisplay::x2Euro(int iIndex, double dValue){ | ||
174 | |||
175 | switch (iIndex){ | ||
176 | case 0: // Euro | ||
177 | return(dValue); | ||
178 | break; | ||
179 | |||
180 | case 1: // FF: French Francs | ||
181 | return(dValue/FF); | ||
182 | break; | ||
183 | |||
184 | case 2: // DM: Deutch Mark | ||
185 | return(dValue/DM); | ||
186 | break; | ||
187 | }//switch (iIndex) | ||
188 | }// fct x2Euro | ||
diff --git a/noncore/tools/euroconv/calcdisplay.h b/noncore/tools/euroconv/calcdisplay.h new file mode 100644 index 0000000..17ce8f4 --- a/dev/null +++ b/noncore/tools/euroconv/calcdisplay.h | |||
@@ -0,0 +1,57 @@ | |||
1 | /**************************************************************************** | ||
2 | * | ||
3 | * File: calcdisplay.h | ||
4 | * | ||
5 | * Description: Header file for the class LCDDisplay | ||
6 | * | ||
7 | * | ||
8 | * Authors: Eric Santonacci <Eric.Santonacci@talc.fr> | ||
9 | * | ||
10 | * Requirements: Qt | ||
11 | * | ||
12 | * $Id$ | ||
13 | * | ||
14 | * | ||
15 | ***************************************************************************/ | ||
16 | #ifndef CALCDISPLAY_H | ||
17 | #define CALCDISPLAY_H | ||
18 | |||
19 | #include <qhbox.h> | ||
20 | #include <qlcdnumber.h> | ||
21 | #include <qvgroupbox.h> | ||
22 | #include <qpushbutton.h> | ||
23 | #include <qcombobox.h> | ||
24 | |||
25 | class LCDDisplay : public QHBox{ | ||
26 | |||
27 | Q_OBJECT | ||
28 | public: | ||
29 | LCDDisplay( QWidget *parent=0, const char *name=0 ); | ||
30 | |||
31 | public slots: | ||
32 | void setValue(double); | ||
33 | void swapLCD(void); | ||
34 | void cbbxChange(void); | ||
35 | |||
36 | //signals: | ||
37 | // void valueChanged( int ); | ||
38 | private: | ||
39 | QVGroupBox *grpbxTop; | ||
40 | QComboBox *cbbxTop; | ||
41 | QLCDNumber *lcdTop; | ||
42 | |||
43 | QVGroupBox *grpbxBottom; | ||
44 | QComboBox *cbbxBottom; | ||
45 | QLCDNumber *lcdBottom; | ||
46 | |||
47 | QPushButton *btnSwap; | ||
48 | |||
49 | int iCurrentLCD; // 0=top, 1=bottom | ||
50 | |||
51 | double Euro2x(int iIndex, double dValue); | ||
52 | double x2Euro(int iIndex, double dValue); | ||
53 | |||
54 | |||
55 | }; | ||
56 | |||
57 | #endif // CALCDISPLAY_H | ||
diff --git a/noncore/tools/euroconv/calckeypad.cpp b/noncore/tools/euroconv/calckeypad.cpp new file mode 100644 index 0000000..4156570 --- a/dev/null +++ b/noncore/tools/euroconv/calckeypad.cpp | |||
@@ -0,0 +1,191 @@ | |||
1 | /**************************************************************************** | ||
2 | * | ||
3 | * File: calckeypad.cpp | ||
4 | * | ||
5 | * Description: | ||
6 | * | ||
7 | * | ||
8 | * Authors: Eric Santonacci <Eric.Santonacci@talc.fr> | ||
9 | * | ||
10 | * Requirements: Qt | ||
11 | * | ||
12 | * $Id$ | ||
13 | * | ||
14 | ***************************************************************************/ | ||
15 | |||
16 | #include <qmessagebox.h> | ||
17 | |||
18 | #include "calckeypad.h" | ||
19 | |||
20 | |||
21 | KeyPad::KeyPad(LCDDisplay *lcd, QWidget *parent, const char *name ) | ||
22 | : QGrid(5, parent, name){ | ||
23 | |||
24 | |||
25 | // save lcd at init | ||
26 | display = lcd; | ||
27 | // Init variable | ||
28 | dCurrent = 0; | ||
29 | iLenCurrent = 1; | ||
30 | bIsDec = false; | ||
31 | dDecCurrent = 0; | ||
32 | iPreviousOperator = 0; | ||
33 | dPreviousValue = 0; | ||
34 | |||
35 | // First line | ||
36 | btnClear = new QPushButton("CE/C", this, "Clear"); | ||
37 | btn7 = new QPushButton("7", this, "7"); | ||
38 | btn8 = new QPushButton("8", this, "8"); | ||
39 | btn9 = new QPushButton("9", this, "9"); | ||
40 | btnPlus = new QPushButton("+", this, "+"); | ||
41 | // 2nd line | ||
42 | btnPercent = new QPushButton("%", this, "percent"); | ||
43 | btn4 = new QPushButton("4", this, "4"); | ||
44 | btn5 = new QPushButton("5", this, "5"); | ||
45 | btn6 = new QPushButton("6", this, "6"); | ||
46 | btnMinus = new QPushButton("-", this, "-"); | ||
47 | // 3rd line | ||
48 | btnF1 = new QPushButton("",this, "F1"); | ||
49 | btn1 = new QPushButton("1", this, "1"); | ||
50 | btn2 = new QPushButton("2", this, "2"); | ||
51 | btn3 = new QPushButton("3", this, "3"); | ||
52 | btnMultiply = new QPushButton("X", this, "X"); | ||
53 | // 4th line | ||
54 | btnAbout = new QPushButton("?", this, "About"); | ||
55 | btn0 = new QPushButton("0", this, "0"); | ||
56 | btnDot = new QPushButton(".", this, "dot"); | ||
57 | btnEqual = new QPushButton("=", this, "equal"); | ||
58 | btnDivide = new QPushButton("/", this, "divide"); | ||
59 | |||
60 | // Digit key | ||
61 | grpbtnDigits = new QButtonGroup(0, "digits"); | ||
62 | grpbtnDigits->insert(btn0, 0); | ||
63 | grpbtnDigits->insert(btn1, 1); | ||
64 | grpbtnDigits->insert(btn2, 2); | ||
65 | grpbtnDigits->insert(btn3, 3); | ||
66 | grpbtnDigits->insert(btn4, 4); | ||
67 | grpbtnDigits->insert(btn5, 5); | ||
68 | grpbtnDigits->insert(btn6, 6); | ||
69 | grpbtnDigits->insert(btn7, 7); | ||
70 | grpbtnDigits->insert(btn8, 8); | ||
71 | grpbtnDigits->insert(btn9, 9); | ||
72 | |||
73 | // Operator key | ||
74 | grpbtnOperators = new QButtonGroup(0, "operator"); | ||
75 | grpbtnOperators->insert(btnPlus, 1); | ||
76 | grpbtnOperators->insert(btnMinus,2); | ||
77 | grpbtnOperators->insert(btnMultiply,3); | ||
78 | grpbtnOperators->insert(btnDivide,4); | ||
79 | grpbtnOperators->insert(btnEqual,5); | ||
80 | |||
81 | |||
82 | // SIGNALS AND SLOTS | ||
83 | connect(grpbtnDigits, SIGNAL(clicked(int) ), this, SLOT(enterDigits(int))); | ||
84 | connect(grpbtnOperators, SIGNAL(clicked(int)), this, SLOT(operatorPressed(int))); | ||
85 | connect(btnClear, SIGNAL(clicked()), this, SLOT(clearLCD())); | ||
86 | connect(btnAbout, SIGNAL(clicked()), this, SLOT(aboutDialog())); | ||
87 | connect(btnDot, SIGNAL(clicked()), this, SLOT(gotoDec())); | ||
88 | } | ||
89 | |||
90 | |||
91 | /*********************************************************************** | ||
92 | * SLOT: enterDigits calculates the value to display and display it. | ||
93 | **********************************************************************/ | ||
94 | void KeyPad::enterDigits(int i){ | ||
95 | |||
96 | if(!dCurrent) | ||
97 | dCurrent = i; | ||
98 | else if(!bIsDec){ | ||
99 | if(iLenCurrent > 9) | ||
100 | return; | ||
101 | dCurrent *= 10; | ||
102 | dCurrent += i; | ||
103 | iLenCurrent++; | ||
104 | }else{ | ||
105 | dCurrent += i*dDecCurrent; | ||
106 | dDecCurrent /= 10; | ||
107 | } | ||
108 | |||
109 | display->setValue(dCurrent); | ||
110 | } | ||
111 | |||
112 | /*********************************************************************** | ||
113 | * SLOT: Operator has been pressed | ||
114 | **********************************************************************/ | ||
115 | void KeyPad::operatorPressed(int i){ | ||
116 | |||
117 | if(iPreviousOperator){ | ||
118 | switch(iPreviousOperator){ | ||
119 | case 1: // Plus + | ||
120 | dCurrent += dPreviousValue; | ||
121 | break; | ||
122 | |||
123 | case 2: // Minus - | ||
124 | dCurrent = dPreviousValue - dCurrent; | ||
125 | break; | ||
126 | |||
127 | case 3: // Multiply * | ||
128 | dCurrent *= dPreviousValue; | ||
129 | break; | ||
130 | |||
131 | case 4: // Divide / | ||
132 | dCurrent = dPreviousValue / dCurrent; | ||
133 | break; | ||
134 | |||
135 | } | ||
136 | display->setValue(dCurrent); | ||
137 | } | ||
138 | if(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 | |||
154 | } | ||
155 | /*********************************************************************** | ||
156 | * SLOT: clearLCD CE/C has been pressed | ||
157 | **********************************************************************/ | ||
158 | void KeyPad::clearLCD(void){ | ||
159 | |||
160 | dCurrent = 0; | ||
161 | iLenCurrent = 1; | ||
162 | bIsDec = false; | ||
163 | dDecCurrent = 0; | ||
164 | iPreviousOperator = 0; | ||
165 | dPreviousValue = 0; | ||
166 | display->setValue(0); | ||
167 | } | ||
168 | |||
169 | /*********************************************************************** | ||
170 | * SLOT: gotoDec Dot has been pressed | ||
171 | **********************************************************************/ | ||
172 | void KeyPad::gotoDec(void){ | ||
173 | |||
174 | bIsDec = true; | ||
175 | dDecCurrent = 0.1; | ||
176 | } | ||
177 | |||
178 | |||
179 | |||
180 | /*********************************************************************** | ||
181 | * SLOT: Display About Dialog... | ||
182 | **********************************************************************/ | ||
183 | void KeyPad::aboutDialog(void){ | ||
184 | |||
185 | QMessageBox::about( this, "About Euroconv", | ||
186 | "Euroconv is an Euro converter\n\n" | ||
187 | "Copyright 2003 TALC Informatique.\n" | ||
188 | "Under GPL license\n\n" | ||
189 | "Written by Eric Santonacci for Opie\n" | ||
190 | "http://opie.handhelds.org\n" ); | ||
191 | } | ||
diff --git a/noncore/tools/euroconv/calckeypad.h b/noncore/tools/euroconv/calckeypad.h new file mode 100644 index 0000000..42e7eb3 --- a/dev/null +++ b/noncore/tools/euroconv/calckeypad.h | |||
@@ -0,0 +1,78 @@ | |||
1 | /**************************************************************************** | ||
2 | * | ||
3 | * File: calckeypad.h | ||
4 | * | ||
5 | * Description: Header file for the class KeyPad | ||
6 | * | ||
7 | * | ||
8 | * Authors: Eric Santonacci <Eric.Santonacci@talc.fr> | ||
9 | * | ||
10 | * Requirements: Qt | ||
11 | * | ||
12 | * $Id$ | ||
13 | * | ||
14 | * | ||
15 | ***************************************************************************/ | ||
16 | #ifndef CALCKEYPAD_H | ||
17 | #define CALCKEYPAD_H | ||
18 | |||
19 | #include <qpushbutton.h> | ||
20 | #include <qgrid.h> | ||
21 | #include <qbuttongroup.h> | ||
22 | |||
23 | #include "calcdisplay.h" | ||
24 | |||
25 | class KeyPad : public QGrid { | ||
26 | |||
27 | Q_OBJECT | ||
28 | public: | ||
29 | KeyPad(LCDDisplay *LCD, QWidget *parent=0, const char *name=0 ); | ||
30 | |||
31 | public slots: | ||
32 | void enterDigits(int); | ||
33 | void operatorPressed(int); | ||
34 | void clearLCD(void); | ||
35 | void aboutDialog(void); | ||
36 | void gotoDec(void); | ||
37 | |||
38 | private: | ||
39 | LCDDisplay *display; | ||
40 | double dCurrent; | ||
41 | int iLenCurrent; | ||
42 | bool bIsDec; | ||
43 | double dDecCurrent; | ||
44 | int iPreviousOperator; | ||
45 | double dPreviousValue; | ||
46 | |||
47 | QPushButton *btn0; | ||
48 | QPushButton *btn1; | ||
49 | QPushButton *btn2; | ||
50 | QPushButton *btn3; | ||
51 | QPushButton *btn4; | ||
52 | QPushButton *btn5; | ||
53 | QPushButton *btn6; | ||
54 | QPushButton *btn7; | ||
55 | QPushButton *btn8; | ||
56 | QPushButton *btn9; | ||
57 | QButtonGroup *grpbtnDigits; | ||
58 | |||
59 | QPushButton *btnDot; | ||
60 | |||
61 | QPushButton *btnClear; | ||
62 | |||
63 | QPushButton *btnPlus; | ||
64 | QPushButton *btnMinus; | ||
65 | QPushButton *btnMultiply; | ||
66 | QPushButton *btnDivide; | ||
67 | QPushButton *btnEqual; | ||
68 | QPushButton *btnPercent; | ||
69 | QPushButton *btnF1; | ||
70 | QPushButton *btnAbout; | ||
71 | |||
72 | QButtonGroup *grpbtnOperators; | ||
73 | |||
74 | |||
75 | |||
76 | }; | ||
77 | |||
78 | #endif // CALCKEYPAD_H | ||
diff --git a/noncore/tools/euroconv/config.in b/noncore/tools/euroconv/config.in new file mode 100644 index 0000000..f4f1d78 --- a/dev/null +++ b/noncore/tools/euroconv/config.in | |||
@@ -0,0 +1,4 @@ | |||
1 | config EUROCONV | ||
2 | boolean "euroconv" | ||
3 | default "y" | ||
4 | depends ( LIBQPE || LIBQPE-X11 ) && LIBOPIE | ||
diff --git a/noncore/tools/euroconv/currency.h b/noncore/tools/euroconv/currency.h new file mode 100644 index 0000000..90f5b57 --- a/dev/null +++ b/noncore/tools/euroconv/currency.h | |||
@@ -0,0 +1,20 @@ | |||
1 | /**************************************************************************** | ||
2 | * | ||
3 | * File: currency.h | ||
4 | * | ||
5 | * Description: define constant for currency compare Euro | ||
6 | * | ||
7 | * | ||
8 | * Authors: Eric Santonacci <Eric.Santonacci@talc.fr> | ||
9 | * | ||
10 | * | ||
11 | * $Id$ | ||
12 | * | ||
13 | ***************************************************************************/ | ||
14 | |||
15 | // 1 Euro equal.... | ||
16 | #define EURO 1 // Euro | ||
17 | #define FF 6.55957 // French Francs | ||
18 | #define DM 1.96 // Deutch Mark | ||
19 | |||
20 | static const char* aCurrency[] = { "Euro", "French Frs", "DM", 0 }; | ||
diff --git a/noncore/tools/euroconv/euroconv.pro b/noncore/tools/euroconv/euroconv.pro new file mode 100644 index 0000000..dd2f7af --- a/dev/null +++ b/noncore/tools/euroconv/euroconv.pro | |||
@@ -0,0 +1,12 @@ | |||
1 | TEMPLATE= app | ||
2 | CONFIG = qt warn_on release | ||
3 | HEADERS = calcdisplay.h \ | ||
4 | calckeypad.h | ||
5 | SOURCES = calcdisplay.cpp \ | ||
6 | calckeypad.cpp \ | ||
7 | main.cpp | ||
8 | INCLUDEPATH += $(OPIEDIR)/include | ||
9 | DEPENDPATH += $(OPIEDIR)/include | ||
10 | LIBS += -lqpe -lopie | ||
11 | DESTDIR = ${OPIEDIR}/bin | ||
12 | INTERFACES= | ||
diff --git a/noncore/tools/euroconv/main.cpp b/noncore/tools/euroconv/main.cpp new file mode 100644 index 0000000..2d97f4e --- a/dev/null +++ b/noncore/tools/euroconv/main.cpp | |||
@@ -0,0 +1,39 @@ | |||
1 | /**************************************************************************** | ||
2 | * | ||
3 | * File: main.cpp | ||
4 | * | ||
5 | * Description: main file for OPIE Euroconv aapp | ||
6 | * | ||
7 | * | ||
8 | * Authors: Eric Santonacci <Eric.Santonacci@talc.fr> | ||
9 | * | ||
10 | * Requirements: Qt | ||
11 | * | ||
12 | * $Id$ | ||
13 | * | ||
14 | ***************************************************************************/ | ||
15 | |||
16 | #include <qpe/qpeapplication.h> | ||
17 | #include <qvbox.h> | ||
18 | //#include <qapplication.h> | ||
19 | |||
20 | #include "calcdisplay.h" | ||
21 | #include "calckeypad.h" | ||
22 | |||
23 | |||
24 | |||
25 | int main( int argc, char **argv ) { | ||
26 | |||
27 | QPEApplication app( argc, argv ); | ||
28 | |||
29 | QVBox *layout = new QVBox(0, "fond"); | ||
30 | |||
31 | LCDDisplay lcd (layout, "lcd"); | ||
32 | KeyPad num(&lcd, layout, "keypad"); | ||
33 | app.setMainWidget(layout); | ||
34 | layout->setCaption("Euroconv"); | ||
35 | layout->showMaximized (); | ||
36 | layout->show(); | ||
37 | return app.exec(); | ||
38 | } | ||
39 | |||
diff --git a/noncore/tools/euroconv/opie-euroconv.control b/noncore/tools/euroconv/opie-euroconv.control new file mode 100644 index 0000000..643637e --- a/dev/null +++ b/noncore/tools/euroconv/opie-euroconv.control | |||
@@ -0,0 +1,9 @@ | |||
1 | Files: bin/euroconv pics/euroconv/* apps/Applications/euroconv.desktop | ||
2 | Priority: optional | ||
3 | Section: opie/applications | ||
4 | Maintainer: Eric Santonacci <Eric.Santonacci@talc.fr> | ||
5 | Architecture: arm | ||
6 | Version: $QPE_VERSION-$SUB_VERSION | ||
7 | Depends: opie-base | ||
8 | Description: Euroconv | ||
9 | Converts currencies between different european formats | ||