-rw-r--r-- | noncore/tools/calculator/calculatorimpl.cpp | 73 |
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 @@ -24,2 +24,3 @@ */ +// Sat 03-09-2002 L.J. Potter added the inlined pixmaps here @@ -41,2 +42,59 @@ #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 */ +"......#.#", +"......#.#", +"......###", +"#...#...#", +".#.#..###", +"..#......", +".#.#.....", +"#...#...." +}; @@ -46,5 +104,5 @@ CalculatorImpl::CalculatorImpl( QWidget * parent, const char * name, { - xtopowerofy = Resource::loadPixmap("xtopowerofy"); - ythrootofx = Resource::loadPixmap("ythrootofx"); - oneoverx = Resource::loadPixmap("oneoverx"); +// xtopowerofy = Resource::loadPixmap("xtopowerofy"); +// ythrootofx = Resource::loadPixmap("ythrootofx"); +// oneoverx = Resource::loadPixmap("oneoverx"); @@ -291,10 +349,13 @@ 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); } |