• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.14.38 API Reference
  • KDE Home
  • Contact Us
 

KDEUI

Public Member Functions | Protected Member Functions | Properties | List of all members
KGradientSelector Class Reference

#include <kselector.h>

Inheritance diagram for KGradientSelector:
KSelector

Public Member Functions

 KGradientSelector (Qt::Orientation o, QWidget *parent=0)
 
 KGradientSelector (QWidget *parent=0)
 
 ~KGradientSelector ()
 
QColor firstColor () const
 
QString firstText () const
 
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 setStops (const QGradientStops &stops)
 
void setText (const QString &t1, const QString &t2)
 
QGradientStops stops () const
 
- Public Member Functions inherited from KSelector
 KSelector (Qt::Orientation o, QWidget *parent=0)
 
 KSelector (QWidget *parent=0)
 
 ~KSelector ()
 
Qt::ArrowType arrowDirection () const
 
QRect contentsRect () const
 
bool indent () const
 
void setArrowDirection (Qt::ArrowType direction)
 
void setIndent (bool i)
 

Protected Member Functions

virtual void drawContents (QPainter *)
 
virtual QSize minimumSize () const
 
- Protected Member Functions inherited from KSelector
virtual void drawArrow (QPainter *painter, const QPoint &pos)
 
virtual void drawContents (QPainter *)
 
virtual void mouseMoveEvent (QMouseEvent *e)
 
virtual void mousePressEvent (QMouseEvent *e)
 
virtual void mouseReleaseEvent (QMouseEvent *e)
 
virtual void paintEvent (QPaintEvent *)
 
virtual void wheelEvent (QWheelEvent *)
 

Properties

QColor firstColor
 
QString firstText
 
QColor secondColor
 
QString secondText
 
- Properties inherited from KSelector
Qt::ArrowType arrowDirection
 
bool indent
 
int maxValue
 
int minValue
 
int value
 

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.

KDE Gradient Selector Widget

Definition at line 132 of file kselector.h.

Constructor & Destructor Documentation

◆ KGradientSelector() [1/2]

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

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

Definition at line 310 of file kselector.cpp.

◆ KGradientSelector() [2/2]

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 316 of file kselector.cpp.

◆ ~KGradientSelector()

KGradientSelector::~KGradientSelector ( )

Destructs the widget.

Definition at line 322 of file kselector.cpp.

Member Function Documentation

◆ drawContents()

void KGradientSelector::drawContents ( QPainter *  )
protectedvirtual

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 328 of file kselector.cpp.

◆ firstColor()

QColor KGradientSelector::firstColor ( ) const

Definition at line 425 of file kselector.cpp.

◆ firstText()

QString KGradientSelector::firstText ( ) const

Definition at line 435 of file kselector.cpp.

◆ minimumSize()

QSize KGradientSelector::minimumSize ( ) const
protectedvirtual

Definition at line 371 of file kselector.cpp.

◆ secondColor()

QColor KGradientSelector::secondColor ( ) const

Definition at line 430 of file kselector.cpp.

◆ secondText()

QString KGradientSelector::secondText ( ) const

Definition at line 440 of file kselector.cpp.

◆ setColors()

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

Sets the two colors which span the gradient.

Definition at line 387 of file kselector.cpp.

◆ setFirstColor()

void KGradientSelector::setFirstColor ( const QColor &  col)

Set each color on its own.

Definition at line 401 of file kselector.cpp.

◆ setFirstText()

void KGradientSelector::setFirstText ( const QString &  t)

Set each description on its own.

Definition at line 413 of file kselector.cpp.

◆ setSecondColor()

void KGradientSelector::setSecondColor ( const QColor &  col)

Definition at line 407 of file kselector.cpp.

◆ setSecondText()

void KGradientSelector::setSecondText ( const QString &  t)

Definition at line 419 of file kselector.cpp.

◆ setStops()

void KGradientSelector::setStops ( const QGradientStops &  stops)

Sets the colors that make up the gradient.

Any previously set colors are removed.

Since
4.5

Definition at line 376 of file kselector.cpp.

◆ setText()

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

Definition at line 394 of file kselector.cpp.

◆ stops()

QGradientStops KGradientSelector::stops ( ) const

Get the colors that make up the gradient.

Since
4.5

Definition at line 382 of file kselector.cpp.

Property Documentation

◆ firstColor

QColor KGradientSelector::firstColor
readwrite

Definition at line 118 of file kselector.h.

◆ firstText

QString KGradientSelector::firstText
readwrite

Definition at line 118 of file kselector.h.

◆ secondColor

QColor KGradientSelector::secondColor
readwrite

Definition at line 118 of file kselector.h.

◆ secondText

QString KGradientSelector::secondText
readwrite

Definition at line 118 of file kselector.h.


The documentation for this class was generated from the following files:
  • kselector.h
  • kselector.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Feb 20 2023 00:00:00 by doxygen 1.9.6 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

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

kdelibs-4.14.38 API Reference

Skip menu "kdelibs-4.14.38 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal