ColorPickerItem Class Reference
Inheritance diagram for ColorPickerItem:

## Public Slots

void | setColor (const QColor &color, const QString &text=QString())

## Signals

void | clicked ()
void | selected ()

## Public Member Functions

QColor | color () const
| ColorPickerItem (const QColor &color=Qt::white, const QString &text=QString::null, QWidget *parent=0)
bool | isSelected () const
void | setSelected (bool)
QString | text () const
| ~ColorPickerItem ()

## Protected Member Functions

void | mouseMoveEvent (QMouseEvent *e)
void | mousePressEvent (QMouseEvent *e)
void | mouseReleaseEvent (QMouseEvent *e)
void | paintEvent (QPaintEvent *e)

## Private Attributes

QColor | c
bool | sel
QString | t

## Constructor & Destructor Documentation

## ColorPickerItem()

ColorPickerItem::ColorPickerItem | ( | const QColor & | color = `Qt::white`,
|  | const QString & | text = `QString::null`,
|  | QWidget * | parent = `0`
| ) |  |

Constructs a ColorPickerItem whose color is set to color, and whose name is set to text.

References t.

## ~ColorPickerItem()

ColorPickerItem::~ColorPickerItem | ( |  | ) |

Destructs a ColorPickerItem.

## Member Function Documentation

## clicked

void ColorPickerItem::clicked | ( |  | ) |

signal

## color()

QColor ColorPickerItem::color | ( |  | ) | const

Returns the item's color.

See also
  text()

References c.

Referenced by ColorPickerPopup::keyPressEvent(), setColor(), and ColorPickerPopup::updateSelected().

## isSelected()

bool ColorPickerItem::isSelected | ( |  | ) | const

References sel.

## mouseMoveEvent()

void ColorPickerItem::mouseMoveEvent | ( | QMouseEvent * | e | ) |

protected

## mousePressEvent()

void ColorPickerItem::mousePressEvent | ( | QMouseEvent * | e | ) |

protected

## mouseReleaseEvent()

void ColorPickerItem::mouseReleaseEvent | ( | QMouseEvent * | e | ) |

protected

References sel, and selected().

## paintEvent()

void ColorPickerItem::paintEvent | ( | QPaintEvent * | e | ) |

protected

References c, and sel.

## selected

void ColorPickerItem::selected | ( |  | ) |

signal

Referenced by mouseReleaseEvent(), and setSelected().

## setColor

void ColorPickerItem::setColor | ( | const QColor & | color,
|  | const QString & | text = `QString()`
| ) |  |

slot

Sets the item's color to color, and its name to text.

References c, color(), t, and text().

## setSelected()

void ColorPickerItem::setSelected | ( | bool | selected | ) |

References sel, and selected().

Referenced by ColorPickerPopup::insertColor(), ColorPickerPopup::keyPressEvent(), QtColorPicker::setCurrentColor(), and ColorPickerPopup::updateSelected().

## text()

QString ColorPickerItem::text | ( |  | ) | const

Returns the item's text.

See also
  color()

References t.

Referenced by setColor(), and QtColorPicker::setCurrentColor().

## Member Data Documentation

## c

QColor ColorPickerItem::c

private

Referenced by color(), paintEvent(), and setColor().

## sel

bool ColorPickerItem::sel

private

Referenced by isSelected(), mouseReleaseEvent(), paintEvent(), and setSelected().

## t

QString ColorPickerItem::t

private

Referenced by ColorPickerItem(), setColor(), and text().

The documentation for this class was generated from the following file:

- qtiplot/src/lib/3rdparty/qtcolorpicker/src/qtcolorpicker.cpp