QCodeEdit  2.2
qsimplecolorpicker.h
Go to the documentation of this file.
1 /****************************************************************************
2 **
3 ** Copyright (C) 2006-2009 fullmetalcoder <fullmetalcoder@hotmail.fr>
4 **
5 ** This file is part of the Edyuk project <http://edyuk.org>
6 **
7 ** This file may be used under the terms of the GNU General Public License
8 ** version 3 as published by the Free Software Foundation and appearing in the
9 ** file GPL.txt included in the packaging of this file.
10 **
11 ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE
12 ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
13 **
14 ****************************************************************************/
15 
16 #ifndef _QSIMPLE_COLOR_PICKER_H_
17 #define _QSIMPLE_COLOR_PICKER_H_
18 
19 #include "qce-config.h"
20 
26 #include <QToolButton>
27 
29 {
30  Q_OBJECT
31 
32  Q_PROPERTY(QColor color READ color WRITE setColor)
33 
34  public:
36  QSimpleColorPicker(const QColor& c, QWidget *w = 0);
37 
38  const QColor& color() const;
39 
40  protected:
41  void resizeEvent(QResizeEvent *e);
42  void contextMenuEvent(QContextMenuEvent *e);
43 
44  public slots:
45  void setColor(const QColor& c);
46 
47  void updateIcon(const QSize& sz);
48 
49  private slots:
50  void clicked();
51 
52  private:
53  QColor m_color;
54 };
55 
56 #endif