Envision
A visual programming IDE for object-oriented languages
|
The ColorPicker class provides a button which shows a grid of colors when clicked. More...
Public Types | |
enum | ColorPickerType { background , shape , text } |
Signals | |
void | colorChanged (QString color) |
Public Member Functions | |
void | handleColorPicked (QString aColor) |
void | setColorPickerType (enum ColorPickerType type) |
This sets the type of the colorpicker to type. More... | |
void | setColors (QVector< QColor > colors, int colorsPerRow, std::function< QString(QColor)> nameForColor={}) |
void | setEnvisionTextColors () |
For text Envision uses some predefined colors. More... | |
void | setselectedColor (QString colorName) |
Static Private Member Functions | |
static QList< QPair< QColor, QString > > & | envisionTextColorsMap () |
Private Attributes | |
ColorPickerType | type_ {} |
The ColorPicker class provides a button which shows a grid of colors when clicked.
This colors are also clickable and can be used to select the desired color.
|
signal |
|
staticprivate |
void Comments::ColorPicker::handleColorPicked | ( | QString | aColor | ) |
void Comments::ColorPicker::setColorPickerType | ( | enum ColorPickerType | type | ) |
This sets the type of the colorpicker to type.
The possible types are ColorPicker::background, ColorPicker::shape and ColorPicker::text. This information is then used to visualize the button of the colorpicker according to that type.
void Comments::ColorPicker::setColors | ( | QVector< QColor > | colors, |
int | colorsPerRow, | ||
std::function< QString(QColor)> | nameForColor = {} |
||
) |
void Comments::ColorPicker::setEnvisionTextColors | ( | ) |
For text Envision uses some predefined colors.
This method sets the colors displayed in the grid to these specific colors.
void Comments::ColorPicker::setselectedColor | ( | QString | colorName | ) |
|
private |