lib

ko_color_wheel.h

00001 /*
00002  * Copyright (c) 2004 Sven Langkamp <longamp@reallygood.de>
00003  *
00004  *  This program is free software; you can redistribute it and/or modify
00005  *  it under the terms of the GNU General Public License as published by
00006  *  the Free Software Foundation; either version 2 of the License, or
00007  *  (at your option) any later version.
00008  *
00009  *  This program is distributed in the hope that it will be useful,
00010  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00011  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00012  *  GNU General Public License for more details.
00013  *
00014  *  You should have received a copy of the GNU General Public License
00015  *  along with this program; if not, write to the Free Software
00016  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
00017  */
00018 
00019 #ifndef KO_COLORWHEEL_H
00020 #define KO_COLORWHEEL_H
00021 
00022 #include <qpixmap.h>
00023 
00024 #include <kselect.h>
00025 #include <koColor.h>
00026 
00027 class QPainter;
00028 
00029 class KoColorWheel : public KXYSelector
00030 {
00031   Q_OBJECT
00032 
00033 public:
00034     KoColorWheel( QWidget *parent=0, const char *name=0 );
00035 
00036 signals:
00037     void valueChanged(const KoColor& c);
00038 
00039 public slots:
00040     virtual void slotSetValue(const KoColor& c);
00041 
00042 protected:
00043     virtual void drawWheel( QPixmap *pixmap );
00044     virtual void resizeEvent( QResizeEvent * );
00045     virtual void mousePressEvent( QMouseEvent *e );
00046     virtual void mouseMoveEvent( QMouseEvent *e );
00047     virtual void drawContents( QPainter *painter );
00048 
00049 private:
00050     QPixmap m_pixmap;
00051     KoColor m_color;
00052 };
00053 
00054 #endif
KDE Home | KDE Accessibility Home | Description of Access Keys