• Skip to content
  • Skip to link menu
KDE 4.3 API Reference
  • KDE API Reference
  • kdelibs
  • Sitemap
  • Contact Us
 

KDEUI

kcolorcombo.h

Go to the documentation of this file.
00001 /* This file is part of the KDE libraries
00002     Copyright (C) 1997 Martin Jones (mjones@kde.org)
00003     Copyright (c) 2007 David Jarvie (software@astrojar.org.uk)
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 // KDE color selection combo box
00022 
00023 // layout management added Oct 1997 by Mario Weilguni
00024 // <mweilguni@sime.com>
00025 
00026 
00027 #ifndef KCOLORCOMBO_H
00028 #define KCOLORCOMBO_H
00029 
00030 #include <QtGui/QComboBox>
00031 #include <QtCore/QList>
00032 
00033 #include <kdeui_export.h>
00034 
00035 class KColorComboPrivate;
00036 
00043 class KDEUI_EXPORT KColorCombo : public QComboBox
00044 {
00045     Q_OBJECT
00046     Q_PROPERTY( QColor color READ color WRITE setColor )
00047     Q_PROPERTY( QList<QColor> colors READ colors WRITE setColors )
00048 
00049 public:
00053     explicit KColorCombo(QWidget *parent = 0);
00054     ~KColorCombo();
00055 
00059     void setColor( const QColor &col );
00063     QColor color() const;
00064 
00069     bool isCustomColor() const;
00070 
00077     void setColors(const QList<QColor> &colors );
00078 
00083     QList<QColor> colors() const;
00084 
00088      void showEmptyList();
00089 
00090 Q_SIGNALS:
00094     void activated( const QColor &col );
00098     void highlighted( const QColor &col );
00099 
00100 protected:
00101         virtual void paintEvent(QPaintEvent *event);
00102 
00103 private:
00104         friend class KColorComboPrivate;
00105         KColorComboPrivate *const d;
00106         
00107         Q_DISABLE_COPY(KColorCombo)
00108 
00109         Q_PRIVATE_SLOT(d, void _k_slotActivated(int))
00110         Q_PRIVATE_SLOT(d, void _k_slotHighlighted(int))
00111 };
00112 
00113 #endif  // KCOLORCOMBO_H

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.6.1
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal