summaryrefslogtreecommitdiff
authorllornkcor <llornkcor>2002-03-09 21:46:21 (UTC)
committer llornkcor <llornkcor>2002-03-09 21:46:21 (UTC)
commit80be7dabb1e1390e4d412c785d9f44e2293b2d5d (patch) (side-by-side diff)
tree04daeda225b3be914885adaf6c46cf3b83ce123c
parent53fd2f87c62cf60e8326110f11838661d0521b63 (diff)
downloadopie-80be7dabb1e1390e4d412c785d9f44e2293b2d5d.zip
opie-80be7dabb1e1390e4d412c785d9f44e2293b2d5d.tar.gz
opie-80be7dabb1e1390e4d412c785d9f44e2293b2d5d.tar.bz2
fixed weirdness with the inlined xpm's- for some odd and unknown reason
they weren't showing correctly anymore...
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--noncore/tools/calculator/calculatorimpl.cpp73
1 files changed, 67 insertions, 6 deletions
diff --git a/noncore/tools/calculator/calculatorimpl.cpp b/noncore/tools/calculator/calculatorimpl.cpp
index 3a6efe4..0925073 100644
--- a/noncore/tools/calculator/calculatorimpl.cpp
+++ b/noncore/tools/calculator/calculatorimpl.cpp
@@ -21,8 +21,9 @@
/*
* 01/14/2002 Charles-Edouard Ruault <ce@ruault.com>
* Added support for Temperature conversions.
*/
+// Sat 03-09-2002 L.J. Potter added the inlined pixmaps here
#include "calculatorimpl.h"
#include <qpe/resource.h>
@@ -38,16 +39,73 @@
#include <qfile.h>
#include <qtextstream.h>
#include <qmessagebox.h>
#include <math.h>
+/* XPM */
+static char *oneoverx_xpm[] = {
+/* width height num_colors chars_per_pixel */
+" 13 11 2 1",
+/* colors */
+". c None",
+"# c #000000",
+/* pixels */
+"......#......",
+".....##......",
+"......#......"
+".....###.....",
+".............",
+"..#########..",
+".............",
+"....##.##....",
+"......#......",
+"......#......",
+"....##.##....",
+};
+/* XPM */
+static char *ythrootofx_xpm[] = {
+/* width height num_colors chars_per_pixel */
+" 13 11 2 1",
+/* colors */
+". c None",
+"# c #000000",
+/* pixels */
+"#.#..........",
+"#.#..........",
+"###...#######",
+"..#..#.......",
+"###..#.......",
+".....#.#...#.",
+".#..#...#.#..",
+"#.#.#....#...",
+"..#.#...#.#..",
+"...#...#...#.",
+"...#........."
+};
+/* XPM */
+static char *xtopowerofy_xpm[] = {
+/* width height num_colors chars_per_pixel */
+" 9 8 2 1",
+/* colors */
+". c None",
+"# c #000000",
+/* pixels */
+"......#.#",
+"......#.#",
+"......###",
+"#...#...#",
+".#.#..###",
+"..#......",
+".#.#.....",
+"#...#...."
+};
CalculatorImpl::CalculatorImpl( QWidget * parent, const char * name,
WFlags f )
: Calculator( parent, name, f )
{
- xtopowerofy = Resource::loadPixmap("xtopowerofy");
- ythrootofx = Resource::loadPixmap("ythrootofx");
- oneoverx = Resource::loadPixmap("oneoverx");
+// xtopowerofy = Resource::loadPixmap("xtopowerofy");
+// ythrootofx = Resource::loadPixmap("ythrootofx");
+// oneoverx = Resource::loadPixmap("oneoverx");
memMark = new QLabel( "m", LCD );
memMark->setFont( QFont( "helvetica", 12, QFont::Bold, TRUE ) );
memMark->resize( 12, 12 );
@@ -288,16 +346,19 @@ void CalculatorImpl::function_button(int mode){
}
}
void CalculatorImpl::display_pixmap_faces() {
+ QPixmap image0( ( const char** ) xtopowerofy_xpm);
QPushButton* tmpbutton = func_buttons[5];
- tmpbutton->setPixmap(xtopowerofy);
+ tmpbutton->setPixmap(image0);
+ QPixmap image1( ( const char** ) ythrootofx_xpm);
tmpbutton = func_buttons[6];
- tmpbutton->setPixmap(ythrootofx);
+ tmpbutton->setPixmap(image1);
+ QPixmap image2( ( const char** ) oneoverx_xpm);
tmpbutton = func_buttons[3];
- tmpbutton->setPixmap(oneoverx);
+ tmpbutton->setPixmap(image2);
}
void CalculatorImpl::clear() {
acc = num = 0;