KWidgetsAddons
kcolorcombo.cpp
32 void paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const override;
57void KColorComboDelegate::paint(QPainter *painter, const QStyleOptionViewItem &option, const QModelIndex &index) const
62 bool paletteBrush = (k_colorcombodelegate_brush(index, Qt::BackgroundRole).style() == Qt::NoBrush);
116QSize KColorComboDelegate::sizeHint(const QStyleOptionViewItem &option, const QModelIndex &index) const
289 QRect frame = style()->subControlRect(QStyle::CC_ComboBox, &opt, QStyle::SC_ComboBoxEditField, this);
void setColors(const QList< QColor > &colors)
Set a custom list of colors to choose from, in place of the standard list.
Definition kcolorcombo.cpp:235
void showEmptyList()
Clear the color list and don't show it, till the next setColor() call.
Definition kcolorcombo.cpp:296
bool isCustomColor() const
Find whether the currently selected color is a custom color selected using a color dialog.
Definition kcolorcombo.cpp:274
QStyle * style()
Qt::BrushStyle style() const const
bool isValid() const const
QColor getColor(const QColor &initial, QWidget *parent, const QString &title, ColorDialogOptions options)
QComboBox(QWidget *parent)
void activated(int index)
void clear()
count
void setCurrentIndex(int index)
virtual bool event(QEvent *event) override
frame
void highlighted(int index)
virtual void initStyleOption(QStyleOptionComboBox *option) const const
void setMaxVisibleItems(int maxItems)
void setItemDelegate(QAbstractItemDelegate *delegate)
void reserve(qsizetype size)
QBrush
QVariant data(int role) const const
QObject(QObject *parent)
Q_OBJECTQ_OBJECT
QMetaObject::Connection connect(const QObject *sender, PointerToMemberFunction signal, Functor functor)
QObject * parent() const const
QString tr(const char *sourceText, const char *disambiguation, int n)
typedef RenderHints
void drawRoundedRect(const QRect &rect, qreal xRadius, qreal yRadius, Qt::SizeMode mode)
void drawText(const QPoint &position, const QString &text)
RenderHints renderHints() const const
void setBrush(Qt::BrushStyle style)
void setPen(Qt::PenStyle style)
void setRenderHint(RenderHint hint, bool on)
void setRenderHints(RenderHints hints, bool on)
Highlight
QRect adjusted(int dx1, int dy1, int dx2, int dy2) const const
CC_ComboBox
PE_PanelItemViewItem
State_Selected
SC_ComboBoxEditField
virtual void drawPrimitive(PrimitiveElement element, const QStyleOption *option, QPainter *painter, const QWidget *widget) const const=0
virtual QRect subControlRect(ComplexControl control, const QStyleOptionComplex *option, SubControl subControl, const QWidget *widget) const const=0
NoBrush
white
UserRole
QString toString() const const
int userType() const const
T value() const const
QWidget(QWidget *parent, Qt::WindowFlags f)
palette
QStyle * style() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:56:58 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:56:58 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.