KDEUI
kcolorcombo.cpp
Go to the documentation of this file.
46 virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const;
71 void KColorComboDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
76 bool paletteBrush = (k_colorcombodelegate_brush(index, Qt::BackgroundRole).style() == Qt::NoBrush);
129 QSize KColorComboDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
307 QRect frame = style()->subControlRect(QStyle::CC_ComboBox, &opt, QStyle::SC_ComboBoxEditField, this);
void initStyleOption(QStyleOptionComboBox *option) const
const QPalette & palette() const
typedef RenderHints
void setRenderHint(RenderHint hint, bool on)
void highlighted(const QColor &col)
Emitted when a new item has been highlighted.
Qt::BrushStyle style() const
RenderHints renderHints() const
QStyle * style() const
void setItemDelegate(QAbstractItemDelegate *delegate)
void clear()
T value() const
virtual QRect subControlRect(ComplexControl control, const QStyleOptionComplex *option, SubControl subControl, const QWidget *widget) const =0
QString i18nc(const char *ctxt, const char *text)
void setColors(const QList< QColor > &colors)
Set a custom list of colors to choose from, in place of the standard list.
Definition: kcolorcombo.cpp:248
int count() const
void setPen(const QColor &color)
void drawRoundedRect(const QRectF &rect, qreal xRadius, qreal yRadius, Qt::SizeMode mode)
void setBrush(const QBrush &brush)
void drawText(const QPointF &position, const QString &text)
static QBrush k_colorcombodelegate_brush(const QModelIndex &index, int role)
Definition: kcolorcombo.cpp:50
QRect adjusted(int dx1, int dy1, int dx2, int dy2) const
virtual void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const =0
void activated(const QColor &col)
Emitted when a new color box has been selected.
void setRenderHints(QFlags< QPainter::RenderHint > hints, bool on)
bool isCustomColor() const
Find whether the currently selected color is a custom color selected using a color dialog...
Definition: kcolorcombo.cpp:292
QList< QColor > colors() const
Return the list of colors available for selection.
QVariant data(int role) const
QStyle * style()
void setCurrentIndex(int index)
void showEmptyList()
Clear the color list and don't show it, till the next setColor() call.
Definition: kcolorcombo.cpp:317
virtual void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const =0
virtual QSize sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const =0
void drawComplexControl(QStyle::ComplexControl cc, const QStyleOptionComplex &option)
static int getColor(QColor &theColor, QWidget *parent=0L)
Creates a modal color dialog, let the user choose a color, and returns when the dialog is closed...
Definition: kcolordialog.cpp:1492
Type type() const
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
void setMaxVisibleItems(int maxItems)
frame
QString toString() const
bool isValid() const
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:23:59 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.