KDE 4.9 PyKDE API Reference

- KDE's Python API

# KGradientSelector Class Reference

`from PyKDE4.kdeui import *`

Inherits: KSelector → QAbstractSlider → QWidget → QObject

## 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"

## Methods
| __init__ (self, QWidget parent=0)
| __init__ (self, Qt::Orientation o, QWidget parent=0)
| __init__ (self, KGradientSelector a0)
| drawContents (self, QPainter a0)
QColor | firstColor (self)
QString | firstText (self)
QSize | minimumSize (self)
QColor | secondColor (self)
QString | secondText (self)
| setColors (self, QColor col1, QColor col2)
| setFirstColor (self, QColor col)
| setFirstText (self, QString t)
| setSecondColor (self, QColor col)
| setSecondText (self, QString t)
| setStops (self, QVector> stops)
| setText (self, QString t1, QString t2)
QVector> | stops (self)

## Method Documentation

__init__ | ( | self, |
|  | QWidget | parent=0
| ) |  |  |

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

__init__ | ( | self, |
|  | Qt::Orientation | o,
|  | QWidget | parent=0
| ) |  |  |

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

__init__ | ( | self, |
|  | KGradientSelector | a0
| ) |  |  |

drawContents | ( | self, |
|  | QPainter | a0
| ) |  |  |

QColor firstColor | ( |  | self ) |

QString firstText | ( |  | self ) |

QSize minimumSize | ( |  | self ) |

QColor secondColor | ( |  | self ) |

QString secondText | ( |  | self ) |

setColors | ( | self, |
|  | QColor | col1,
|  | QColor | col2
| ) |  |  |

Sets the two colors which span the gradient.

setFirstColor | ( | self, |
|  | QColor | col
| ) |  |  |

Set each color on its own.

setFirstText | ( | self, |
|  | QString | t
| ) |  |  |

Set each description on its own

setSecondColor | ( | self, |
|  | QColor | col
| ) |  |  |

setSecondText | ( | self, |
|  | QString | t
| ) |  |  |

setStops | ( | self, |
|  | QVector> | stops
| ) |  |  |

Sets the colors that make up the gradient. Any previously set colors are removed.

Since:
  4.5

setText | ( | self, |
|  | QString | t1,
|  | QString | t2
| ) |  |  |

QVector> stops | ( |  | self ) |

Get the colors that make up the gradient.

Since:
  4.5