kdeui Library API Documentation

kcolorcombo.h

00001 /* This file is part of the KDE libraries 00002 Copyright (C) 1997 Martin Jones (mjones@kde.org) 00003 00004 This library is free software; you can redistribute it and/or 00005 modify it under the terms of the GNU Library General Public 00006 License as published by the Free Software Foundation; either 00007 version 2 of the License, or (at your option) any later version. 00008 00009 This library 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 GNU 00012 Library General Public License for more details. 00013 00014 You should have received a copy of the GNU Library General Public License 00015 along with this library; see the file COPYING.LIB. If not, write to 00016 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, 00017 Boston, MA 02111-1307, USA. 00018 */ 00019 //----------------------------------------------------------------------------- 00020 // KDE color selection combo box 00021 00022 // layout management added Oct 1997 by Mario Weilguni 00023 // <mweilguni@sime.com> 00024 00025 00026 #ifndef _KCOLORCOMBO_H__ 00027 #define _KCOLORCOMBO_H__ 00028 00029 #include <qcombobox.h> 00030 #include <kcolordialog.h> 00031 #include "kselect.h" 00032 00033 00034 class KColorComboInternal; 00035 00039 class KDEUI_EXPORT KColorCombo : public QComboBox 00040 { 00041 Q_OBJECT 00042 Q_PROPERTY( QColor color READ color WRITE setColor ) 00043 00044 public: 00048 KColorCombo( QWidget *parent, const char *name = 0L ); 00049 ~KColorCombo(); 00050 00054 void setColor( const QColor &col ); 00058 QColor color() const; 00059 00060 00064 void showEmptyList(); 00065 00066 signals: 00070 void activated( const QColor &col ); 00074 void highlighted( const QColor &col ); 00075 00076 protected: 00077 virtual void resizeEvent( QResizeEvent *re ); 00078 00079 private slots: 00080 void slotActivated( int index ); 00081 void slotHighlighted( int index ); 00082 00083 private: 00084 void addColors(); 00085 QColor customColor; 00086 QColor internalcolor; 00087 00088 protected: 00089 virtual void virtual_hook( int id, void* data ); 00090 private: 00091 class KColorComboPrivate; 00092 KColorComboPrivate *d; 00093 }; 00094 00095 #endif // __KCOLORCOMBO_H__
KDE Logo
This file is part of the documentation for kdeui Library Version 3.4.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Thu Apr 14 00:10:08 2005 by doxygen 1.3.7 written by Dimitri van Heesch, © 1997-2003