summaryrefslogtreecommitdiff
authordrw <drw>2005-03-12 00:45:16 (UTC)
committer drw <drw>2005-03-12 00:45:16 (UTC)
commitc7cda5d104efd75ab608384215e40a541697392e (patch) (side-by-side diff)
tree61a9bfc37121a614b49c2941b28f929c6a3132df
parent31f314346f44706bebf998c58aae8cfe50cba6cf (diff)
downloadopie-c7cda5d104efd75ab608384215e40a541697392e.zip
opie-c7cda5d104efd75ab608384215e40a541697392e.tar.gz
opie-c7cda5d104efd75ab608384215e40a541697392e.tar.bz2
Fix OColorButton so it does not emit a colorSelected signal inside of resizeEvent
Diffstat (more/less context) (show whitespace changes)
-rw-r--r--libqtaux/ocolorbutton.cpp48
-rw-r--r--libqtaux/ocolorbutton.h40
2 files changed, 48 insertions, 40 deletions
diff --git a/libqtaux/ocolorbutton.cpp b/libqtaux/ocolorbutton.cpp
index 004fafc..2a87be9 100644
--- a/libqtaux/ocolorbutton.cpp
+++ b/libqtaux/ocolorbutton.cpp
@@ -4,23 +4,23 @@
=. Copyright (C) The Opie Team <opie-devel@handhelds.org>
.=l.
-           .>+-=
- _;:,     .>    :=|. This program is free software; you can
-.> <`_,   >  .   <= redistribute it and/or modify it under
-:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
-.="- .-=="i,     .._ License as published by the Free Software
- - .   .-<_>     .<> Foundation; either version 2 of the License,
-     ._= =}       : or (at your option) any later version.
-    .%`+i>       _;_.
-    .i_,=:_.      -<s. This program is distributed in the hope that
-     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
-    : ..    .:,     . . . without even the implied warranty of
-    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
-  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
-..}^=.=       =       ; Library General Public License for more
-++=   -.     .`     .: details.
- :     =  ...= . :.=-
- -.   .:....=;==+<; You should have received a copy of the GNU
-  -_. . .   )=.  = Library General Public License along with
-    --        :-=` this library; see the file COPYING.LIB.
+ .>+-=
+_;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+- . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+: = ...= . :.=-
+-. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
@@ -92,5 +92,5 @@ QColor OColorButton::color ( ) const
void OColorButton::setColor ( const QColor &c )
{
- updateColor ( c );
+ updateColor ( c, true );
}
@@ -100,4 +100,9 @@ void OColorButton::setColor ( const QColor &c )
void OColorButton::updateColor ( const QColor &c )
{
+ updateColor( c, true );
+}
+
+void OColorButton::updateColor ( const QColor &c, bool sendSignal )
+{
d-> m_color = c;
@@ -144,4 +149,5 @@ void OColorButton::updateColor ( const QColor &c )
setPixmap ( pix );
+ if ( sendSignal )
emit colorSelected ( c );
}
@@ -153,4 +159,4 @@ void OColorButton::updateColor ( const QColor &c )
void OColorButton::resizeEvent( QResizeEvent *ev ) {
QPushButton::resizeEvent( ev );
- updateColor(d->m_color);
+ updateColor( d->m_color, false );
}
diff --git a/libqtaux/ocolorbutton.h b/libqtaux/ocolorbutton.h
index 10b77d5..4845c0d 100644
--- a/libqtaux/ocolorbutton.h
+++ b/libqtaux/ocolorbutton.h
@@ -4,23 +4,23 @@
=. Copyright (C) The Opie Team <opie-devel@handhelds.org>
.=l.
-           .>+-=
- _;:,     .>    :=|. This program is free software; you can
-.> <`_,   >  .   <= redistribute it and/or modify it under
-:`=1 )Y*s>-.--   : the terms of the GNU Library General Public
-.="- .-=="i,     .._ License as published by the Free Software
- - .   .-<_>     .<> Foundation; either version 2 of the License,
-     ._= =}       : or (at your option) any later version.
-    .%`+i>       _;_.
-    .i_,=:_.      -<s. This program is distributed in the hope that
-     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
-    : ..    .:,     . . . without even the implied warranty of
-    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
-  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
-..}^=.=       =       ; Library General Public License for more
-++=   -.     .`     .: details.
- :     =  ...= . :.=-
- -.   .:....=;==+<; You should have received a copy of the GNU
-  -_. . .   )=.  = Library General Public License along with
-    --        :-=` this library; see the file COPYING.LIB.
+ .>+-=
+_;:, .> :=|. This program is free software; you can
+.> <`_, > . <= redistribute it and/or modify it under
+:`=1 )Y*s>-.-- : the terms of the GNU Library General Public
+.="- .-=="i, .._ License as published by the Free Software
+- . .-<_> .<> Foundation; either version 2 of the License,
+ ._= =} : or (at your option) any later version.
+ .%`+i> _;_.
+ .i_,=:_. -<s. This program is distributed in the hope that
+ + . -:. = it will be useful, but WITHOUT ANY WARRANTY;
+ : .. .:, . . . without even the implied warranty of
+ =_ + =;=|` MERCHANTABILITY or FITNESS FOR A
+ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU
+..}^=.= = ; Library General Public License for more
+++= -. .` .: details.
+: = ...= . :.=-
+-. .:....=;==+<; You should have received a copy of the GNU
+ -_. . . )=. = Library General Public License along with
+ -- :-=` this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
@@ -76,4 +76,6 @@ protected slots:
private:
OColorButtonPrivate *d;
+
+ void updateColor ( const QColor &, bool sendSignal = true );
};