SeExpr

Public Member Functions | Private Slots | Private Attributes | List of all members
ColorSwatchControl Class Reference

A control for editing color swatches. More...

`#include <ExprControl.h>`

Inheritance diagram for ColorSwatchControl:

## Public Member Functions
| ColorSwatchControl (int id, ColorSwatchEditable *swatchEditable)
Public Member Functions inherited from ExprControl
| ExprControl (int id, Editable *editable, bool showColorLink)
virtual | ~ExprControl ()
virtual QColor | getColor ()
| Interface for getting the color (used for linked color picking) More...
virtual void | setColor (QColor color)
| Interface for setting the color (used for linked color picking) More...
void | linkDisconnect (int newId)

## Private Slots
void | buildSwatchWidget ()
void | colorChanged (int index, SeExpr2::Vec3d value)
void | colorAdded (int index, SeExpr2::Vec3d value)
void | colorRemoved (int index)

## Private Attributes
ColorSwatchEditable * | _swatchEditable
| model for the color swatches control More...
ExprColorSwatchWidget * | _swatch
| Edit box for the color swatches. More...
bool | _indexLabel

## Additional Inherited Members
Public Slots inherited from ExprControl
void | linkStateChange (int state)
Signals inherited from ExprControl
void | controlChanged (int id)
void | linkColorEdited (int id, QColor color)
void | linkColorLink (int id)
Protected Attributes inherited from ExprControl
int | _id
bool | _updating
QHBoxLayout * | hbox
QCheckBox * | _colorLinkCB
QLabel * | _label
Editable * | _editable

## Detailed Description

A control for editing color swatches.

Definition at line 307 of file ExprControl.h.

## Constructor & Destructor Documentation

## ◆ ColorSwatchControl()

ColorSwatchControl::ColorSwatchControl | ( | int | id,
|  | ColorSwatchEditable * | swatchEditable
| ) |  |

Definition at line 674 of file ExprControl.cpp.

References _indexLabel, _swatchEditable, buildSwatchWidget(), and ColorSwatchEditable::labelType.

## Member Function Documentation

## ◆ buildSwatchWidget

void ColorSwatchControl::buildSwatchWidget | ( |  | ) |
| private slot

Definition at line 705 of file ExprControl.cpp.

References _indexLabel, _swatch, _swatchEditable, ExprControl::_updating, ExprColorSwatchWidget::addSwatch(), colorAdded(), colorChanged(), colorRemoved(), ColorSwatchEditable::colors, and ExprControl::hbox.

Referenced by colorRemoved(), and ColorSwatchControl().

## ◆ colorAdded

void ColorSwatchControl::colorAdded | ( | int | index,
|  | SeExpr2::Vec3d | value
| ) |  |
| private slot

Definition at line 687 of file ExprControl.cpp.

References ExprControl::_id, _swatchEditable, ExprControl::_updating, ColorSwatchEditable::add(), ColorSwatchEditable::colors, ExprControl::controlChanged(), index(), and value().

Referenced by buildSwatchWidget().

## ◆ colorChanged

void ColorSwatchControl::colorChanged | ( | int | index,
|  | SeExpr2::Vec3d | value
| ) |  |
| private slot

Definition at line 681 of file ExprControl.cpp.

References ExprControl::_id, _swatchEditable, ExprControl::_updating, ColorSwatchEditable::change(), ColorSwatchEditable::colors, ExprControl::controlChanged(), index(), and value().

Referenced by buildSwatchWidget().

## ◆ colorRemoved

void ColorSwatchControl::colorRemoved | ( | int | index | ) |
| private slot

Definition at line 694 of file ExprControl.cpp.

References ExprControl::_id, _swatch, _swatchEditable, ExprControl::_updating, buildSwatchWidget(), ColorSwatchEditable::colors, ExprControl::controlChanged(), index(), and ColorSwatchEditable::remove().

Referenced by buildSwatchWidget().

## Member Data Documentation

## ◆ _indexLabel

bool ColorSwatchControl::_indexLabel
| private

Definition at line 325 of file ExprControl.h.

Referenced by buildSwatchWidget(), and ColorSwatchControl().

## ◆ _swatch

ExprColorSwatchWidget* ColorSwatchControl::_swatch
| private

Edit box for the color swatches.

Definition at line 313 of file ExprControl.h.

Referenced by buildSwatchWidget(), and colorRemoved().

## ◆ _swatchEditable

ColorSwatchEditable* ColorSwatchControl::_swatchEditable
| private

model for the color swatches control

Definition at line 311 of file ExprControl.h.

Referenced by buildSwatchWidget(), colorAdded(), colorChanged(), colorRemoved(), and ColorSwatchControl().

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

- /build/seexpr/src/SeExpr/src/SeExpr2/UI/ExprControl.h
- /build/seexpr/src/SeExpr/src/SeExpr2/UI/ExprControl.cpp