KSeExpr 4.0.4.0
ExprColorSwatchWidget Class Reference

#include <ExprColorSwatch.h>

Inheritance diagram for ExprColorSwatchWidget:

Signals

void selValChangedSignal (KSeExpr::Vec3d val)
void swatchChanged (int index, KSeExpr::Vec3d val)
void swatchAdded (int index, KSeExpr::Vec3d val)
void swatchRemoved (int index)

Public Member Functions

 ExprColorSwatchWidget (bool indexLabel, QWidget *parent=nullptr)
 ~ExprColorSwatchWidget () override=default
void addSwatch (KSeExpr::Vec3d &val, int index=-1)
void setSwatchColor (int index, QColor color)
QColor getSwatchColor (int index)

Private Slots

void addNewColor ()
void removeSwatch (ExprColorFrame *)
void internalSwatchChanged (QColor color)

Private Attributes

QGridLayout * _gridLayout
int _columns
bool _indexLabel

Detailed Description

Definition at line 60 of file ExprColorSwatch.h.

Constructor & Destructor Documentation

◆ ExprColorSwatchWidget()

ExprColorSwatchWidget::ExprColorSwatchWidget ( bool indexLabel,
QWidget * parent = nullptr )

Definition at line 112 of file ExprColorSwatch.cpp.

References _columns, _gridLayout, _indexLabel, and addNewColor().

◆ ~ExprColorSwatchWidget()

ExprColorSwatchWidget::~ExprColorSwatchWidget ( )
overridedefault

Member Function Documentation

◆ addNewColor

void ExprColorSwatchWidget::addNewColor ( )
privateslot

Definition at line 156 of file ExprColorSwatch.cpp.

References addSwatch().

Referenced by ExprColorSwatchWidget().

◆ addSwatch()

void ExprColorSwatchWidget::addSwatch ( KSeExpr::Vec3d & val,
int index = -1 )

◆ getSwatchColor()

QColor ExprColorSwatchWidget::getSwatchColor ( int index)

Definition at line 209 of file ExprColorSwatch.cpp.

References _gridLayout, and ExprColorFrame::getValue().

◆ internalSwatchChanged

void ExprColorSwatchWidget::internalSwatchChanged ( QColor color)
privateslot

Definition at line 174 of file ExprColorSwatch.cpp.

References _gridLayout, and swatchChanged().

Referenced by addSwatch().

◆ removeSwatch

void ExprColorSwatchWidget::removeSwatch ( ExprColorFrame * widget)
privateslot

Definition at line 182 of file ExprColorSwatch.cpp.

References _gridLayout, and swatchRemoved().

Referenced by addSwatch().

◆ selValChangedSignal

void ExprColorSwatchWidget::selValChangedSignal ( KSeExpr::Vec3d val)
signal

◆ setSwatchColor()

void ExprColorSwatchWidget::setSwatchColor ( int index,
QColor color )

Definition at line 196 of file ExprColorSwatch.cpp.

References _gridLayout.

◆ swatchAdded

void ExprColorSwatchWidget::swatchAdded ( int index,
KSeExpr::Vec3d val )
signal

Referenced by addSwatch().

◆ swatchChanged

void ExprColorSwatchWidget::swatchChanged ( int index,
KSeExpr::Vec3d val )
signal

Referenced by addSwatch(), and internalSwatchChanged().

◆ swatchRemoved

void ExprColorSwatchWidget::swatchRemoved ( int index)
signal

Referenced by removeSwatch().

Member Data Documentation

◆ _columns

int ExprColorSwatchWidget::_columns
private

Definition at line 86 of file ExprColorSwatch.h.

Referenced by addSwatch(), and ExprColorSwatchWidget().

◆ _gridLayout

QGridLayout* ExprColorSwatchWidget::_gridLayout
private

◆ _indexLabel

bool ExprColorSwatchWidget::_indexLabel
private

Definition at line 87 of file ExprColorSwatch.h.

Referenced by addSwatch(), and ExprColorSwatchWidget().


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