summaryrefslogtreecommitdiff
path: root/libopie/colorpopupmenu.h
Unidiff
Diffstat (limited to 'libopie/colorpopupmenu.h') (more/less context) (ignore whitespace changes)
-rw-r--r--libopie/colorpopupmenu.h36
1 files changed, 18 insertions, 18 deletions
diff --git a/libopie/colorpopupmenu.h b/libopie/colorpopupmenu.h
index b0453b2..184b132 100644
--- a/libopie/colorpopupmenu.h
+++ b/libopie/colorpopupmenu.h
@@ -19,80 +19,80 @@
19    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A 19    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
20  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU 20  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
21..}^=.=       =       ; Library General Public License for more 21..}^=.=       =       ; Library General Public License for more
22++=   -.     .`     .: details. 22++=   -.     .`     .: details.
23 :     =  ...= . :.=- 23 :     =  ...= . :.=-
24 -.   .:....=;==+<; You should have received a copy of the GNU 24 -.   .:....=;==+<; You should have received a copy of the GNU
25  -_. . .   )=.  = Library General Public License along with 25  -_. . .   )=.  = Library General Public License along with
26    --        :-=` this library; see the file COPYING.LIB. 26    --        :-=` this library; see the file COPYING.LIB.
27 If not, write to the Free Software Foundation, 27 If not, write to the Free Software Foundation,
28 Inc., 59 Temple Place - Suite 330, 28 Inc., 59 Temple Place - Suite 330,
29 Boston, MA 02111-1307, USA. 29 Boston, MA 02111-1307, USA.
30 30
31*/ 31*/
32 32
33#ifndef COLORPOPUPMENU_H 33#ifndef COLORPOPUPMENU_H
34#define COLORPOPUPMENU_H 34#define COLORPOPUPMENU_H
35 35
36#include <qframe.h> 36#include <qframe.h>
37#include <qpopupmenu.h> 37#include <qpopupmenu.h>
38 38
39class QWidget; 39class QWidget;
40class QGridLayout; 40class QGridLayout;
41 41
42/** 42/**
43 * @class ColorPanelButton 43 * @class OColorPanelButton
44 * @brief The ColorPanelButton class provides a button for color selection. 44 * @brief The OColorPanelButton class provides a button for color selection.
45 * 45 *
46 * @see ColorPopupMenu 46 * @see OColorPopupMenu
47 * 47 *
48 * The ColorPanelButton class provides a button for color selection. The button 48 * The OColorPanelButton class provides a button for color selection. The button
49 * is drawn with the desired color and no border. This class is used internally 49 * is drawn with the desired color and no border. This class is used internally
50 * by the ColorPopupMenu class to displaying colors in its menu. 50 * by the OColorPopupMenu class to displaying colors in its menu.
51 */ 51 */
52class ColorPanelButton : public QFrame 52class OColorPanelButton : public QFrame
53{ 53{
54 Q_OBJECT 54 Q_OBJECT
55 55
56public: 56public:
57 57
58/** 58/**
59 * @fn ColorPanelButton( const QColor& color, QWidget* parent = 0, const char* name = 0 ) 59 * @fn OColorPanelButton( const QColor& color, QWidget* parent = 0, const char* name = 0 )
60 * @brief Object constructor. 60 * @brief Object constructor.
61 * 61 *
62 * @param color Desired color. 62 * @param color Desired color.
63 * @param parent Pointer to parent of this control. 63 * @param parent Pointer to parent of this control.
64 * @param name Name of control. 64 * @param name Name of control.
65 * 65 *
66 * Constructs a new ColorPanelButton control with parent, name and desired color. 66 * Constructs a new ColorPanelButton control with parent, name and desired color.
67 */ 67 */
68 ColorPanelButton(const QColor& color, QWidget* parent = 0, const char* name = 0); 68 OColorPanelButton(const QColor& color, QWidget* parent = 0, const char* name = 0);
69 69
70/** 70/**
71 * @fn ~ColorPanelButton() 71 * @fn ~ColorPanelButton()
72 * @brief Object destructor. 72 * @brief Object destructor.
73 */ 73 */
74 ~ColorPanelButton(); 74 ~OColorPanelButton();
75 75
76/** 76/**
77 * @fn setActive( bool active ) 77 * @fn setActive( bool active )
78 * @brief Sets button selection state. 78 * @brief Sets button selection state.
79 * 79 *
80 * @param active Boolean indicator of new button state. 80 * @param active Boolean indicator of new button state.
81 * 81 *
82 * Changes button selection state. If button is selected, a highlighted border 82 * Changes button selection state. If button is selected, a highlighted border
83 * is drawn. 83 * is drawn.
84 */ 84 */
85 void setActive(bool active); 85 void setActive(bool active);
86 86
87/** 87/**
88 * @fn enterEvent( QEvent* e ) 88 * @fn enterEvent( QEvent* e )
89 * @brief Reimplemented for internal reasons. 89 * @brief Reimplemented for internal reasons.
90 * 90 *
91 * @param e Event currently being processed. 91 * @param e Event currently being processed.
92 * 92 *
93 * Reimplemented to ensure correct display of button based on whether it is 93 * Reimplemented to ensure correct display of button based on whether it is
94 * active or not. 94 * active or not.
95 */ 95 */
96 void enterEvent(QEvent* e); 96 void enterEvent(QEvent* e);
97 97
98/** 98/**
@@ -129,83 +129,83 @@ public:
129 */ 129 */
130 void mouseReleaseEvent(QMouseEvent* e); 130 void mouseReleaseEvent(QMouseEvent* e);
131 131
132signals: 132signals:
133 133
134/** 134/**
135 * @fn selected( const QColor& color ) 135 * @fn selected( const QColor& color )
136 * @brief Signal to indicate button has been pressed. 136 * @brief Signal to indicate button has been pressed.
137 * 137 *
138 * @param color Button color. 138 * @param color Button color.
139 * 139 *
140 * This signal is emitted when the button is pressed. It provides the color 140 * This signal is emitted when the button is pressed. It provides the color
141 * associated to this button. 141 * associated to this button.
142 */ 142 */
143 void selected(const QColor&); 143 void selected(const QColor&);
144 144
145private: 145private:
146 QColor m_color; 146 QColor m_color;
147 bool m_active : 1; 147 bool m_active : 1;
148 class ColorPanelButtonPrivate; 148 class ColorPanelButtonPrivate;
149 ColorPanelButtonPrivate *d; 149 ColorPanelButtonPrivate *d;
150}; 150};
151 151
152/** 152/**
153 * @class ColorPopupMenu 153 * @class OColorPopupMenu
154 * @brief The ColorPopupMenu class provides a small color selection 154 * @brief The OColorPopupMenu class provides a small color selection
155 * popup menu. 155 * popup menu.
156 * 156 *
157 * ColorPopupMenu is a derivation of TrollTech's QPopupMenu and provides 157 * OColorPopupMenu is a derivation of TrollTech's QPopupMenu and provides
158 * a small color selection popup menu which can be attached to another control 158 * a small color selection popup menu which can be attached to another control
159 * such as a toolbar button of menu item. 159 * such as a toolbar button of menu item.
160 * 160 *
161 * The popup menu displays 30 default colors available in a grid, and also 161 * The popup menu displays 30 default colors available in a grid, and also
162 * includes an option at the bottom to display a color selection dialog box for 162 * includes an option at the bottom to display a color selection dialog box for
163 * finer color control. 163 * finer color control.
164 */ 164 */
165class ColorPopupMenu : public QPopupMenu 165class OColorPopupMenu : public QPopupMenu
166{ 166{
167 Q_OBJECT 167 Q_OBJECT
168 168
169public: 169public:
170 170
171/** 171/**
172 * @fn ColorPopupMenu( const QColor& color, QWidget* parent = 0, const char* name = 0 ) 172 * @fn OColorPopupMenu( const QColor& color, QWidget* parent = 0, const char* name = 0 )
173 * @brief Object constructor. 173 * @brief Object constructor.
174 * 174 *
175 * @param color Initial color selected in menu. 175 * @param color Initial color selected in menu.
176 * @param parent Pointer to parent of this control. 176 * @param parent Pointer to parent of this control.
177 * @param name Name of control. 177 * @param name Name of control.
178 * 178 *
179 * Constructs a new ColorPopupMenu control with parent, name and initial color selected. 179 * Constructs a new OColorPopupMenu control with parent, name and initial color selected.
180 */ 180 */
181 ColorPopupMenu( const QColor& color, QWidget* parent = 0, const char* name = 0 ); 181 OColorPopupMenu( const QColor& color, QWidget* parent = 0, const char* name = 0 );
182 182
183/** 183/**
184 * @fn ~ColorPopupMenu() 184 * @fn ~OColorPopupMenu()
185 * @brief Object destructor. 185 * @brief Object destructor.
186 */ 186 */
187 ~ColorPopupMenu(); 187 ~OColorPopupMenu();
188 188
189private: 189private:
190 class ColorPopupMenuPrivate; 190 class ColorPopupMenuPrivate;
191 ColorPopupMenuPrivate *d; 191 ColorPopupMenuPrivate *d;
192 QColor m_color; 192 QColor m_color;
193 QWidget* colorPanel; 193 QWidget* colorPanel;
194 QGridLayout* colorLayout; 194 QGridLayout* colorLayout;
195 195
196/** 196/**
197 * @fn addColor( const QColor& color, int row, int col ) 197 * @fn addColor( const QColor& color, int row, int col )
198 * @brief Adds color selection option to popup menu. 198 * @brief Adds color selection option to popup menu.
199 * 199 *
200 * @param color Color to be displayed in menu. 200 * @param color Color to be displayed in menu.
201 * @param row Row where color is to appear in menu. 201 * @param row Row where color is to appear in menu.
202 * @param col Column where color is to appear in menu. 202 * @param col Column where color is to appear in menu.
203 * 203 *
204 * Adds a color selection option to popup menu. Used internally when 204 * Adds a color selection option to popup menu. Used internally when
205 * initially constructing the menu control. 205 * initially constructing the menu control.
206 */ 206 */
207 void addColor( const QColor& color, int row, int col ); 207 void addColor( const QColor& color, int row, int col );
208 208
209signals: 209signals:
210 210
211/** 211/**