ColorPickerPopup Class Reference
Inheritance diagram for ColorPickerPopup:

## Public Slots

void | getColorFromDialog ()

## Signals

void | hid ()
void | selected (const QColor &)

## Public Member Functions

QColor | color (int index) const
| ColorPickerPopup (int width, bool withColorDialog, QWidget *parent=0)
void | exec ()
ColorPickerItem * | find (const QColor &col) const
void | insertColor (const QColor &col, const QString &text, int index)
QColor | lastSelected () const
void | setExecFlag ()
| ~ColorPickerPopup ()

## Protected Slots

void | updateSelected ()

## Protected Member Functions

void | hideEvent (QHideEvent *e)
void | keyPressEvent (QKeyEvent *e)
void | mouseReleaseEvent (QMouseEvent *e)
void | regenerateGrid ()
void | showEvent (QShowEvent *e)

## Private Attributes

int | cols
QEventLoop * | eventLoop
QGridLayout * | grid
QList< ColorPickerItem * > | items
int | lastPos
QColor | lastSel
ColorPickerButton * | moreButton
QMap< int, QMap< int, QWidget * > > | widgetAt

## Constructor & Destructor Documentation

## ColorPickerPopup()

ColorPickerPopup::ColorPickerPopup | ( | int | width,
|  | bool | withColorDialog,
|  | QWidget * | parent = `0`
| ) |  |

References cols, eventLoop, getColorFromDialog(), grid, moreButton, and regenerateGrid().

## ~ColorPickerPopup()

ColorPickerPopup::~ColorPickerPopup | ( |  | ) |

References eventLoop.

## Member Function Documentation

## color()

QColor ColorPickerPopup::color | ( | int | index | ) | const

References items.

Referenced by QtColorPicker::color().

## exec()

void ColorPickerPopup::exec | ( |  | ) |

References eventLoop.

Referenced by QtColorPicker::getColor().

## find()

ColorPickerItem * ColorPickerPopup::find | ( | const QColor & | col | ) | const

References items.

Referenced by QtColorPicker::buttonPressed(), insertColor(), and QtColorPicker::setCurrentColor().

## getColorFromDialog

void ColorPickerPopup::getColorFromDialog | ( |  | ) |

slot

References insertColor(), lastSel, and selected().

Referenced by ColorPickerPopup().

## hid

void ColorPickerPopup::hid | ( |  | ) |

signal

Referenced by hideEvent().

## hideEvent()

void ColorPickerPopup::hideEvent | ( | QHideEvent * | e | ) |

protected

References eventLoop, and hid().

## insertColor()

void ColorPickerPopup::insertColor | ( | const QColor & | col,
|  | const QString & | text,
|  | int | index
| ) |  |

References find(), items, lastSel, lastSelected(), regenerateGrid(), selected(), ColorPickerItem::setSelected(), and updateSelected().

Referenced by QtColorPicker::getColor(), getColorFromDialog(), and QtColorPicker::insertColor().

## keyPressEvent()

void ColorPickerPopup::keyPressEvent | ( | QKeyEvent * | e | ) |

protected

References ColorPickerItem::color(), grid, lastSel, selected(), ColorPickerItem::setSelected(), and widgetAt.

## lastSelected()

QColor ColorPickerPopup::lastSelected | ( |  | ) | const

References lastSel.

Referenced by QtColorPicker::getColor(), and insertColor().

## mouseReleaseEvent()

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

protected

## regenerateGrid()

void ColorPickerPopup::regenerateGrid | ( |  | ) |

protected

References cols, grid, items, moreButton, and widgetAt.

Referenced by ColorPickerPopup(), and insertColor().

## selected

void ColorPickerPopup::selected | ( | const QColor & |  | ) |

signal

Referenced by getColorFromDialog(), insertColor(), keyPressEvent(), and updateSelected().

## setExecFlag()

void ColorPickerPopup::setExecFlag | ( |  | ) |

## showEvent()

void ColorPickerPopup::showEvent | ( | QShowEvent * | e | ) |

protected

References grid, items, and widgetAt.

## updateSelected

void ColorPickerPopup::updateSelected | ( |  | ) |

protected slot

References ColorPickerItem::color(), grid, lastSel, selected(), and ColorPickerItem::setSelected().

Referenced by insertColor().

## Member Data Documentation

## cols

int ColorPickerPopup::cols

private

Referenced by ColorPickerPopup(), and regenerateGrid().

## eventLoop

QEventLoop* ColorPickerPopup::eventLoop

private

Referenced by ColorPickerPopup(), exec(), hideEvent(), and ~ColorPickerPopup().

## grid

QGridLayout* ColorPickerPopup::grid

private

Referenced by ColorPickerPopup(), keyPressEvent(), regenerateGrid(), showEvent(), and updateSelected().

## items

QList<ColorPickerItem *> ColorPickerPopup::items

private

Referenced by color(), find(), insertColor(), regenerateGrid(), and showEvent().

## lastPos

int ColorPickerPopup::lastPos

private

## lastSel

QColor ColorPickerPopup::lastSel

private

Referenced by getColorFromDialog(), insertColor(), keyPressEvent(), lastSelected(), and updateSelected().

## moreButton

ColorPickerButton* ColorPickerPopup::moreButton

private

Referenced by ColorPickerPopup(), and regenerateGrid().

## widgetAt

QMap<int, QMap<int, QWidget *> > ColorPickerPopup::widgetAt

private

Referenced by keyPressEvent(), regenerateGrid(), and showEvent().

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

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