summaryrefslogtreecommitdiff
path: root/libopie
Unidiff
Diffstat (limited to 'libopie') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/colordialog.cpp56
-rw-r--r--libopie/colordialog.h22
-rw-r--r--libopie/colorpopupmenu.cpp2
3 files changed, 40 insertions, 40 deletions
diff --git a/libopie/colordialog.cpp b/libopie/colordialog.cpp
index 6d72ff6..684d6ea 100644
--- a/libopie/colordialog.cpp
+++ b/libopie/colordialog.cpp
@@ -2,5 +2,5 @@
2** $Id$ 2** $Id$
3** 3**
4** Implementation of QColorDialog class 4** Implementation of OColorDialog class
5** 5**
6** Created : 990222 6** Created : 990222
@@ -477,5 +477,5 @@ QColorShower::QColorShower( QWidget *parent, const char *name )
477 hEd = new QColNumLineEdit( this ); 477 hEd = new QColNumLineEdit( this );
478 hEd->setValidator( val360 ); 478 hEd->setValidator( val360 );
479 QLabel *l = new QLabel( hEd, QColorDialog::tr("Hue:"), this ); 479 QLabel *l = new QLabel( hEd, OColorDialog::tr("Hue:"), this );
480 l->setAlignment( AlignRight|AlignVCenter ); 480 l->setAlignment( AlignRight|AlignVCenter );
481 gl->addWidget( l, 0, 1 ); 481 gl->addWidget( l, 0, 1 );
@@ -484,5 +484,5 @@ QColorShower::QColorShower( QWidget *parent, const char *name )
484 sEd = new QColNumLineEdit( this ); 484 sEd = new QColNumLineEdit( this );
485 sEd->setValidator( val256 ); 485 sEd->setValidator( val256 );
486 l = new QLabel( sEd, QColorDialog::tr("Sat:"), this ); 486 l = new QLabel( sEd, OColorDialog::tr("Sat:"), this );
487 l->setAlignment( AlignRight|AlignVCenter ); 487 l->setAlignment( AlignRight|AlignVCenter );
488 gl->addWidget( l, 1, 1 ); 488 gl->addWidget( l, 1, 1 );
@@ -491,5 +491,5 @@ QColorShower::QColorShower( QWidget *parent, const char *name )
491 vEd = new QColNumLineEdit( this ); 491 vEd = new QColNumLineEdit( this );
492 vEd->setValidator( val256 ); 492 vEd->setValidator( val256 );
493 l = new QLabel( vEd, QColorDialog::tr("Val:"), this ); 493 l = new QLabel( vEd, OColorDialog::tr("Val:"), this );
494 l->setAlignment( AlignRight|AlignVCenter ); 494 l->setAlignment( AlignRight|AlignVCenter );
495 gl->addWidget( l, 2, 1 ); 495 gl->addWidget( l, 2, 1 );
@@ -498,5 +498,5 @@ QColorShower::QColorShower( QWidget *parent, const char *name )
498 rEd = new QColNumLineEdit( this ); 498 rEd = new QColNumLineEdit( this );
499 rEd->setValidator( val256 ); 499 rEd->setValidator( val256 );
500 l = new QLabel( rEd, QColorDialog::tr("Red:"), this ); 500 l = new QLabel( rEd, OColorDialog::tr("Red:"), this );
501 l->setAlignment( AlignRight|AlignVCenter ); 501 l->setAlignment( AlignRight|AlignVCenter );
502 gl->addWidget( l, 0, 3 ); 502 gl->addWidget( l, 0, 3 );
@@ -505,5 +505,5 @@ QColorShower::QColorShower( QWidget *parent, const char *name )
505 gEd = new QColNumLineEdit( this ); 505 gEd = new QColNumLineEdit( this );
506 gEd->setValidator( val256 ); 506 gEd->setValidator( val256 );
507 l = new QLabel( gEd, QColorDialog::tr("Green:"), this ); 507 l = new QLabel( gEd, OColorDialog::tr("Green:"), this );
508 l->setAlignment( AlignRight|AlignVCenter ); 508 l->setAlignment( AlignRight|AlignVCenter );
509 gl->addWidget( l, 1, 3 ); 509 gl->addWidget( l, 1, 3 );
@@ -512,5 +512,5 @@ QColorShower::QColorShower( QWidget *parent, const char *name )
512 bEd = new QColNumLineEdit( this ); 512 bEd = new QColNumLineEdit( this );
513 bEd->setValidator( val256 ); 513 bEd->setValidator( val256 );
514 l = new QLabel( bEd, QColorDialog::tr("Blue:"), this ); 514 l = new QLabel( bEd, OColorDialog::tr("Blue:"), this );
515 l->setAlignment( AlignRight|AlignVCenter ); 515 l->setAlignment( AlignRight|AlignVCenter );
516 gl->addWidget( l, 2, 3 ); 516 gl->addWidget( l, 2, 3 );
@@ -519,5 +519,5 @@ QColorShower::QColorShower( QWidget *parent, const char *name )
519 alphaEd = new QColNumLineEdit( this ); 519 alphaEd = new QColNumLineEdit( this );
520 alphaEd->setValidator( val256 ); 520 alphaEd->setValidator( val256 );
521 alphaLab = new QLabel( alphaEd, QColorDialog::tr("Alpha channel:"), this ); 521 alphaLab = new QLabel( alphaEd, OColorDialog::tr("Alpha channel:"), this );
522 alphaLab->setAlignment( AlignRight|AlignVCenter ); 522 alphaLab->setAlignment( AlignRight|AlignVCenter );
523 gl->addMultiCellWidget( alphaLab, 3, 3, 1, 3 ); 523 gl->addMultiCellWidget( alphaLab, 3, 3, 1, 3 );
@@ -608,9 +608,9 @@ void QColorShower::setHsv( int h, int s, int v )
608} 608}
609 609
610class QColorDialogPrivate : public QObject 610class OColorDialogPrivate : public QObject
611{ 611{
612Q_OBJECT 612Q_OBJECT
613public: 613public:
614 QColorDialogPrivate( QColorDialog *p ); 614 OColorDialogPrivate( OColorDialog *p );
615 QRgb currentColor() const { return cs->currentColor(); } 615 QRgb currentColor() const { return cs->currentColor(); }
616 void setCurrentColor( QRgb rgb ); 616 void setCurrentColor( QRgb rgb );
@@ -630,5 +630,5 @@ private:
630 630
631//sets all widgets to display h,s,v 631//sets all widgets to display h,s,v
632void QColorDialogPrivate::newHsv( int h, int s, int v ) 632void OColorDialogPrivate::newHsv( int h, int s, int v )
633{ 633{
634 cs->setHsv( h, s, v ); 634 cs->setHsv( h, s, v );
@@ -638,5 +638,5 @@ void QColorDialogPrivate::newHsv( int h, int s, int v )
638 638
639//sets all widgets to display rgb 639//sets all widgets to display rgb
640void QColorDialogPrivate::setCurrentColor( QRgb rgb ) 640void OColorDialogPrivate::setCurrentColor( QRgb rgb )
641{ 641{
642 cs->setRgb( rgb ); 642 cs->setRgb( rgb );
@@ -645,5 +645,5 @@ void QColorDialogPrivate::setCurrentColor( QRgb rgb )
645 645
646//sets all widgets exept cs to display rgb 646//sets all widgets exept cs to display rgb
647void QColorDialogPrivate::newColorTypedIn( QRgb rgb ) 647void OColorDialogPrivate::newColorTypedIn( QRgb rgb )
648{ 648{
649 int h, s, v; 649 int h, s, v;
@@ -653,5 +653,5 @@ void QColorDialogPrivate::newColorTypedIn( QRgb rgb )
653} 653}
654 654
655QColorDialogPrivate::QColorDialogPrivate( QColorDialog *dialog ) : 655OColorDialogPrivate::OColorDialogPrivate( OColorDialog *dialog ) :
656 QObject(dialog) 656 QObject(dialog)
657{ 657{
@@ -686,6 +686,6 @@ QColorDialogPrivate::QColorDialogPrivate( QColorDialog *dialog ) :
686// BEING REVISED: jo 686// BEING REVISED: jo
687/*! 687/*!
688 \class QColorDialog qcolordialog.h 688 \class OColorDialog OColorDialog.h
689 \brief The QColorDialog class provides a dialog widget for specifying colors. 689 \brief The OColorDialog class provides a dialog widget for specifying colors.
690 \ingroup dialogs 690 \ingroup dialogs
691 691
@@ -713,8 +713,8 @@ QColorDialogPrivate::QColorDialogPrivate( QColorDialog *dialog ) :
713*/ 713*/
714 714
715QColorDialog::QColorDialog(QWidget* parent, const char* name, bool modal) : 715OColorDialog::OColorDialog(QWidget* parent, const char* name, bool modal) :
716 QDialog(parent, name, modal ) 716 QDialog(parent, name, modal )
717{ 717{
718 d = new QColorDialogPrivate( this ); 718 d = new OColorDialogPrivate( this );
719} 719}
720 720
@@ -727,9 +727,9 @@ QColorDialog::QColorDialog(QWidget* parent, const char* name, bool modal) :
727*/ 727*/
728 728
729QColor QColorDialog::getColor( QColor initial, QWidget *parent, 729QColor OColorDialog::getColor( QColor initial, QWidget *parent,
730 const char *name ) 730 const char *name )
731{ 731{
732 int allocContext = QColor::enterAllocContext(); 732 int allocContext = QColor::enterAllocContext();
733 QColorDialog *dlg = new QColorDialog( parent, name, TRUE ); //modal 733 OColorDialog *dlg = new OColorDialog( parent, name, TRUE ); //modal
734 if ( parent && parent->icon() && !parent->icon()->isNull() ) 734 if ( parent && parent->icon() && !parent->icon()->isNull() )
735 dlg->setIcon( *parent->icon() ); 735 dlg->setIcon( *parent->icon() );
@@ -737,5 +737,5 @@ QColor QColorDialog::getColor( QColor initial, QWidget *parent,
737 dlg->setIcon( *qApp->mainWidget()->icon() ); 737 dlg->setIcon( *qApp->mainWidget()->icon() );
738 738
739 dlg->setCaption( QColorDialog::tr( "Select color" ) ); 739 dlg->setCaption( OColorDialog::tr( "Select color" ) );
740 dlg->setColor( initial ); 740 dlg->setColor( initial );
741 dlg->showMaximized(); 741 dlg->showMaximized();
@@ -764,9 +764,9 @@ QColor QColorDialog::getColor( QColor initial, QWidget *parent,
764*/ 764*/
765 765
766QRgb QColorDialog::getRgba( QRgb initial, bool *ok, 766QRgb OColorDialog::getRgba( QRgb initial, bool *ok,
767 QWidget *parent, const char* name ) 767 QWidget *parent, const char* name )
768{ 768{
769 int allocContext = QColor::enterAllocContext(); 769 int allocContext = QColor::enterAllocContext();
770 QColorDialog *dlg = new QColorDialog( parent, name, TRUE ); //modal 770 OColorDialog *dlg = new OColorDialog( parent, name, TRUE ); //modal
771 dlg->setColor( initial ); 771 dlg->setColor( initial );
772 dlg->setSelectedAlpha( qAlpha(initial) ); 772 dlg->setSelectedAlpha( qAlpha(initial) );
@@ -798,5 +798,5 @@ QRgb QColorDialog::getRgba( QRgb initial, bool *ok,
798*/ 798*/
799 799
800QColor QColorDialog::color() const 800QColor OColorDialog::color() const
801{ 801{
802 return QColor(d->currentColor()); 802 return QColor(d->currentColor());
@@ -808,5 +808,5 @@ QColor QColorDialog::color() const
808*/ 808*/
809 809
810QColorDialog::~QColorDialog() 810OColorDialog::~OColorDialog()
811{ 811{
812 //d inherits QObject, so it is deleted by Qt. 812 //d inherits QObject, so it is deleted by Qt.
@@ -820,5 +820,5 @@ QColorDialog::~QColorDialog()
820*/ 820*/
821 821
822void QColorDialog::setColor( QColor c ) 822void OColorDialog::setColor( QColor c )
823{ 823{
824 d->setCurrentColor( c.rgb() ); 824 d->setCurrentColor( c.rgb() );
@@ -833,5 +833,5 @@ void QColorDialog::setColor( QColor c )
833*/ 833*/
834 834
835void QColorDialog::setSelectedAlpha( int a ) 835void OColorDialog::setSelectedAlpha( int a )
836{ 836{
837 d->showAlpha( TRUE ); 837 d->showAlpha( TRUE );
@@ -844,5 +844,5 @@ void QColorDialog::setSelectedAlpha( int a )
844*/ 844*/
845 845
846int QColorDialog::selectedAlpha() const 846int OColorDialog::selectedAlpha() const
847{ 847{
848 return d->currentAlpha(); 848 return d->currentAlpha();
diff --git a/libopie/colordialog.h b/libopie/colordialog.h
index a2d4d30..474bc61 100644
--- a/libopie/colordialog.h
+++ b/libopie/colordialog.h
@@ -2,5 +2,5 @@
2** $Id$ 2** $Id$
3** 3**
4** Definition of QColorDialog class 4** Definition of OColorDialog class
5** 5**
6** Created : 990222 6** Created : 990222
@@ -36,6 +36,6 @@
36**********************************************************************/ 36**********************************************************************/
37 37
38#ifndef QCOLORDIALOG_H 38#ifndef OColorDialog_H
39#define QCOLORDIALOG_H 39#define OColorDialog_H
40 40
41#ifndef QT_H 41#ifndef QT_H
@@ -43,7 +43,7 @@
43#endif // QT_H 43#endif // QT_H
44 44
45class QColorDialogPrivate; 45class OColorDialogPrivate;
46 46
47class Q_EXPORT QColorDialog : public QDialog 47class Q_EXPORT OColorDialog : public QDialog
48{ 48{
49 Q_OBJECT 49 Q_OBJECT
@@ -55,7 +55,7 @@ public:
55 55
56private: 56private:
57 ~QColorDialog(); 57 ~OColorDialog();
58 58
59 QColorDialog( QWidget* parent=0, const char* name=0, bool modal=FALSE ); 59 OColorDialog( QWidget* parent=0, const char* name=0, bool modal=FALSE );
60 void setColor( QColor ); // ### 3.0: make const QColor& 60 void setColor( QColor ); // ### 3.0: make const QColor&
61 QColor color() const; 61 QColor color() const;
@@ -65,11 +65,11 @@ private:
65 int selectedAlpha() const; 65 int selectedAlpha() const;
66private: 66private:
67 QColorDialogPrivate *d; 67 OColorDialogPrivate *d;
68 friend class QColorDialogPrivate; 68 friend class OColorDialogPrivate;
69 69
70 private:// Disabled copy constructor and operator= 70 private:// Disabled copy constructor and operator=
71#if defined(Q_DISABLE_COPY) 71#if defined(Q_DISABLE_COPY)
72 QColorDialog( const QColorDialog & ); 72 OColorDialog( const OColorDialog & );
73 QColorDialog& operator=( const QColorDialog & ); 73 OColorDialog& operator=( const OColorDialog & );
74#endif 74#endif
75}; 75};
diff --git a/libopie/colorpopupmenu.cpp b/libopie/colorpopupmenu.cpp
index 35e91f4..9b50a8b 100644
--- a/libopie/colorpopupmenu.cpp
+++ b/libopie/colorpopupmenu.cpp
@@ -159,5 +159,5 @@ void ColorPopupMenu::buttonSelected( const QColor& color )
159void ColorPopupMenu::moreColorClicked() 159void ColorPopupMenu::moreColorClicked()
160{ 160{
161 QColor color = QColorDialog::getColor( m_color ); 161 QColor color = OColorDialog::getColor( m_color );
162 m_color = color; 162 m_color = color;
163 emit colorSelected( color ); 163 emit colorSelected( color );