-rw-r--r-- | libopie/colordialog.cpp | 17 |
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 ) } +/* + * avoid clashes with the original Qt + */ +namespace { + class QColorPicker : public QFrame { @@ -608,4 +613,6 @@ void QColorShower::setHsv( int h, int s, int v ) } +} + class OColorDialogPrivate : public QObject { @@ -614,5 +621,5 @@ public: OColorDialogPrivate( OColorDialog *p ); QRgb currentColor() const { return cs->currentColor(); } - void setCurrentColor( QRgb rgb ); + void setCurrentColor( const QRgb& rgb ); int currentAlpha() const { return cs->currentAlpha(); } @@ -638,5 +645,5 @@ void OColorDialogPrivate::newHsv( int h, int s, int v ) //sets all widgets to display rgb -void OColorDialogPrivate::setCurrentColor( QRgb rgb ) +void OColorDialogPrivate::setCurrentColor( const QRgb& rgb ) { cs->setRgb( rgb ); @@ -727,5 +734,5 @@ OColorDialog::OColorDialog(QWidget* parent, const char* name, bool modal) : */ -QColor OColorDialog::getColor( QColor initial, QWidget *parent, +QColor OColorDialog::getColor( const QColor& initial, QWidget *parent, const char *name ) { @@ -764,5 +771,5 @@ QColor OColorDialog::getColor( QColor initial, QWidget *parent, */ -QRgb OColorDialog::getRgba( QRgb initial, bool *ok, +QRgb OColorDialog::getRgba( const QRgb& initial, bool *ok, QWidget *parent, const char* name ) { @@ -820,5 +827,5 @@ OColorDialog::~OColorDialog() */ -void OColorDialog::setColor( QColor c ) +void OColorDialog::setColor( const QColor& c ) { d->setCurrentColor( c.rgb() ); |