SeExpr

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

`#include <ExprCurve.h>`

Inheritance diagram for CurveScene:

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

## Signals
void | cvSelected (double x, double y, T_INTERP interp)
void | curveChanged ()

## Public Member Functions
| CurveScene ()
| ~CurveScene ()
void | addPoint (double x, double 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 | drawPoly ()
void | drawPoints ()
void | emitCurveChanged ()
void | rebuildCurve ()

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

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

## Private Attributes
T_CURVE * | _curve
int | _width
int | _height
T_INTERP | _interp
std::vector< QGraphicsEllipseItem * > | _circleObjects
int | _selectedItem
QGraphicsPolygonItem * | _curvePoly
QGraphicsRectItem * | _baseRect
bool | _lmb

## Friends
class | ExprCurve

## Detailed Description

Definition at line 57 of file ExprCurve.h.

## Member Typedef Documentation

## ◆ T_CURVE

typedef SeExpr2::Curve<double> CurveScene::T_CURVE
| private

Definition at line 60 of file ExprCurve.h.

## ◆ T_INTERP

typedef T_CURVE::InterpType CurveScene::T_INTERP
| private

Definition at line 61 of file ExprCurve.h.

## Constructor & Destructor Documentation

## ◆ CurveScene()

CurveScene::CurveScene | ( |  | ) |

Definition at line 47 of file ExprCurve.cpp.

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

## ◆ ~CurveScene()

CurveScene::~CurveScene | ( |  | ) |

Definition at line 54 of file ExprCurve.cpp.

References _curve.

## Member Function Documentation

## ◆ addPoint()

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

Definition at line 73 of file ExprCurve.cpp.

References _cvs, _selectedItem, SeExpr2::clamp(), drawPoints(), drawPoly(), rebuildCurve(), x, and y.

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

## ◆ contextMenuEvent()

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

Definition at line 140 of file ExprCurve.cpp.

References _selectedItem, and removePoint().

## ◆ curveChanged

void CurveScene::curveChanged | ( |  | ) |
| signal

Referenced by emitCurveChanged().

## ◆ cvSelected

void CurveScene::cvSelected | ( | double | x,
|  | double | y,
|  | T_INTERP | interp
| ) |  |
| signal

Referenced by mouseMoveEvent(), and mousePressEvent().

## ◆ drawPoints()

void CurveScene::drawPoints | ( |  | ) |

Definition at line 239 of file ExprCurve.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().

## ◆ drawPoly()

void CurveScene::drawPoly | ( |  | ) |

Definition at line 221 of file ExprCurve.cpp.

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

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

## ◆ drawRect()

void CurveScene::drawRect | ( |  | ) |

Definition at line 212 of file ExprCurve.cpp.

References _baseRect, _height, and _width.

Referenced by resize().

## ◆ emitCurveChanged()

void CurveScene::emitCurveChanged | ( |  | ) |

Definition at line 209 of file ExprCurve.cpp.

References curveChanged().

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

## ◆ interpChanged

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

Definition at line 174 of file ExprCurve.cpp.

References _cvs, _interp, _selectedItem, drawPoly(), emitCurveChanged(), and rebuildCurve().

## ◆ keyPressEvent()

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

Definition at line 97 of file ExprCurve.cpp.

References _selectedItem, and removePoint().

## ◆ mouseMoveEvent()

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

Definition at line 150 of file ExprCurve.cpp.

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

## ◆ mousePressEvent()

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

Definition at line 104 of file ExprCurve.cpp.

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

## ◆ mouseReleaseEvent()

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

Definition at line 168 of file ExprCurve.cpp.

References _lmb.

## ◆ rebuildCurve()

void CurveScene::rebuildCurve | ( |  | ) |

Definition at line 66 of file ExprCurve.cpp.

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

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

## ◆ removeAll()

void CurveScene::removeAll | ( |  | ) |

Definition at line 41 of file ExprCurve.cpp.

References _cvs.

Referenced by ExprCurve::openDetail().

## ◆ removePoint()

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

Definition at line 87 of file ExprCurve.cpp.

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

Referenced by contextMenuEvent(), and keyPressEvent().

## ◆ resize

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

Definition at line 56 of file ExprCurve.cpp.

References _height, _width, drawPoints(), drawPoly(), and drawRect().

Referenced by CurveScene().

## ◆ selPosChanged

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

Definition at line 185 of file ExprCurve.cpp.

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

## ◆ selValChanged

void CurveScene::selValChanged | ( | double | val | ) |
| slot

Definition at line 197 of file ExprCurve.cpp.

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

## Friends And Related Function Documentation

## ◆ ExprCurve

friend class ExprCurve
| friend

Definition at line 90 of file ExprCurve.h.

## Member Data Documentation

## ◆ _baseRect

QGraphicsRectItem* CurveScene::_baseRect
| private

Definition at line 112 of file ExprCurve.h.

Referenced by drawRect().

## ◆ _circleObjects

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

Definition at line 109 of file ExprCurve.h.

Referenced by drawPoints(), and mousePressEvent().

## ◆ _curve

T_CURVE* CurveScene::_curve
| private

Definition at line 93 of file ExprCurve.h.

Referenced by drawPoly(), mousePressEvent(), rebuildCurve(), and ~CurveScene().

## ◆ _curvePoly

QGraphicsPolygonItem* CurveScene::_curvePoly
| private

Definition at line 111 of file ExprCurve.h.

Referenced by drawPoly().

## ◆ _cvs

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

Definition at line 88 of file ExprCurve.h.

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

## ◆ _height

int CurveScene::_height
| private

Definition at line 107 of file ExprCurve.h.

Referenced by CurveScene(), drawPoints(), drawPoly(), drawRect(), mouseMoveEvent(), mousePressEvent(), and resize().

## ◆ _interp

T_INTERP CurveScene::_interp
| private

Definition at line 108 of file ExprCurve.h.

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

## ◆ _lmb

bool CurveScene::_lmb
| private

Definition at line 113 of file ExprCurve.h.

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

## ◆ _selectedItem

int CurveScene::_selectedItem
| private

Definition at line 110 of file ExprCurve.h.

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

## ◆ _width

int CurveScene::_width
| private

Definition at line 106 of file ExprCurve.h.

Referenced by CurveScene(), drawPoints(), drawPoly(), drawRect(), mouseMoveEvent(), mousePressEvent(), and resize().

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

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