kdk::KColorComboBox(3)

NAME
kdk::KColorComboBox - 颜色选择框

SYNOPSIS

#include <kcolorcombobox.h>

Inherits QComboBox.

  Public Types

enum ComboType { Circle, RoundedRect }
指定显示样式，圆形或者圆角矩形

  Signals

void activated (const QColor &color)
void currentColorChanged (const QColor &color)
void highlighted (const QColor &color)

  Public Member Functions

KColorComboBox (QWidget *parent=nullptr)
void setColorList (const QList< QColor > &list)
以列表形式添加颜色选项
QList< QColor > colorList ()
获取颜色列表
void addColor (const QColor &color)
添加颜色选项
void setComboType (const ComboType &type)
设置显示样式
ComboType comboType ()
获取显示样式
void setPopupItemSize (const QSize &size)
设置item尺寸
QSize popupItemSzie ()
返回item尺寸

  Protected Member Functions

void paintEvent (QPaintEvent *event) override
void resizeEvent (QResizeEvent *event) override

Detailed Description

颜色选择框

Since
    2.0.2.1

Member Function Documentation

  void kdk::KColorComboBox::addColor (const QColor & color)

添加颜色选项

Parameters
    color

  QList< QColor > kdk::KColorComboBox::colorList ()

获取颜色列表

Returns

  ComboType kdk::KColorComboBox::comboType ()

获取显示样式

Returns

  QSize kdk::KColorComboBox::popupItemSzie ()

返回item尺寸

Returns

  void kdk::KColorComboBox::setColorList (const QList< QColor > & list)

以列表形式添加颜色选项

Parameters
    list

  void kdk::KColorComboBox::setComboType (const ComboType & type)

设置显示样式

Parameters
    type

  void kdk::KColorComboBox::setPopupItemSize (const QSize & size)

设置item尺寸

Parameters
    size

Author

Generated automatically by Doxygen for LIBKYSDK-APPLICATIONS from the source code.