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

KDEUI

KGradientSelector Class Reference

The KGradientSelector widget allows the user to choose from a one-dimensional range of colors which is given as a gradient between two colors provided by the programmer. More...

#include <kselector.h>

Inheritance diagram for KGradientSelector:

Inheritance graph
[legend]

List of all members.


Public Member Functions

QColor firstColor () const
QString firstText () const
 KGradientSelector (Qt::Orientation o, QWidget *parent=0)
 KGradientSelector (QWidget *parent=0)
QColor secondColor () const
QString secondText () const
void setColors (const QColor &col1, const QColor &col2)
void setFirstColor (const QColor &col)
void setFirstText (const QString &t)
void setSecondColor (const QColor &col)
void setSecondText (const QString &t)
void setText (const QString &t1, const QString &t2)
 ~KGradientSelector ()

Protected Member Functions

virtual void drawContents (QPainter *)
virtual QSize minimumSize () const

Properties

QColor firstColor
QString firstText
QColor secondColor
QString secondText

Detailed Description

The KGradientSelector widget allows the user to choose from a one-dimensional range of colors which is given as a gradient between two colors provided by the programmer.

kgradientselector.png

KDE Gradient Selector Widget

Definition at line 129 of file kselector.h.


Constructor & Destructor Documentation

KGradientSelector::KGradientSelector ( QWidget *  parent = 0  )  [explicit]

Constructs a horizontal color selector which contains a gradient between white and black.

Definition at line 311 of file kselector.cpp.

KGradientSelector::KGradientSelector ( Qt::Orientation  o,
QWidget *  parent = 0 
) [explicit]

Constructs a colors selector with orientation o which contains a gradient between white and black.

Definition at line 318 of file kselector.cpp.

KGradientSelector::~KGradientSelector (  ) 

Destructs the widget.

Definition at line 325 of file kselector.cpp.


Member Function Documentation

void KGradientSelector::drawContents ( QPainter *   )  [protected, virtual]

Override this function to draw the contents of the control.

The default implementation does nothing.

Draw only within contentsRect().

Reimplemented from KSelector.

Definition at line 340 of file kselector.cpp.

QColor KGradientSelector::firstColor (  )  const

QString KGradientSelector::firstText (  )  const

QSize KGradientSelector::minimumSize (  )  const [protected, virtual]

Definition at line 429 of file kselector.cpp.

QColor KGradientSelector::secondColor (  )  const

QString KGradientSelector::secondText (  )  const

void KGradientSelector::setColors ( const QColor &  col1,
const QColor &  col2 
)

Sets the two colors which span the gradient.

Definition at line 434 of file kselector.cpp.

void KGradientSelector::setFirstColor ( const QColor &  col  ) 

Set each color on its own.

Definition at line 448 of file kselector.cpp.

void KGradientSelector::setFirstText ( const QString &  t  ) 

Set each description on its own.

Definition at line 460 of file kselector.cpp.

void KGradientSelector::setSecondColor ( const QColor &  col  ) 

Definition at line 454 of file kselector.cpp.

void KGradientSelector::setSecondText ( const QString &  t  ) 

Definition at line 466 of file kselector.cpp.

void KGradientSelector::setText ( const QString &  t1,
const QString &  t2 
)

Definition at line 441 of file kselector.cpp.


Property Documentation

QColor KGradientSelector::firstColor [read, write]

Definition at line 133 of file kselector.h.

QString KGradientSelector::firstText [read, write]

Definition at line 135 of file kselector.h.

QColor KGradientSelector::secondColor [read, write]

Definition at line 134 of file kselector.h.

QString KGradientSelector::secondText [read, write]

Definition at line 136 of file kselector.h.


The documentation for this class was generated from the following files:
  • kselector.h
  • kselector.cpp

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
  • Kross
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.5.7
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