KSeExpr  4.0.4.0
Public Slots | Signals | Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ExprControl Class Reference

Base class for all controls for Expressions. More...

#include <ExprControl.h>

Inheritance diagram for ExprControl:
CCurveControl ColorSwatchControl CurveControl NumberControl StringControl VectorControl

Public Slots

void linkStateChange (int state)
 

Signals

void controlChanged (int id)
 
void linkColorEdited (int id, QColor color)
 
void linkColorLink (int id)
 

Public Member Functions

 ExprControl (int id, Editable *editable, bool showColorLink)
 
 ~ExprControl () override=default
 
virtual QColor getColor ()
 Interface for getting the color (used for linked color picking) More...
 
virtual void setColor (QColor)
 Interface for setting the color (used for linked color picking) More...
 
void linkDisconnect (int newId)
 

Protected Member Functions

void resizeEvent (QResizeEvent *event) override
 

Protected Attributes

int _id
 
std::atomic< bool > _updating {}
 
QHBoxLayout * hbox {nullptr}
 
QCheckBox * _colorLinkCB {nullptr}
 
QLabel * _label {nullptr}
 
Editable_editable {nullptr}
 

Detailed Description

Base class for all controls for Expressions.

Definition at line 24 of file ExprControl.h.

Constructor & Destructor Documentation

◆ ExprControl()

ExprControl::ExprControl ( int  id,
Editable editable,
bool  showColorLink 
)

Definition at line 165 of file ExprControl.cpp.

References _colorLinkCB, _editable, _label, hbox, linkStateChange(), and Editable::name.

◆ ~ExprControl()

ExprControl::~ExprControl ( )
overridedefault

Member Function Documentation

◆ controlChanged

void ExprControl::controlChanged ( int  id)
signal

◆ getColor()

virtual QColor ExprControl::getColor ( )
inlinevirtual

Interface for getting the color (used for linked color picking)

Reimplemented in CCurveControl, and VectorControl.

Definition at line 42 of file ExprControl.h.

Referenced by linkStateChange().

◆ linkColorEdited

void ExprControl::linkColorEdited ( int  id,
QColor  color 
)
signal

◆ linkColorLink

void ExprControl::linkColorLink ( int  id)
signal

Referenced by linkStateChange().

◆ linkDisconnect()

void ExprControl::linkDisconnect ( int  newId)

Definition at line 216 of file ExprControl.cpp.

References _colorLinkCB, _id, and _updating.

◆ linkStateChange

void ExprControl::linkStateChange ( int  state)
slot

Definition at line 203 of file ExprControl.cpp.

References _id, _updating, getColor(), linkColorEdited(), and linkColorLink().

Referenced by ExprControl().

◆ resizeEvent()

void ExprControl::resizeEvent ( QResizeEvent *  event)
overrideprotected

Definition at line 196 of file ExprControl.cpp.

References _editable, _label, and Editable::name.

◆ setColor()

virtual void ExprControl::setColor ( QColor  )
inlinevirtual

Interface for setting the color (used for linked color picking)

Reimplemented in CCurveControl, and VectorControl.

Definition at line 47 of file ExprControl.h.

Member Data Documentation

◆ _colorLinkCB

QCheckBox* ExprControl::_colorLinkCB {nullptr}
protected

Definition at line 32 of file ExprControl.h.

Referenced by ExprControl(), and linkDisconnect().

◆ _editable

Editable* ExprControl::_editable {nullptr}
protected

Definition at line 35 of file ExprControl.h.

Referenced by ExprControl(), and resizeEvent().

◆ _id

int ExprControl::_id
protected

◆ _label

QLabel* ExprControl::_label {nullptr}
protected

Definition at line 33 of file ExprControl.h.

Referenced by ExprControl(), resizeEvent(), and VectorControl::updateControl().

◆ _updating

std::atomic<bool> ExprControl::_updating {}
protected

◆ hbox

QHBoxLayout* ExprControl::hbox {nullptr}
protected

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