author | drw <drw> | 2002-04-30 01:09:14 (UTC) |
---|---|---|
committer | drw <drw> | 2002-04-30 01:09:14 (UTC) |
commit | ed745f7e21eb32fbf5d9a3f1734d79b25cfa629c (patch) (unidiff) | |
tree | b91b936b12d1d25a813858b76a62e023d8ac2d23 | |
parent | b794af4c50efffe239c94e5a015e90565ff991c3 (diff) | |
download | opie-ed745f7e21eb32fbf5d9a3f1734d79b25cfa629c.zip opie-ed745f7e21eb32fbf5d9a3f1734d79b25cfa629c.tar.gz opie-ed745f7e21eb32fbf5d9a3f1734d79b25cfa629c.tar.bz2 |
Renamed QColorDialog to OColorDialog
-rw-r--r-- | libopie/colordialog.cpp | 56 | ||||
-rw-r--r-- | libopie/colordialog.h | 22 | ||||
-rw-r--r-- | libopie/colorpopupmenu.cpp | 2 |
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 | |||
@@ -1,7 +1,7 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | 2 | ** $Id$ |
3 | ** | 3 | ** |
4 | ** Implementation of QColorDialog class | 4 | ** Implementation of OColorDialog class |
5 | ** | 5 | ** |
6 | ** Created : 990222 | 6 | ** Created : 990222 |
7 | ** | 7 | ** |
@@ -476,49 +476,49 @@ QColorShower::QColorShower( QWidget *parent, const char *name ) | |||
476 | 476 | ||
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 ); |
482 | gl->addWidget( hEd, 0, 2 ); | 482 | gl->addWidget( hEd, 0, 2 ); |
483 | 483 | ||
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 ); |
489 | gl->addWidget( sEd, 1, 2 ); | 489 | gl->addWidget( sEd, 1, 2 ); |
490 | 490 | ||
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 ); |
496 | gl->addWidget( vEd, 2, 2 ); | 496 | gl->addWidget( vEd, 2, 2 ); |
497 | 497 | ||
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 ); |
503 | gl->addWidget( rEd, 0, 4 ); | 503 | gl->addWidget( rEd, 0, 4 ); |
504 | 504 | ||
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 ); |
510 | gl->addWidget( gEd, 1, 4 ); | 510 | gl->addWidget( gEd, 1, 4 ); |
511 | 511 | ||
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 ); |
517 | gl->addWidget( bEd, 2, 4 ); | 517 | gl->addWidget( bEd, 2, 4 ); |
518 | 518 | ||
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 ); |
524 | gl->addWidget( alphaEd, 3, 4 ); | 524 | gl->addWidget( alphaEd, 3, 4 ); |
@@ -607,11 +607,11 @@ void QColorShower::setHsv( int h, int s, int v ) | |||
607 | showCurrentColor(); | 607 | showCurrentColor(); |
608 | } | 608 | } |
609 | 609 | ||
610 | class QColorDialogPrivate : public QObject | 610 | class OColorDialogPrivate : public QObject |
611 | { | 611 | { |
612 | Q_OBJECT | 612 | Q_OBJECT |
613 | public: | 613 | public: |
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 ); |
617 | 617 | ||
@@ -629,7 +629,7 @@ private: | |||
629 | }; | 629 | }; |
630 | 630 | ||
631 | //sets all widgets to display h,s,v | 631 | //sets all widgets to display h,s,v |
632 | void QColorDialogPrivate::newHsv( int h, int s, int v ) | 632 | void OColorDialogPrivate::newHsv( int h, int s, int v ) |
633 | { | 633 | { |
634 | cs->setHsv( h, s, v ); | 634 | cs->setHsv( h, s, v ); |
635 | cp->setCol( h, s ); | 635 | cp->setCol( h, s ); |
@@ -637,14 +637,14 @@ void QColorDialogPrivate::newHsv( int h, int s, int v ) | |||
637 | } | 637 | } |
638 | 638 | ||
639 | //sets all widgets to display rgb | 639 | //sets all widgets to display rgb |
640 | void QColorDialogPrivate::setCurrentColor( QRgb rgb ) | 640 | void OColorDialogPrivate::setCurrentColor( QRgb rgb ) |
641 | { | 641 | { |
642 | cs->setRgb( rgb ); | 642 | cs->setRgb( rgb ); |
643 | newColorTypedIn( rgb ); | 643 | newColorTypedIn( rgb ); |
644 | } | 644 | } |
645 | 645 | ||
646 | //sets all widgets exept cs to display rgb | 646 | //sets all widgets exept cs to display rgb |
647 | void QColorDialogPrivate::newColorTypedIn( QRgb rgb ) | 647 | void OColorDialogPrivate::newColorTypedIn( QRgb rgb ) |
648 | { | 648 | { |
649 | int h, s, v; | 649 | int h, s, v; |
650 | rgb2hsv(rgb, h, s, v ); | 650 | rgb2hsv(rgb, h, s, v ); |
@@ -652,7 +652,7 @@ void QColorDialogPrivate::newColorTypedIn( QRgb rgb ) | |||
652 | lp->setCol( h, s, v); | 652 | lp->setCol( h, s, v); |
653 | } | 653 | } |
654 | 654 | ||
655 | QColorDialogPrivate::QColorDialogPrivate( QColorDialog *dialog ) : | 655 | OColorDialogPrivate::OColorDialogPrivate( OColorDialog *dialog ) : |
656 | QObject(dialog) | 656 | QObject(dialog) |
657 | { | 657 | { |
658 | int border = 2; | 658 | int border = 2; |
@@ -685,8 +685,8 @@ QColorDialogPrivate::QColorDialogPrivate( QColorDialog *dialog ) : | |||
685 | 685 | ||
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 | ||
692 | The color dialog's function is to allow users to choose colors - | 692 | The color dialog's function is to allow users to choose colors - |
@@ -712,10 +712,10 @@ QColorDialogPrivate::QColorDialogPrivate( QColorDialog *dialog ) : | |||
712 | \sa getColor() | 712 | \sa getColor() |
713 | */ | 713 | */ |
714 | 714 | ||
715 | QColorDialog::QColorDialog(QWidget* parent, const char* name, bool modal) : | 715 | OColorDialog::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 | ||
721 | 721 | ||
@@ -726,17 +726,17 @@ QColorDialog::QColorDialog(QWidget* parent, const char* name, bool modal) : | |||
726 | before this function returns. | 726 | before this function returns. |
727 | */ | 727 | */ |
728 | 728 | ||
729 | QColor QColorDialog::getColor( QColor initial, QWidget *parent, | 729 | QColor 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() ); |
736 | else if ( qApp->mainWidget() && qApp->mainWidget()->icon() && !qApp->mainWidget()->icon()->isNull() ) | 736 | else if ( qApp->mainWidget() && qApp->mainWidget()->icon() && !qApp->mainWidget()->icon()->isNull() ) |
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(); |
742 | int resultCode = dlg->exec(); | 742 | int resultCode = dlg->exec(); |
@@ -763,11 +763,11 @@ QColor QColorDialog::getColor( QColor initial, QWidget *parent, | |||
763 | If the user clicks Cancel the \a initial value is returned. | 763 | If the user clicks Cancel the \a initial value is returned. |
764 | */ | 764 | */ |
765 | 765 | ||
766 | QRgb QColorDialog::getRgba( QRgb initial, bool *ok, | 766 | QRgb 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) ); |
773 | dlg->showMaximized(); | 773 | dlg->showMaximized(); |
@@ -797,7 +797,7 @@ QRgb QColorDialog::getRgba( QRgb initial, bool *ok, | |||
797 | \sa setColor() | 797 | \sa setColor() |
798 | */ | 798 | */ |
799 | 799 | ||
800 | QColor QColorDialog::color() const | 800 | QColor OColorDialog::color() const |
801 | { | 801 | { |
802 | return QColor(d->currentColor()); | 802 | return QColor(d->currentColor()); |
803 | } | 803 | } |
@@ -807,7 +807,7 @@ QColor QColorDialog::color() const | |||
807 | 807 | ||
808 | */ | 808 | */ |
809 | 809 | ||
810 | QColorDialog::~QColorDialog() | 810 | OColorDialog::~OColorDialog() |
811 | { | 811 | { |
812 | //d inherits QObject, so it is deleted by Qt. | 812 | //d inherits QObject, so it is deleted by Qt. |
813 | } | 813 | } |
@@ -819,7 +819,7 @@ QColorDialog::~QColorDialog() | |||
819 | \sa color() | 819 | \sa color() |
820 | */ | 820 | */ |
821 | 821 | ||
822 | void QColorDialog::setColor( QColor c ) | 822 | void OColorDialog::setColor( QColor c ) |
823 | { | 823 | { |
824 | d->setCurrentColor( c.rgb() ); | 824 | d->setCurrentColor( c.rgb() ); |
825 | } | 825 | } |
@@ -832,7 +832,7 @@ void QColorDialog::setColor( QColor c ) | |||
832 | entry box. | 832 | entry box. |
833 | */ | 833 | */ |
834 | 834 | ||
835 | void QColorDialog::setSelectedAlpha( int a ) | 835 | void OColorDialog::setSelectedAlpha( int a ) |
836 | { | 836 | { |
837 | d->showAlpha( TRUE ); | 837 | d->showAlpha( TRUE ); |
838 | d->setCurrentAlpha( a ); | 838 | d->setCurrentAlpha( a ); |
@@ -843,7 +843,7 @@ void QColorDialog::setSelectedAlpha( int a ) | |||
843 | Returns the value selected for the alpha channel. | 843 | Returns the value selected for the alpha channel. |
844 | */ | 844 | */ |
845 | 845 | ||
846 | int QColorDialog::selectedAlpha() const | 846 | int OColorDialog::selectedAlpha() const |
847 | { | 847 | { |
848 | return d->currentAlpha(); | 848 | return d->currentAlpha(); |
849 | } | 849 | } |
diff --git a/libopie/colordialog.h b/libopie/colordialog.h index a2d4d30..474bc61 100644 --- a/libopie/colordialog.h +++ b/libopie/colordialog.h | |||
@@ -1,7 +1,7 @@ | |||
1 | /**************************************************************************** | 1 | /**************************************************************************** |
2 | ** $Id$ | 2 | ** $Id$ |
3 | ** | 3 | ** |
4 | ** Definition of QColorDialog class | 4 | ** Definition of OColorDialog class |
5 | ** | 5 | ** |
6 | ** Created : 990222 | 6 | ** Created : 990222 |
7 | ** | 7 | ** |
@@ -35,16 +35,16 @@ | |||
35 | ** | 35 | ** |
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 |
42 | #include <qdialog.h> | 42 | #include <qdialog.h> |
43 | #endif // QT_H | 43 | #endif // QT_H |
44 | 44 | ||
45 | class QColorDialogPrivate; | 45 | class OColorDialogPrivate; |
46 | 46 | ||
47 | class Q_EXPORT QColorDialog : public QDialog | 47 | class Q_EXPORT OColorDialog : public QDialog |
48 | { | 48 | { |
49 | Q_OBJECT | 49 | Q_OBJECT |
50 | 50 | ||
@@ -54,9 +54,9 @@ public: | |||
54 | QWidget *parent=0, const char* name=0 ); | 54 | QWidget *parent=0, const char* name=0 ); |
55 | 55 | ||
56 | private: | 56 | private: |
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; |
62 | 62 | ||
@@ -64,13 +64,13 @@ private: | |||
64 | void setSelectedAlpha( int ); | 64 | void setSelectedAlpha( int ); |
65 | int selectedAlpha() const; | 65 | int selectedAlpha() const; |
66 | private: | 66 | private: |
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 | }; |
76 | 76 | ||
diff --git a/libopie/colorpopupmenu.cpp b/libopie/colorpopupmenu.cpp index 35e91f4..9b50a8b 100644 --- a/libopie/colorpopupmenu.cpp +++ b/libopie/colorpopupmenu.cpp | |||
@@ -158,7 +158,7 @@ void ColorPopupMenu::buttonSelected( const QColor& color ) | |||
158 | 158 | ||
159 | void ColorPopupMenu::moreColorClicked() | 159 | void 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 ); |
164 | hide(); | 164 | hide(); |