QwwColorComboBox Class

The QwwColorComboBox class provides a combobox that allows to pick colors. More...

Header: #include <QwwColorComboBox>

Properties

Public Functions

QwwColorComboBox(QWidget * parent = 0)
void addColor(const QColor & color, const QString & name)
QColor color(int index) const
int colorCount() const
QStringList colors() const
QColor currentColor() const
void insertColor(int index, const QColor & color, const QString & name)
bool isColorDialogEnabled() const
void setColorDialogEnabled(bool enabled = true)
void setColors(const QStringList & map)
void setStandardColors()

Public Slots

void setCurrentColor(const QColor & color)

Signals

void activated(const QColor & color)

Detailed Description

The QwwColorComboBox class provides a combobox that allows to pick colors.

Property Documentation

colorCount : const int

This property holds number of colors available.

Access functions:

int colorCount() const

See also colors and currentColor.

colorDialogEnabled : bool

This property holds property holds information whether picking custom colors using a color dialog is enabled.

Access functions:

bool isColorDialogEnabled() const
void setColorDialogEnabled(bool enabled = true)

colors : QStringList

This property holds list of colors known to the button.

Access functions:

QStringList colors() const
void setColors(const QStringList & map)

See also colorCount and currentColor.

currentColor : const QColor

This property holds currently chosen color.

Access functions:

QColor currentColor() const

See also colors and colorCount.

Member Function Documentation

QwwColorComboBox::QwwColorComboBox(QWidget * parent = 0)

Constructs a color combo box with a given parent.

void QwwColorComboBox::activated(const QColor & color) [signal]

Signal emitted when color is activated

void QwwColorComboBox::addColor(const QColor & color, const QString & name)

Adds the specified color with a name to the list of available colors.

See also insertColor().

QColor QwwColorComboBox::color(int index) const

Returns the color at position index

See also currentColor and colors.

void QwwColorComboBox::insertColor(int index, const QColor & color, const QString & name)

Inserts the specified color with a name in the list of available colors under specified index

See also addColor().

void QwwColorComboBox::setCurrentColor(const QColor & color) [slot]

Sets color as the currently picked color.

Color is added to the list of available colors if it's not there yet.

See also currentColor().

void QwwColorComboBox::setStandardColors()

Fills the list of available colors with standard colors.

See also colors.