-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,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 } @@ -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,3 +245,3 @@ void OLedBox::drawLed ( QPixmap *pix, const QColor &col ) // paint a ROUND SUNK -#ifdef _QTE_IS_TOO_DUMB_TO_DRAW_AN_ARC +#ifndef QT_CAN_DRAW_ARCS paint. drawPixmap ( 0, 0, *s_border_pix ); @@ -277 +299,3 @@ 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,4 +1,34 @@ -#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> @@ -8,5 +38,7 @@ 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 @@ -19,6 +51,4 @@ public: 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; } @@ -50,7 +80,6 @@ private: -#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 @@ -8,2 +8,3 @@ HEADERS = oclickablelabel.h \ okeyconfigwidget.h \ + oledbox.h \ olistview.h \ @@ -17,3 +18,2 @@ HEADERS = oclickablelabel.h \ otabwidget.h \ - oledbox.h \ otaskbarapplet.h \ @@ -29,2 +29,3 @@ SOURCES = oclickablelabel.cpp \ okeyconfigwidget.cpp \ + oledbox.cpp \ olistview.cpp \ @@ -37,3 +38,2 @@ SOURCES = oclickablelabel.cpp \ otabwidget.cpp \ - oledbox.cpp \ otaskbarapplet.cpp \ @@ -50,3 +50,3 @@ INTERFACES = otimepickerbase.ui TARGET = opieui2 -VERSION = 1.8.5 +VERSION = 1.9.0 |