KDEUI
kcolorvalueselector.h
Go to the documentation of this file.
00001 /* This file is part of the KDE libraries 00002 * 00003 * Copyright (C) 1997 Martin Jones (mjones@kde.org) 00004 * 00005 * This library is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU Library General Public 00007 * License as published by the Free Software Foundation; either 00008 * version 2 of the License, or (at your option) any later version. 00009 * 00010 * This library is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 * Library General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU Library General Public License 00016 * along with this library; see the file COPYING.LIB. If not, write to 00017 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 00018 * Boston, MA 02110-1301, USA. 00019 */ 00020 00021 #ifndef KCOLORVALUESELECTOR_H 00022 #define KCOLORVALUESELECTOR_H 00023 00024 #include "kselector.h" 00025 #include "kcolorchoosermode.h" 00026 #include <QtGui/QPixmap> 00027 00028 class KDEUI_EXPORT KColorValueSelector : public KSelector 00029 { 00030 Q_OBJECT 00031 Q_PROPERTY( int hue READ hue WRITE setHue ) 00032 Q_PROPERTY( int saturation READ saturation WRITE setSaturation ) 00033 Q_PROPERTY( int colorValue READ colorValue WRITE setColorValue ) 00034 public: 00038 explicit KColorValueSelector( QWidget *parent=0 ); 00042 explicit KColorValueSelector( Qt::Orientation o, QWidget *parent = 0 ); 00043 00044 ~KColorValueSelector(); 00045 00049 void updateContents(); 00050 00056 int hue() const; 00057 00064 void setHue( int hue ); 00065 00071 int saturation() const; 00072 00079 void setSaturation( int saturation ); 00080 00086 int colorValue() const; 00087 00094 void setColorValue( int colorValue ); 00095 00102 void setChooserMode (KColorChooserMode chooserMode); 00103 00109 KColorChooserMode chooserMode () const; 00110 00111 protected: 00116 virtual void drawPalette( QPixmap *pixmap ); 00117 virtual void resizeEvent( QResizeEvent * ); 00118 00124 virtual void drawContents( QPainter *painter ); 00125 00126 private: 00127 class Private; 00128 friend class Private; 00129 00130 Private *const d; 00131 00132 Q_DISABLE_COPY(KColorValueSelector) 00133 }; 00134 00135 #endif /* KCOLORVALUESELECTOR_H */ 00136
KDE 4.6 API Reference