kdk::KColorComboBox(3)
💖 kdk::KColorComboBox — Library Functions Manual, section 3 🎀
okay bestie, sit down, hydrate, because we're about to talk about the cutest little color picker in the whole kdk namespace. this is kdk::KColorComboBox, and fr fr she's a whole vibe.
✨ NAME ✨
kdk::KColorComboBox — 颜色选择框, aka the color selection box. she picks colors. that's the job. iconic behavior.
🌈 SYNOPSIS 🌈
#include <kcolorcombobox.h>
Inherits QComboBox. yes ma'am, she's a combo box at heart — a combo box that woke up and chose color theory. 💅
🦋 Public Types
enum ComboType { Circle, RoundedRect }— 指定显示样式,圆形或者圆角矩形. this is literally just "what shape is the lil swatch bestie", and your options are a circle or a rounded rectangle. that's it, that's the whole menu.CircleorRoundedRect. no cap. ⭐
🎀 Signals
void activated (const QColor &color)— fires off when it gets activated, carrying aQColorwith it.void currentColorChanged (const QColor &color)— the moment the current color switches up, she lets you know with aQColor.void highlighted (const QColor &color)— a highlight happened, and here comes aQColorto prove it.
👑 Public Member Functions
KColorComboBox (QWidget *parent=nullptr)— the constructor. she takes aparentwidget, defaulting tonullptr(she can be a whole independent main character if you want, no shame).void setColorList (const QList< QColor > &list)— 以列表形式添加颜色选项, i.e. drop in a wholeQListof colors at once instead of one at a time. bulk slay.QList< QColor > colorList ()— 获取颜色列表, hand over the color list bestie.void addColor (const QColor &color)— 添加颜色选项, add one single color option. one at a time, slow and steady. 🍓void setComboType (const ComboType &type)— 设置显示样式, set the display style, soCircleorRoundedRect.ComboType comboType ()— 获取显示样式, tell me what display style we're on right now.void setPopupItemSize (const QSize &size)— 设置item尺寸, set the item size. (yes the getter below is spelled differently, we'll get there, stay calm 😭)QSize popupItemSzie ()— 返回item尺寸, returns the item size. 🫶
🧚 Protected Member Functions
void paintEvent (QPaintEvent *event) override— overridden paint event, this is where the drawing magic happens.void resizeEvent (QResizeEvent *event) override— overridden resize event, so she stays cute at every size.
💜 Detailed Description 💜
颜色选择框 — a color selection box.
- Since —
2.0.2.1🌸
⭐ Member Function Documentation ⭐
💅 void kdk::KColorComboBox::addColor (const QColor & color)
添加颜色选项 — adds a color option.
Parameters
color— the color you're adding, bestie.
💅 QList< QColor > kdk::KColorComboBox::colorList ()
获取颜色列表 — gets the color list.
Returns
- the
QList< QColor >, aka your color list. (the docs don't spell out more than that, so we're not making stuff up in here 💀)
💅 ComboType kdk::KColorComboBox::comboType ()
获取显示样式 — gets the display style.
Returns
- the
ComboType, soCircleorRoundedRect.
💅 QSize kdk::KColorComboBox::popupItemSzie ()
返回item尺寸 — returns the item size.
Returns
- the
QSizeof the item.
ngl the name popupItemSzie is a typo for "Size" and it lives in the actual API forever now, so type it exactly like that. yes really. do not "fix" it, the compiler does not care about your spelling feelings. 🙈
💅 void kdk::KColorComboBox::setColorList (const QList< QColor > & list)
以列表形式添加颜色选项 — adds color options in list form.
Parameters
list— theQListof colors going in.
💅 void kdk::KColorComboBox::setComboType (const ComboType & type)
设置显示样式 — sets the display style.
Parameters
type— theComboTypeyou want,CircleorRoundedRect.
💅 void kdk::KColorComboBox::setPopupItemSize (const QSize & size)
设置item尺寸 — sets the item size.
Parameters
size— theQSizeyou're setting it to.
🫶 Author 🫶
Generated automatically by Doxygen for LIBKYSDK-APPLICATIONS from the source code. not a human author, just a very diligent robot. respect the robot. 🤖✨
and that's the whole page bestie, no notes. this was LIBKYSDK-APPLICATIONS, Version version:3.0, from the kdk::KColorComboBox(3) manual — and if you scrolled all the way down here, you're genuinely the realest. mwah. 💖🌈👑
📦 where this page comes from
- arch rolling: libkysdk-applications 3.0.1.2-1 · BSD-3-Clause AND GPL-3.0-or-later AND LGPL-2.1-or-later AND LGPL-3.0-or-later AND MIT AND MulanPSL-2.0
- ubuntu resolute: libkysdk-applications-dev 3.0.1.1-1 · LGPL-3.0-or-later
- ubuntu stonking: libkysdk-applications-dev 3.0.1.2-1build2 · LGPL-3.0-or-later
- 💖 girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms