Updated the README file with some contributor tips.
[basket4.git] / src / colorpicker.h
blob62ff039a9276c4dac389306c64b9b7bfd482784c
1 /***************************************************************************
2 * Copyright (C) 2003 by S�astien Laot *
3 * slaout@linux62.org *
4 * *
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. *
9 * *
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. *
14 * *
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 ***************************************************************************/
21 #ifndef COLORPICKER_H
22 #define COLORPICKER_H
24 #include <qdesktopwidget.h>
25 //Added by qt3to4:
26 #include <QKeyEvent>
27 #include <QMouseEvent>
29 /** Class to pick a color on the screen
30 * @author S�astien Laot
32 class DesktopColorPicker : public QDesktopWidget
34 Q_OBJECT
35 public:
36 /** Construtor, initializer and destructor */
37 DesktopColorPicker();
38 ~DesktopColorPicker();
39 public slots:
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).
44 void pickColor();
45 signals:
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.
51 void canceledPick();
52 protected slots:
53 void slotDelayedPick();
54 protected:
55 void mouseReleaseEvent(QMouseEvent *event);
56 void keyPressEvent(QKeyEvent *event);
57 bool m_gettingColorFromScreen;
60 #endif // COLORPICKER_H