Skip to content

Class ColorPickerWidget#

ClassList > ColorPickerWidget

Inherits the following classes: QWidget

Inherited by the following classes: ColorPicker, ColorPickerEditMode

Public Functions#

Type Name
ColorPickerWidget (QWidget * parent=nullptr)
void updateSelection (int index)
void updateWidget ()

Public Static Functions#

Type Name
const QVector< QColor > & getDefaultLargeColorPalette ()
const QVector< QColor > & getDefaultSmallColorPalette ()

Protected Attributes#

Type Name
QVector< QRect > m_colorAreaList
int m_colorAreaSize
QVector< QColor > m_colorList
int m_lastIndex
int m_selectedIndex
QColor m_uiColor

Protected Functions#

Type Name
void paintEvent (QPaintEvent * event) override
void repaint (int i, QPainter & painter)

Public Functions Documentation#

function ColorPickerWidget#

explicit ColorPickerWidget::ColorPickerWidget (
    QWidget * parent=nullptr
) 

function updateSelection#

void ColorPickerWidget::updateSelection (
    int index
) 

function updateWidget#

void ColorPickerWidget::updateWidget () 

Public Static Functions Documentation#

function getDefaultLargeColorPalette#

static const QVector< QColor > & ColorPickerWidget::getDefaultLargeColorPalette () 

function getDefaultSmallColorPalette#

static const QVector< QColor > & ColorPickerWidget::getDefaultSmallColorPalette () 

Protected Attributes Documentation#

variable m_colorAreaList#

QVector<QRect> ColorPickerWidget::m_colorAreaList;

variable m_colorAreaSize#

int ColorPickerWidget::m_colorAreaSize;

variable m_colorList#

QVector<QColor> ColorPickerWidget::m_colorList;

variable m_lastIndex#

int ColorPickerWidget::m_lastIndex;

variable m_selectedIndex#

int ColorPickerWidget::m_selectedIndex;

variable m_uiColor#

QColor ColorPickerWidget::m_uiColor;

Protected Functions Documentation#

function paintEvent#

void ColorPickerWidget::paintEvent (
    QPaintEvent * event
) override

function repaint#

void ColorPickerWidget::repaint (
    int i,
    QPainter & painter
)