author | drw <drw> | 2005-03-12 00:45:16 (UTC) |
---|---|---|
committer | drw <drw> | 2005-03-12 00:45:16 (UTC) |
commit | c7cda5d104efd75ab608384215e40a541697392e (patch) (unidiff) | |
tree | 61a9bfc37121a614b49c2941b28f929c6a3132df /libqtaux | |
parent | 31f314346f44706bebf998c58aae8cfe50cba6cf (diff) | |
download | opie-c7cda5d104efd75ab608384215e40a541697392e.zip opie-c7cda5d104efd75ab608384215e40a541697392e.tar.gz opie-c7cda5d104efd75ab608384215e40a541697392e.tar.bz2 |
Fix OColorButton so it does not emit a colorSelected signal inside of resizeEvent
-rw-r--r-- | libqtaux/ocolorbutton.cpp | 50 | ||||
-rw-r--r-- | libqtaux/ocolorbutton.h | 44 |
2 files changed, 51 insertions, 43 deletions
diff --git a/libqtaux/ocolorbutton.cpp b/libqtaux/ocolorbutton.cpp index 004fafc..2a87be9 100644 --- a/libqtaux/ocolorbutton.cpp +++ b/libqtaux/ocolorbutton.cpp | |||
@@ -5,21 +5,21 @@ | |||
5 | .=l. | 5 | .=l. |
6 | .>+-= | 6 | .>+-= |
7 | _;:, .> :=|. This program is free software; you can | 7 | _;:, .> :=|. This program is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
10 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | ._= =} : or (at your option) any later version. | 12 | ._= =} : or (at your option) any later version. |
13 | .%`+i> _;_. | 13 | .%`+i> _;_. |
14 | .i_,=:_. -<s. This program is distributed in the hope that | 14 | .i_,=:_. -<s. This program is distributed in the hope that |
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
19 | ..}^=.= = ; Library General Public License for more | 19 | ..}^=.= = ; Library General Public License for more |
20 | ++= -. .` .: details. | 20 | ++= -. .` .: details. |
21 | : = ...= . :.=- | 21 | : = ...= . :.=- |
22 | -. .:....=;==+<; You should have received a copy of the GNU | 22 | -. .:....=;==+<; You should have received a copy of the GNU |
23 | -_. . . )=. = Library General Public License along with | 23 | -_. . . )=. = Library General Public License along with |
24 | -- :-=` this library; see the file COPYING.LIB. | 24 | -- :-=` this library; see the file COPYING.LIB. |
25 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
@@ -93,3 +93,3 @@ void OColorButton::setColor ( const QColor &c ) | |||
93 | { | 93 | { |
94 | updateColor ( c ); | 94 | updateColor ( c, true ); |
95 | } | 95 | } |
@@ -101,2 +101,7 @@ void OColorButton::updateColor ( const QColor &c ) | |||
101 | { | 101 | { |
102 | updateColor( c, true ); | ||
103 | } | ||
104 | |||
105 | void OColorButton::updateColor ( const QColor &c, bool sendSignal ) | ||
106 | { | ||
102 | d-> m_color = c; | 107 | d-> m_color = c; |
@@ -145,3 +150,4 @@ void OColorButton::updateColor ( const QColor &c ) | |||
145 | 150 | ||
146 | emit colorSelected ( c ); | 151 | if ( sendSignal ) |
152 | emit colorSelected ( c ); | ||
147 | } | 153 | } |
@@ -154,3 +160,3 @@ void OColorButton::resizeEvent( QResizeEvent *ev ) { | |||
154 | QPushButton::resizeEvent( ev ); | 160 | QPushButton::resizeEvent( ev ); |
155 | updateColor(d->m_color); | 161 | updateColor( d->m_color, false ); |
156 | } | 162 | } |
diff --git a/libqtaux/ocolorbutton.h b/libqtaux/ocolorbutton.h index 10b77d5..4845c0d 100644 --- a/libqtaux/ocolorbutton.h +++ b/libqtaux/ocolorbutton.h | |||
@@ -5,21 +5,21 @@ | |||
5 | .=l. | 5 | .=l. |
6 | .>+-= | 6 | .>+-= |
7 | _;:, .> :=|. This program is free software; you can | 7 | _;:, .> :=|. This program is free software; you can |
8 | .> <`_, > . <= redistribute it and/or modify it under | 8 | .> <`_, > . <= redistribute it and/or modify it under |
9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public | 9 | :`=1 )Y*s>-.-- : the terms of the GNU Library General Public |
10 | .="- .-=="i, .._ License as published by the Free Software | 10 | .="- .-=="i, .._ License as published by the Free Software |
11 | - . .-<_> .<> Foundation; either version 2 of the License, | 11 | - . .-<_> .<> Foundation; either version 2 of the License, |
12 | ._= =} : or (at your option) any later version. | 12 | ._= =} : or (at your option) any later version. |
13 | .%`+i> _;_. | 13 | .%`+i> _;_. |
14 | .i_,=:_. -<s. This program is distributed in the hope that | 14 | .i_,=:_. -<s. This program is distributed in the hope that |
15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; | 15 | + . -:. = it will be useful, but WITHOUT ANY WARRANTY; |
16 | : .. .:, . . . without even the implied warranty of | 16 | : .. .:, . . . without even the implied warranty of |
17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A | 17 | =_ + =;=|` MERCHANTABILITY or FITNESS FOR A |
18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU | 18 | _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU |
19 | ..}^=.= = ; Library General Public License for more | 19 | ..}^=.= = ; Library General Public License for more |
20 | ++= -. .` .: details. | 20 | ++= -. .` .: details. |
21 | : = ...= . :.=- | 21 | : = ...= . :.=- |
22 | -. .:....=;==+<; You should have received a copy of the GNU | 22 | -. .:....=;==+<; You should have received a copy of the GNU |
23 | -_. . . )=. = Library General Public License along with | 23 | -_. . . )=. = Library General Public License along with |
24 | -- :-=` this library; see the file COPYING.LIB. | 24 | -- :-=` this library; see the file COPYING.LIB. |
25 | If not, write to the Free Software Foundation, | 25 | If not, write to the Free Software Foundation, |
@@ -56,5 +56,5 @@ public: | |||
56 | QColor color ( ) const; | 56 | QColor color ( ) const; |
57 | 57 | ||
58 | protected: | 58 | protected: |
59 | void resizeEvent( QResizeEvent* ); | 59 | void resizeEvent( QResizeEvent* ); |
60 | 60 | ||
@@ -77,2 +77,4 @@ private: | |||
77 | OColorButtonPrivate *d; | 77 | OColorButtonPrivate *d; |
78 | |||
79 | void updateColor ( const QColor &, bool sendSignal = true ); | ||
78 | }; | 80 | }; |