-rw-r--r-- | libopie2/opieui/oledbox.cpp | 50 | ||||
-rw-r--r-- | libopie2/opieui/oledbox.h | 53 | ||||
-rw-r--r-- | libopie2/opieui/opieui.pro | 6 |
3 files changed, 81 insertions, 28 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,10 +1,39 @@ - -#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. + +*/ #include "oledbox.h" +/* QT */ +#include <qbitmap.h> +#include <qpainter.h> -#ifdef _QTE_IS_TOO_DUMB_TO_DRAW_AN_ARC +namespace Opie { +namespace Ui { /* XPM */ @@ -42,7 +71,4 @@ static const char * ledborder_xpm[] = { QPixmap *OLedBox::s_border_pix = 0; -#endif - - OLedBox::OLedBox ( const QColor &col, QWidget *parent, const char *name ) : QWidget ( parent, name ) { @@ -55,8 +81,6 @@ OLedBox::OLedBox ( const QColor &col, QWidget *parent, const char *name ) : QWid setBackgroundMode ( PaletteBackground ); -#ifdef _QTE_IS_TOO_DUMB_TO_DRAW_AN_ARC if ( !s_border_pix ) s_border_pix = new QPixmap ( ledborder_xpm ); -#endif } @@ -143,7 +167,5 @@ 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 ) { QPainter paint; @@ -222,5 +244,5 @@ void OLedBox::drawLed ( QPixmap *pix, const QColor &col ) // paint a ROUND SUNK // from the upper left. -#ifdef _QTE_IS_TOO_DUMB_TO_DRAW_AN_ARC +#ifndef QT_CAN_DRAW_ARCS paint. drawPixmap ( 0, 0, *s_border_pix ); paint. end ( ); @@ -276,2 +298,4 @@ void OLedBox::drawLed ( QPixmap *pix, const QColor &col ) // paint a ROUND SUNK } +}; +}; diff --git a/libopie2/opieui/oledbox.h b/libopie2/opieui/oledbox.h index dd930bd..c02cc77 100644 --- a/libopie2/opieui/oledbox.h +++ b/libopie2/opieui/oledbox.h @@ -1,5 +1,35 @@ -#ifndef __OPIE_OLED_H__ -#define __OPIE_OLED_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. + +*/ + +#ifndef OLEDBOX_H +#define OLEDBOX_H + +/* QT */ #include <qwidget.h> #include <qcolor.h> @@ -7,7 +37,9 @@ class QPixmap; -#define _QTE_IS_TOO_DUMB_TO_DRAW_AN_ARC +namespace Opie { +namespace Ui { -class OLedBox : public QWidget { +class OLedBox : public QWidget +{ Q_OBJECT @@ -18,8 +50,6 @@ public: QColor color ( ) const; bool isOn ( ) const; - void setReadOnly( bool R ) - { m_readonly = R; } - inline bool readOnly( void ) const - { return m_readonly; } + void setReadOnly( bool R ) { m_readonly = R; } + bool readOnly( void ) const { return m_readonly; } virtual QSize sizeHint ( ) const; @@ -49,8 +79,7 @@ private: bool m_readonly; -#ifdef _QTE_IS_TOO_DUMB_TO_DRAW_AN_ARC static QPixmap *s_border_pix; -#endif }; - +}; +}; #endif diff --git a/libopie2/opieui/opieui.pro b/libopie2/opieui/opieui.pro index 24157a1..ffa8b83 100644 --- a/libopie2/opieui/opieui.pro +++ b/libopie2/opieui/opieui.pro @@ -7,4 +7,5 @@ HEADERS = oclickablelabel.h \ oimageeffect.h \ okeyconfigwidget.h \ + oledbox.h \ olistview.h \ opixmapeffect.h \ @@ -16,5 +17,4 @@ HEADERS = oclickablelabel.h \ otabbar.h \ otabwidget.h \ - oledbox.h \ otaskbarapplet.h \ otimepicker.h \ @@ -28,4 +28,5 @@ SOURCES = oclickablelabel.cpp \ oimageeffect.cpp \ okeyconfigwidget.cpp \ + oledbox.cpp \ olistview.cpp \ opixmapeffect.cpp \ @@ -36,5 +37,4 @@ SOURCES = oclickablelabel.cpp \ otabbar.cpp \ otabwidget.cpp \ - oledbox.cpp \ otaskbarapplet.cpp \ otimepicker.cpp \ @@ -49,5 +49,5 @@ INTERFACES = otimepickerbase.ui TARGET = opieui2 -VERSION = 1.8.5 +VERSION = 1.9.0 INCLUDEPATH += $(OPIEDIR)/include |