1 /***************************************************************************
2 * Copyright (C) 2003 by S�astien Laot *
5 * This program is free software; you can redistribute it and/or modify *
6 * it under the terms of the GNU General Public License as published by *
7 * the Free Software Foundation; either version 2 of the License, or *
8 * (at your option) any later version. *
10 * This program is distributed in the hope that it will be useful, *
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13 * GNU General Public License for more details. *
15 * You should have received a copy of the GNU General Public License *
16 * along with this program; if not, write to the *
17 * Free Software Foundation, Inc., *
18 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19 ***************************************************************************/
24 #include <qdesktopwidget.h>
27 #include <QMouseEvent>
29 /** Class to pick a color on the screen
30 * @author S�astien Laot
32 class DesktopColorPicker
: public QDesktopWidget
36 /** Construtor, initializer and destructor */
38 ~DesktopColorPicker();
40 /** Begin color picking.
41 * This function returns immediatly, and pickedColor() is emitted if user has
42 * choosen a color, and not canceled the process (by pressing Escape).
46 /** When user picked a color, this signal is emitted.
48 void pickedColor(const QColor
&color
);
49 /** When user cancel a picking (by pressing Escape), this signal is emitted.
53 void slotDelayedPick();
55 void mouseReleaseEvent(QMouseEvent
*event
);
56 void keyPressEvent(QKeyEvent
*event
);
57 bool m_gettingColorFromScreen
;
60 #endif // COLORPICKER_H