SeExpr

Public Slots | Signals | Public Member Functions | Public Attributes | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
CCurveScene Class Reference

`#include <ExprColorCurve.h>`

Inheritance diagram for CCurveScene:

## Public Slots
void | interpChanged (const int interp)
void | selPosChanged (double pos)
void | selValChanged (const SeExpr2::Vec3d &val)
void | resize (const int width, const int height)

## Signals
void | cvSelected (double x, const SeExpr2::Vec3d y, const T_INTERP interp)
void | curveChanged ()

## Public Member Functions
| CCurveScene ()
| ~CCurveScene ()
void | addPoint (double x, const SeExpr2::Vec3d y, const T_INTERP interp, const bool select=true)
void | removePoint (const int index)
void | removeAll ()
virtual void | keyPressEvent (QKeyEvent *event)
virtual void | mouseMoveEvent (QGraphicsSceneMouseEvent *mouseEvent)
virtual void | mousePressEvent (QGraphicsSceneMouseEvent *mouseEvent)
virtual void | mouseReleaseEvent (QGraphicsSceneMouseEvent *mouseEvent)
virtual void | contextMenuEvent (QGraphicsSceneContextMenuEvent *event)
void | drawRect ()
void | drawPoints ()
QPixmap & | getPixmap ()
void | emitCurveChanged ()
void | rebuildCurve ()

## Public Attributes
std::vector< T_CURVE::CV > | _cvs

## Private Types
typedef SeExpr2::Curve< SeExpr2::Vec3d > | T_CURVE
typedef T_CURVE::InterpType | T_INTERP

## Private Member Functions
QByteArray | getCPixmap ()

## Private Attributes
T_CURVE * | _curve
int | _width
int | _height
SeExpr2::Vec3d | _color
T_INTERP | _interp
std::vector< QGraphicsEllipseItem * > | _circleObjects
int | _selectedItem
QPixmap | _pixmap
bool | _pixmapDirty
QWidget * | _baseRectW
QGraphicsProxyWidget * | _baseRect
bool | _lmb

## Friends
class | ExprColorCurve

## Detailed Description

Definition at line 40 of file ExprColorCurve.h.

## Member Typedef Documentation

## ◆ T_CURVE

typedef SeExpr2::Curve<SeExpr2::Vec3d> CCurveScene::T_CURVE
| private

Definition at line 43 of file ExprColorCurve.h.

## ◆ T_INTERP

typedef T_CURVE::InterpType CCurveScene::T_INTERP
| private

Definition at line 44 of file ExprColorCurve.h.

## Constructor & Destructor Documentation

## ◆ CCurveScene()

CCurveScene::CCurveScene | ( |  | ) |

Definition at line 43 of file ExprColorCurve.cpp.

References _height, _width, rebuildCurve(), and resize().

## ◆ ~CCurveScene()

CCurveScene::~CCurveScene | ( |  | ) |

Definition at line 50 of file ExprColorCurve.cpp.

References _curve.

## Member Function Documentation

## ◆ addPoint()

void CCurveScene::addPoint | ( | double | x,
|  | const SeExpr2::Vec3d | y,
|  | const T_INTERP | interp,
|  | const bool | select = `true`
| ) |  |

Definition at line 70 of file ExprColorCurve.cpp.

References _baseRectW, _cvs, _pixmapDirty, _selectedItem, SeExpr2::clamp(), cvSelected(), drawPoints(), rebuildCurve(), x, and y.

Referenced by ExprColorCurve::addPoint(), and mousePressEvent().

## ◆ contextMenuEvent()

void CCurveScene::contextMenuEvent | ( | QGraphicsSceneContextMenuEvent * | event | ) |
| virtual

Definition at line 161 of file ExprColorCurve.cpp.

References _selectedItem, and removePoint().

## ◆ curveChanged

void CCurveScene::curveChanged | ( |  | ) |
| signal

Referenced by emitCurveChanged().

## ◆ cvSelected

void CCurveScene::cvSelected | ( | double | x,
|  | const SeExpr2::Vec3d | y,
|  | const T_INTERP | interp
| ) |  |
| signal

Referenced by addPoint(), mouseMoveEvent(), and mousePressEvent().

## ◆ drawPoints()

void CCurveScene::drawPoints | ( |  | ) |

Definition at line 276 of file ExprColorCurve.cpp.

References _circleObjects, _cvs, _height, SeExpr2::Curve< T >::CV::_pos, _selectedItem, SeExpr2::Curve< T >::CV::_val, and _width.

Referenced by addPoint(), mouseMoveEvent(), mousePressEvent(), removePoint(), resize(), selPosChanged(), and selValChanged().

## ◆ drawRect()

void CCurveScene::drawRect | ( |  | ) |

Definition at line 263 of file ExprColorCurve.cpp.

References _baseRect, _baseRectW, _height, and _width.

Referenced by resize().

## ◆ emitCurveChanged()

void CCurveScene::emitCurveChanged | ( |  | ) |

Definition at line 214 of file ExprColorCurve.cpp.

References curveChanged().

Referenced by interpChanged(), mouseMoveEvent(), mousePressEvent(), ExprColorCurve::openDetail(), removePoint(), selPosChanged(), and selValChanged().

## ◆ getCPixmap()

QByteArray CCurveScene::getCPixmap | ( |  | ) |
| private

Definition at line 227 of file ExprColorCurve.cpp.

References _curve, _height, _width, SeExpr2::Curve< T >::getValue(), SeExpr2::max(), and SeExpr2::min().

Referenced by getPixmap().

## ◆ getPixmap()

QPixmap & CCurveScene::getPixmap | ( |  | ) |

Definition at line 216 of file ExprColorCurve.cpp.

References _height, _pixmap, _pixmapDirty, _width, and getCPixmap().

Referenced by ExprCBoxWidget::paintEvent().

## ◆ interpChanged

void CCurveScene::interpChanged | ( | const int | interp | ) |
| slot

Definition at line 176 of file ExprColorCurve.cpp.

References _baseRectW, _cvs, _interp, _pixmapDirty, _selectedItem, emitCurveChanged(), and rebuildCurve().

## ◆ keyPressEvent()

void CCurveScene::keyPressEvent | ( | QKeyEvent * | event | ) |
| virtual

Definition at line 100 of file ExprColorCurve.cpp.

References _selectedItem, and removePoint().

## ◆ mouseMoveEvent()

void CCurveScene::mouseMoveEvent | ( | QGraphicsSceneMouseEvent * | mouseEvent | ) |
| virtual

Definition at line 144 of file ExprColorCurve.cpp.

References _baseRectW, _cvs, _interp, _lmb, _pixmapDirty, _selectedItem, _width, SeExpr2::clamp(), cvSelected(), drawPoints(), emitCurveChanged(), point, and rebuildCurve().

## ◆ mousePressEvent()

void CCurveScene::mousePressEvent | ( | QGraphicsSceneMouseEvent * | mouseEvent | ) |
| virtual

Definition at line 107 of file ExprColorCurve.cpp.

References _circleObjects, _color, _curve, _cvs, SeExpr2::Curve< T >::CV::_interp, _interp, _lmb, _selectedItem, _width, addPoint(), SeExpr2::clamp(), cvSelected(), drawPoints(), emitCurveChanged(), SeExpr2::Curve< T >::getLowerBoundCV(), SeExpr2::Curve< T >::getValue(), SeExpr2::Curve< T >::kMonotoneSpline, and SeExpr2::Curve< T >::kNone.

## ◆ mouseReleaseEvent()

void CCurveScene::mouseReleaseEvent | ( | QGraphicsSceneMouseEvent * | mouseEvent | ) |
| virtual

Definition at line 170 of file ExprColorCurve.cpp.

References _lmb.

## ◆ rebuildCurve()

void CCurveScene::rebuildCurve | ( |  | ) |

Definition at line 63 of file ExprColorCurve.cpp.

References _curve, _cvs, SeExpr2::Curve< T >::addPoint(), and SeExpr2::Curve< T >::preparePoints().

Referenced by addPoint(), CCurveScene(), interpChanged(), mouseMoveEvent(), removePoint(), selPosChanged(), and selValChanged().

## ◆ removeAll()

void CCurveScene::removeAll | ( |  | ) |

Definition at line 98 of file ExprColorCurve.cpp.

References _cvs.

Referenced by ExprColorCurve::openDetail().

## ◆ removePoint()

void CCurveScene::removePoint | ( | const int | index | ) |

Definition at line 87 of file ExprColorCurve.cpp.

References _baseRectW, _cvs, _pixmapDirty, _selectedItem, drawPoints(), emitCurveChanged(), index(), and rebuildCurve().

Referenced by contextMenuEvent(), and keyPressEvent().

## ◆ resize

void CCurveScene::resize | ( | const int | width,
|  | const int | height
| ) |  |
| slot

Definition at line 52 of file ExprColorCurve.cpp.

References _height, _pixmap, _pixmapDirty, _width, drawPoints(), and drawRect().

Referenced by CCurveScene().

## ◆ selPosChanged

void CCurveScene::selPosChanged | ( | double | pos | ) |
| slot

Definition at line 188 of file ExprColorCurve.cpp.

References _baseRectW, _cvs, _pixmapDirty, _selectedItem, SeExpr2::clamp(), drawPoints(), emitCurveChanged(), and rebuildCurve().

## ◆ selValChanged

void CCurveScene::selValChanged | ( | const SeExpr2::Vec3d & | val | ) |
| slot

Definition at line 201 of file ExprColorCurve.cpp.

References _baseRectW, _color, _cvs, _pixmapDirty, _selectedItem, drawPoints(), emitCurveChanged(), and rebuildCurve().

Referenced by ExprColorCurve::setSwatchColor().

## Friends And Related Function Documentation

## ◆ ExprColorCurve

friend class ExprColorCurve
| friend

Definition at line 72 of file ExprColorCurve.h.

## Member Data Documentation

## ◆ _baseRect

QGraphicsProxyWidget* CCurveScene::_baseRect
| private

Definition at line 98 of file ExprColorCurve.h.

Referenced by drawRect().

## ◆ _baseRectW

QWidget* CCurveScene::_baseRectW
| private

Definition at line 97 of file ExprColorCurve.h.

Referenced by addPoint(), drawRect(), interpChanged(), mouseMoveEvent(), removePoint(), selPosChanged(), and selValChanged().

## ◆ _circleObjects

std::vector<QGraphicsEllipseItem *> CCurveScene::_circleObjects
| private

Definition at line 93 of file ExprColorCurve.h.

Referenced by drawPoints(), and mousePressEvent().

## ◆ _color

SeExpr2::Vec3d CCurveScene::_color
| private

Definition at line 91 of file ExprColorCurve.h.

Referenced by mousePressEvent(), and selValChanged().

## ◆ _curve

T_CURVE* CCurveScene::_curve
| private

Definition at line 85 of file ExprColorCurve.h.

Referenced by getCPixmap(), mousePressEvent(), rebuildCurve(), and ~CCurveScene().

## ◆ _cvs

std::vector<T_CURVE::CV> CCurveScene::_cvs

Definition at line 70 of file ExprColorCurve.h.

Referenced by addPoint(), CCurveControl::curveChanged(), drawPoints(), interpChanged(), mouseMoveEvent(), mousePressEvent(), ExprColorCurve::openDetail(), rebuildCurve(), removeAll(), removePoint(), selPosChanged(), and selValChanged().

## ◆ _height

int CCurveScene::_height
| private

Definition at line 90 of file ExprColorCurve.h.

Referenced by CCurveScene(), drawPoints(), drawRect(), getCPixmap(), getPixmap(), and resize().

## ◆ _interp

T_INTERP CCurveScene::_interp
| private

Definition at line 92 of file ExprColorCurve.h.

Referenced by interpChanged(), mouseMoveEvent(), and mousePressEvent().

## ◆ _lmb

bool CCurveScene::_lmb
| private

Definition at line 99 of file ExprColorCurve.h.

Referenced by mouseMoveEvent(), mousePressEvent(), and mouseReleaseEvent().

## ◆ _pixmap

QPixmap CCurveScene::_pixmap
| private

Definition at line 95 of file ExprColorCurve.h.

Referenced by getPixmap(), and resize().

## ◆ _pixmapDirty

bool CCurveScene::_pixmapDirty
| private

Definition at line 96 of file ExprColorCurve.h.

Referenced by addPoint(), getPixmap(), interpChanged(), mouseMoveEvent(), removePoint(), resize(), selPosChanged(), and selValChanged().

## ◆ _selectedItem

int CCurveScene::_selectedItem
| private

Definition at line 94 of file ExprColorCurve.h.

Referenced by addPoint(), contextMenuEvent(), drawPoints(), interpChanged(), keyPressEvent(), mouseMoveEvent(), mousePressEvent(), removePoint(), selPosChanged(), and selValChanged().

## ◆ _width

int CCurveScene::_width
| private

Definition at line 89 of file ExprColorCurve.h.

Referenced by CCurveScene(), drawPoints(), drawRect(), getCPixmap(), getPixmap(), mouseMoveEvent(), mousePressEvent(), and resize().

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

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