ko_color_wheel.h
1/*
2 * Copyright (c) 2004 Sven Langkamp <longamp@reallygood.de>
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
13 *
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 */
18
19#ifndef KO_COLORWHEEL_H
20#define KO_COLORWHEEL_H
21
22#include <tqpixmap.h>
23
24#include <tdeselect.h>
25#include <koColor.h>
26
27class TQPainter;
28
29class KoColorWheel : public KXYSelector
30{
31 TQ_OBJECT
32
33
34public:
35 KoColorWheel( TQWidget *parent=0, const char *name=0 );
36
37signals:
38 void valueChanged(const KoColor& c);
39
40public slots:
41 virtual void slotSetValue(const KoColor& c);
42
43protected:
44 virtual void drawWheel( TQPixmap *pixmap );
45 virtual void resizeEvent( TQResizeEvent * );
46 virtual void mousePressEvent( TQMouseEvent *e );
47 virtual void mouseMoveEvent( TQMouseEvent *e );
48 virtual void drawContents( TQPainter *painter );
49
50private:
51 TQPixmap m_pixmap;
52 KoColor m_color;
53};
54
55#endif
virtual void drawContents(TQPainter *)
void valueChanged(int x, int y)