-rw-r--r-- | noncore/tools/euroconv/calcdisplay.cpp | 34 | ||||
-rw-r--r-- | noncore/tools/euroconv/calcdisplay.h | 28 | ||||
-rw-r--r-- | noncore/tools/euroconv/main.cpp | 12 |
3 files changed, 37 insertions, 37 deletions
diff --git a/noncore/tools/euroconv/calcdisplay.cpp b/noncore/tools/euroconv/calcdisplay.cpp index e5a49e6..8f3de22 100644 --- a/noncore/tools/euroconv/calcdisplay.cpp +++ b/noncore/tools/euroconv/calcdisplay.cpp | |||
@@ -1,34 +1,62 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | * | 2 | * |
3 | * File: calcdisplay.cpp | 3 | * File: calcdisplay.cpp |
4 | * | 4 | * |
5 | * Description: | 5 | * Description: |
6 | * | 6 | * |
7 | * | 7 | * |
8 | * Authors: Eric Santonacci <Eric.Santonacci@talc.fr> | 8 | * Authors: Eric Santonacci <Eric.Santonacci@talc.fr> |
9 | * | 9 | * |
10 | * Requirements: Qt | 10 | * Requirements: Qt |
11 | * | 11 | * |
12 | * $Id$ | 12 | * $Id$ |
13 | * | 13 | * |
14 | ***************************************************************************/ | 14 | ***************************************************************************/ |
15 | 15 | ||
16 | #include <stdio.h> | 16 | #include <stdio.h> |
17 | #include <qvbox.h> | 17 | #include <qvbox.h> |
18 | #include <qpixmap.h> | 18 | #include <qpixmap.h> |
19 | 19 | ||
20 | #include "currency.h" | 20 | #include "currency.h" |
21 | #include "calcdisplay.h" | 21 | #include "calcdisplay.h" |
22 | 22 | ||
23 | /* XPM */ | ||
24 | static char *swap_xpm[] = { | ||
25 | /* width height num_colors chars_per_pixel */ | ||
26 | " 13 18 2 1", | ||
27 | /* colors */ | ||
28 | ". c None", | ||
29 | "# c #000000", | ||
30 | /* pixels */ | ||
31 | "..#######....", | ||
32 | "..#####......", | ||
33 | "..######.....", | ||
34 | "..#...###....", | ||
35 | "........##...", | ||
36 | ".........##..", | ||
37 | "..........##.", | ||
38 | "...........##", | ||
39 | "...........##", | ||
40 | "...........##", | ||
41 | "...........##", | ||
42 | "..........##.", | ||
43 | ".........##..", | ||
44 | "........##...", | ||
45 | "..#...###....", | ||
46 | "..######.....", | ||
47 | "..#####......", | ||
48 | "..#######....", | ||
49 | }; | ||
50 | |||
23 | 51 | ||
24 | LCDDisplay::LCDDisplay( QWidget *parent, const char *name ) | 52 | LCDDisplay::LCDDisplay( QWidget *parent, const char *name ) |
25 | : QHBox( parent, name ){ | 53 | : QHBox( parent, name ){ |
26 | 54 | ||
27 | 55 | ||
28 | 56 | ||
29 | this->setMargin(5); | 57 | this->setMargin(5); |
30 | this->setSpacing(5); | 58 | this->setSpacing(5); |
31 | 59 | ||
32 | // Create display | 60 | // Create display |
33 | QVBox *vbxlayout = new QVBox (this); | 61 | QVBox *vbxlayout = new QVBox (this); |
34 | 62 | ||
diff --git a/noncore/tools/euroconv/calcdisplay.h b/noncore/tools/euroconv/calcdisplay.h index d1902cf..a48ab77 100644 --- a/noncore/tools/euroconv/calcdisplay.h +++ b/noncore/tools/euroconv/calcdisplay.h | |||
@@ -14,52 +14,24 @@ | |||
14 | * | 14 | * |
15 | ***************************************************************************/ | 15 | ***************************************************************************/ |
16 | #ifndef CALCDISPLAY_H | 16 | #ifndef CALCDISPLAY_H |
17 | #define CALCDISPLAY_H | 17 | #define CALCDISPLAY_H |
18 | 18 | ||
19 | #include <qhbox.h> | 19 | #include <qhbox.h> |
20 | #include <qlcdnumber.h> | 20 | #include <qlcdnumber.h> |
21 | #include <qhgroupbox.h> | 21 | #include <qhgroupbox.h> |
22 | #include <qpushbutton.h> | 22 | #include <qpushbutton.h> |
23 | #include <qcombobox.h> | 23 | #include <qcombobox.h> |
24 | 24 | ||
25 | 25 | ||
26 | /* XPM */ | ||
27 | static char *swap_xpm[] = { | ||
28 | /* width height num_colors chars_per_pixel */ | ||
29 | " 13 18 2 1", | ||
30 | /* colors */ | ||
31 | ". c None", | ||
32 | "# c #000000", | ||
33 | /* pixels */ | ||
34 | "..#######....", | ||
35 | "..#####......", | ||
36 | "..######.....", | ||
37 | "..#...###....", | ||
38 | "........##...", | ||
39 | ".........##..", | ||
40 | "..........##.", | ||
41 | "...........##", | ||
42 | "...........##", | ||
43 | "...........##", | ||
44 | "...........##", | ||
45 | "..........##.", | ||
46 | ".........##..", | ||
47 | "........##...", | ||
48 | "..#...###....", | ||
49 | "..######.....", | ||
50 | "..#####......", | ||
51 | "..#######....", | ||
52 | }; | ||
53 | |||
54 | 26 | ||
55 | class LCDDisplay : public QHBox{ | 27 | class LCDDisplay : public QHBox{ |
56 | 28 | ||
57 | Q_OBJECT | 29 | Q_OBJECT |
58 | public: | 30 | public: |
59 | LCDDisplay( QWidget *parent=0, const char *name=0 ); | 31 | LCDDisplay( QWidget *parent=0, const char *name=0 ); |
60 | 32 | ||
61 | public slots: | 33 | public slots: |
62 | void setValue(double); | 34 | void setValue(double); |
63 | void swapLCD(void); | 35 | void swapLCD(void); |
64 | void cbbxChange(void); | 36 | void cbbxChange(void); |
65 | 37 | ||
diff --git a/noncore/tools/euroconv/main.cpp b/noncore/tools/euroconv/main.cpp index dd4ff1d..8b417fe 100644 --- a/noncore/tools/euroconv/main.cpp +++ b/noncore/tools/euroconv/main.cpp | |||
@@ -1,39 +1,39 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | * | 2 | * |
3 | * File: main.cpp | 3 | * File: main.cpp |
4 | * | 4 | * |
5 | * Description: main file for OPIE Euroconv aapp | 5 | * Description: main file for OPIE Euroconv aapp |
6 | * | 6 | * |
7 | * | 7 | * |
8 | * Authors: Eric Santonacci <Eric.Santonacci@talc.fr> | 8 | * Authors: Eric Santonacci <Eric.Santonacci@talc.fr> |
9 | * | 9 | * |
10 | * Requirements: Qt | 10 | * Requirements: Qt |
11 | * | 11 | * |
12 | * | 12 | * |
13 | ***************************************************************************/ | 13 | ***************************************************************************/ |
14 | 14 | ||
15 | #include <qpe/qpeapplication.h> | 15 | #include <qpe/qpeapplication.h> |
16 | #include <qvbox.h> | 16 | #include <qvbox.h> |
17 | 17 | ||
18 | #include "calcdisplay.h" | 18 | #include "calcdisplay.h" |
19 | #include "calckeypad.h" | 19 | #include "calckeypad.h" |
20 | 20 | ||
21 | #include <opie2/oapplicationfactory.h> | 21 | #include <opie2/oapplicationfactory.h> |
22 | 22 | ||
23 | struct Layout : QVBox{ | 23 | struct Layout : QVBox{ |
24 | static QString appName() { return QString::fromLatin1("euroconv"); } | 24 | static QString appName() { return QString::fromLatin1("euroconv"); } |
25 | Layout(QWidget *p, const char* n, WFlags) | 25 | Layout(QWidget *p, const char* n, WFlags) |
26 | :QVBox(0,"fond" ) | 26 | :QVBox(0,"fond" ) |
27 | { | 27 | { |
28 | LCDDisplay *lcd = new LCDDisplay(this, "lcd"); | 28 | LCDDisplay *lcd = new LCDDisplay(this, "lcd"); |
29 | KeyPad *num = new KeyPad(lcd, this, "keypad"); | 29 | (void)new KeyPad(lcd, this, "keypad"); |
30 | 30 | ||
31 | setCaption( QObject::tr("Euroconv") ); | 31 | setCaption( QObject::tr("Euroconv") ); |
32 | }; | 32 | }; |
33 | 33 | ||
34 | }; | 34 | }; |
35 | 35 | ||
36 | using namespace Opie::Core; | 36 | using namespace Opie::Core; |
37 | 37 | ||
38 | OPIE_EXPORT_APP( OApplicationFactory<Layout> ) | 38 | OPIE_EXPORT_APP( OApplicationFactory<Layout> ) |
39 | 39 | ||