summaryrefslogtreecommitdiff
path: root/libopie2/opieui/oselector.cpp
authorzecke <zecke>2004-03-13 19:51:45 (UTC)
committer zecke <zecke>2004-03-13 19:51:45 (UTC)
commit6d08277737e22b7a1527124623f3571969073ddf (patch) (side-by-side diff)
tree4129e674e21df767b31299e873dd44e33a308e1b /libopie2/opieui/oselector.cpp
parent8e28911f7199f4450ac5eef09482069f9b9caea2 (diff)
downloadopie-6d08277737e22b7a1527124623f3571969073ddf.zip
opie-6d08277737e22b7a1527124623f3571969073ddf.tar.gz
opie-6d08277737e22b7a1527124623f3571969073ddf.tar.bz2
Move XML class to internal PIM
Add namespaces!!! Opie::Core and Opie::Core::Private Opie::Net and Opie::Net::Private Opie::Ui and Opie::Ui::Private Opie::MM and Opie::MM::Private Opie::DB and Opie::DB::Private PIM classes are not yet converted because we will do other work on it as well
Diffstat (limited to 'libopie2/opieui/oselector.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie2/opieui/oselector.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/libopie2/opieui/oselector.cpp b/libopie2/opieui/oselector.cpp
index 23b3ce3..5f6f10f 100644
--- a/libopie2/opieui/oselector.cpp
+++ b/libopie2/opieui/oselector.cpp
@@ -36,6 +36,8 @@
* The contents of the selector are drawn by derived class.
*/
+using namespace Opie::Ui;
+
OXYSelector::OXYSelector( QWidget *parent, const char *name )
: QWidget( parent, name )
{
@@ -73,7 +75,7 @@ void OXYSelector::setValues( int _xPos, int _yPos )
xPos = maxX;
else if ( xPos < minX )
xPos = minX;
-
+
if ( yPos > maxY )
yPos = maxY;
else if ( yPos < minY )
@@ -258,7 +260,7 @@ void OSelector::paintEvent( QPaintEvent * )
}
QPoint pos = calcArrowPos( value() );
- drawArrow( &painter, TRUE, pos );
+ drawArrow( &painter, TRUE, pos );
painter.end();
}
@@ -288,10 +290,10 @@ void OSelector::valueChange()
painter.begin( this );
pos = calcArrowPos( prevValue() );
- drawArrow( &painter, FALSE, pos );
+ drawArrow( &painter, FALSE, pos );
pos = calcArrowPos( value() );
- drawArrow( &painter, TRUE, pos );
+ drawArrow( &painter, TRUE, pos );
painter.end();
}
@@ -361,8 +363,8 @@ void OSelector::drawArrow( QPainter *painter, bool show, const QPoint &pos )
}
painter->drawPolygon( array );
- }
- else
+ }
+ else
{
if ( orientation() == Vertical )
{
@@ -400,7 +402,7 @@ void OGradientSelector::init()
{
color1.setRgb( 0, 0, 0 );
color2.setRgb( 255, 255, 255 );
-
+
text1 = text2 = "";
}
@@ -472,7 +474,7 @@ void OGradientSelector::drawContents( QPainter *painter )
painter->drawText( xPos, yPos, text2 );
yPos = contentsRect().bottom() - painter->fontMetrics().descent() - 2;
- xPos = contentsRect().left() + (contentsRect().width() -
+ xPos = contentsRect().left() + (contentsRect().width() -
painter->fontMetrics().width( text1 )) / 2;
pen.setColor( color1 );
painter->setPen( pen );