summaryrefslogtreecommitdiff
path: root/libopie/colordialog.cpp
Unidiff
Diffstat (limited to 'libopie/colordialog.cpp') (more/less context) (show whitespace changes)
-rw-r--r--libopie/colordialog.cpp17
1 files changed, 12 insertions, 5 deletions
diff --git a/libopie/colordialog.cpp b/libopie/colordialog.cpp
index 684d6ea..35f15d6 100644
--- a/libopie/colordialog.cpp
+++ b/libopie/colordialog.cpp
@@ -58,4 +58,9 @@ static inline void rgb2hsv( QRgb rgb, int&h, int&s, int&v )
58} 58}
59 59
60/*
61 * avoid clashes with the original Qt
62 */
63namespace {
64
60class QColorPicker : public QFrame 65class QColorPicker : public QFrame
61{ 66{
@@ -608,4 +613,6 @@ void QColorShower::setHsv( int h, int s, int v )
608} 613}
609 614
615}
616
610class OColorDialogPrivate : public QObject 617class OColorDialogPrivate : public QObject
611{ 618{
@@ -614,5 +621,5 @@ public:
614 OColorDialogPrivate( OColorDialog *p ); 621 OColorDialogPrivate( OColorDialog *p );
615 QRgb currentColor() const { return cs->currentColor(); } 622 QRgb currentColor() const { return cs->currentColor(); }
616 void setCurrentColor( QRgb rgb ); 623 void setCurrentColor( const QRgb& rgb );
617 624
618 int currentAlpha() const { return cs->currentAlpha(); } 625 int currentAlpha() const { return cs->currentAlpha(); }
@@ -638,5 +645,5 @@ void OColorDialogPrivate::newHsv( int h, int s, int v )
638 645
639//sets all widgets to display rgb 646//sets all widgets to display rgb
640void OColorDialogPrivate::setCurrentColor( QRgb rgb ) 647void OColorDialogPrivate::setCurrentColor( const QRgb& rgb )
641{ 648{
642 cs->setRgb( rgb ); 649 cs->setRgb( rgb );
@@ -727,5 +734,5 @@ OColorDialog::OColorDialog(QWidget* parent, const char* name, bool modal) :
727*/ 734*/
728 735
729QColor OColorDialog::getColor( QColor initial, QWidget *parent, 736QColor OColorDialog::getColor( const QColor& initial, QWidget *parent,
730 const char *name ) 737 const char *name )
731{ 738{
@@ -764,5 +771,5 @@ QColor OColorDialog::getColor( QColor initial, QWidget *parent,
764*/ 771*/
765 772
766QRgb OColorDialog::getRgba( QRgb initial, bool *ok, 773QRgb OColorDialog::getRgba( const QRgb& initial, bool *ok,
767 QWidget *parent, const char* name ) 774 QWidget *parent, const char* name )
768{ 775{
@@ -820,5 +827,5 @@ OColorDialog::~OColorDialog()
820*/ 827*/
821 828
822void OColorDialog::setColor( QColor c ) 829void OColorDialog::setColor( const QColor& c )
823{ 830{
824 d->setCurrentColor( c.rgb() ); 831 d->setCurrentColor( c.rgb() );