-rw-r--r-- | libopie2/opieui/oledbox.cpp | 58 |
1 files changed, 41 insertions, 17 deletions
diff --git a/libopie2/opieui/oledbox.cpp b/libopie2/opieui/oledbox.cpp index 52826f1..d18d4b6 100644 --- a/libopie2/opieui/oledbox.cpp +++ b/libopie2/opieui/oledbox.cpp @@ -1,4 +1,29 @@ - -#include <qbitmap.h> -#include <qpainter.h> +/* + This file is part of the Opie Project + =. (C) 2002-2005 the Opie Team <opie-devel@handhelds.org> + .=l. + .>+-= + _;:, .> :=|. This program is free software; you can +.> <`_, > . <= redistribute it and/or modify it under +:`=1 )Y*s>-.-- : the terms of the GNU Library General Public +.="- .-=="i, .._ License as published by the Free Software + - . .-<_> .<> Foundation; either version 2 of the License, + ._= =} : or (at your option) any later version. + .%`+i> _;_. + .i_,=:_. -<s. This program is distributed in the hope that + + . -:. = it will be useful, but WITHOUT ANY WARRANTY; + : .. .:, . . . without even the implied warranty of + =_ + =;=|` MERCHANTABILITY or FITNESS FOR A + _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU +..}^=.= = ; Library General Public License for more +++= -. .` .: details. + : = ...= . :.=- + -. .:....=;==+<; You should have received a copy of the GNU + -_. . . )=. = Library General Public License along with + -- :-=` this library; see the file COPYING.LIB. + If not, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. + +*/ @@ -6,4 +31,8 @@ +/* QT */ +#include <qbitmap.h> +#include <qpainter.h> -#ifdef _QTE_IS_TOO_DUMB_TO_DRAW_AN_ARC +namespace Opie { +namespace Ui { @@ -43,5 +72,2 @@ QPixmap *OLedBox::s_border_pix = 0; -#endif - - OLedBox::OLedBox ( const QColor &col, QWidget *parent, const char *name ) : QWidget ( parent, name ) @@ -56,6 +82,4 @@ OLedBox::OLedBox ( const QColor &col, QWidget *parent, const char *name ) : QWid -#ifdef _QTE_IS_TOO_DUMB_TO_DRAW_AN_ARC if ( !s_border_pix ) - s_border_pix = new QPixmap ( ledborder_xpm ); -#endif + s_border_pix = new QPixmap( ledborder_xpm ); } @@ -144,5 +168,3 @@ void OLedBox::paintEvent ( QPaintEvent *e ) -// From KDE libkdeui / led.cpp - -void OLedBox::drawLed ( QPixmap *pix, const QColor &col ) // paint a ROUND SUNKEN led lamp +void OLedBox::drawLed ( QPixmap *pix, const QColor &col ) { @@ -223,7 +245,7 @@ void OLedBox::drawLed ( QPixmap *pix, const QColor &col ) // paint a ROUND SUNK -#ifdef _QTE_IS_TOO_DUMB_TO_DRAW_AN_ARC - paint. drawPixmap ( 0, 0, *s_border_pix ); - paint. end ( ); +#ifndef QT_CAN_DRAW_ARCS + paint.drawPixmap ( 0, 0, *s_border_pix ); + paint.end ( ); - pix-> setMask ( pix-> createHeuristicMask ( )); + pix->setMask ( pix-> createHeuristicMask ( )); @@ -277 +299,3 @@ void OLedBox::drawLed ( QPixmap *pix, const QColor &col ) // paint a ROUND SUNK +}; +}; |