KWidgetsAddons
kselector.cpp
317 int xPos = contentsRect().left() + (contentsRect().width() - painter->fontMetrics().horizontalAdvance(d->text2)) / 2;
323 xPos = contentsRect().left() + (contentsRect().width() - painter->fontMetrics().horizontalAdvance(d->text1)) / 2;
336 painter->drawText(contentsRect().right() - painter->fontMetrics().horizontalAdvance(d->text2) - 2, yPos, d->text2);
The KGradientSelector widget allows the user to choose from a one-dimensional range of colors which i...
Definition kselector.h:122
void setStops(const QGradientStops &stops)
Sets the colors that make up the gradient.
Definition kselector.cpp:345
void setColors(const QColor &col1, const QColor &col2)
Sets the two colors which span the gradient.
Definition kselector.cpp:356
void drawContents(QPainter *) override
Override this function to draw the contents of the control.
Definition kselector.cpp:293
KGradientSelector(QWidget *parent=nullptr)
Constructs a horizontal color selector which contains a gradient between white and black.
Definition kselector.cpp:279
KSelector is the base class for other widgets which provides the ability to choose from a one-dimensi...
Definition kselector.h:33
KSelector(QWidget *parent=nullptr)
Constructs a horizontal one-dimensional selection widget.
Definition kselector.cpp:45
void setArrowDirection(Qt::ArrowType direction)
Sets the arrow direction.
Definition kselector.cpp:206
virtual void drawContents(QPainter *)
Override this function to draw the contents of the control.
Definition kselector.cpp:258
virtual void drawArrow(QPainter *painter, const QPoint &pos)
Override this function to draw the cursor which indicates the current value.
Definition kselector.cpp:262
maximum
minimum
void setOrientation(Qt::Orientation)
void setSliderDown(bool)
void setValue(int)
bool isOpaque() const const
int ascent() const const
int descent() const const
int horizontalAdvance(QChar ch) const const
QPoint pos() const const
bool begin(QPaintDevice *device)
const QBrush & brush() const const
void drawText(const QPoint &position, const QString &text)
bool end()
void fillRect(const QRect &rectangle, QGradient::Preset preset)
QFontMetrics fontMetrics() const const
void setBrush(Qt::BrushStyle style)
void setPen(Qt::PenStyle style)
ButtonText
void setColor(const QColor &color)
void setX(int x)
void setY(int y)
int y() const const
int bottom() const const
int left() const const
int top() const const
int width() const const
PM_DefaultFrameWidth
PrimitiveElement
State_Sunken
virtual void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const const=0
virtual int pixelMetric(PixelMetric metric, const QStyleOption *option, const QWidget *widget) const const=0
void initFrom(const QWidget *widget)
UpArrow
NoBrush
black
Horizontal
QPoint angleDelta() const const
height
palette
pos
sizeHint
QStyle * style() const const
void update()
width
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:52 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:09:52 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.