SeExpr
|
#include <ExprCurve.h>
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 |
Definition at line 59 of file ExprCurve.h.
|
private |
Definition at line 63 of file ExprCurve.h.
|
private |
Definition at line 64 of file ExprCurve.h.
CurveScene::CurveScene | ( | ) |
Definition at line 53 of file ExprCurve.cpp.
References _height, _width, rebuildCurve(), and resize().
CurveScene::~CurveScene | ( | ) |
Definition at line 59 of file ExprCurve.cpp.
References _curve.
void CurveScene::addPoint | ( | double | x, |
double | y, | ||
const T_INTERP | interp, | ||
const bool | select = true |
||
) |
Definition at line 85 of file ExprCurve.cpp.
References _cvs, _selectedItem, SeExpr2::clamp(), drawPoints(), drawPoly(), and rebuildCurve().
Referenced by ExprCurve::addPoint(), and mousePressEvent().
|
virtual |
Definition at line 160 of file ExprCurve.cpp.
References _selectedItem, and removePoint().
|
signal |
Referenced by emitCurveChanged().
|
signal |
Referenced by mouseMoveEvent(), and mousePressEvent().
void CurveScene::drawPoints | ( | ) |
Definition at line 273 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().
void CurveScene::drawPoly | ( | ) |
Definition at line 253 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().
void CurveScene::drawRect | ( | ) |
void CurveScene::emitCurveChanged | ( | ) |
Definition at line 235 of file ExprCurve.cpp.
References curveChanged().
Referenced by interpChanged(), mouseMoveEvent(), mousePressEvent(), ExprCurve::openDetail(), removePoint(), selPosChanged(), and selValChanged().
|
slot |
Definition at line 197 of file ExprCurve.cpp.
References _cvs, _interp, _selectedItem, drawPoly(), emitCurveChanged(), and rebuildCurve().
|
virtual |
Definition at line 112 of file ExprCurve.cpp.
References _selectedItem, and removePoint().
|
virtual |
Definition at line 170 of file ExprCurve.cpp.
References _cvs, _height, _interp, _lmb, _selectedItem, _width, SeExpr2::clamp(), cvSelected(), drawPoints(), drawPoly(), emitCurveChanged(), point, and rebuildCurve().
|
virtual |
Definition at line 122 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.
|
virtual |
Definition at line 190 of file ExprCurve.cpp.
References _lmb.
void CurveScene::rebuildCurve | ( | ) |
Definition at line 75 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().
void CurveScene::removeAll | ( | ) |
Definition at line 41 of file ExprCurve.cpp.
References _cvs.
Referenced by ExprCurve::openDetail().
void CurveScene::removePoint | ( | const int | index | ) |
Definition at line 101 of file ExprCurve.cpp.
References _cvs, _selectedItem, drawPoints(), drawPoly(), emitCurveChanged(), index(), and rebuildCurve().
Referenced by contextMenuEvent(), and keyPressEvent().
|
slot |
Definition at line 64 of file ExprCurve.cpp.
References _height, _width, drawPoints(), drawPoly(), and drawRect().
Referenced by CurveScene().
|
slot |
Definition at line 209 of file ExprCurve.cpp.
References _cvs, _selectedItem, SeExpr2::clamp(), drawPoints(), drawPoly(), emitCurveChanged(), and rebuildCurve().
|
slot |
Definition at line 222 of file ExprCurve.cpp.
References _cvs, _selectedItem, SeExpr2::clamp(), drawPoints(), drawPoly(), emitCurveChanged(), and rebuildCurve().
|
friend |
Definition at line 92 of file ExprCurve.h.
|
private |
Definition at line 114 of file ExprCurve.h.
Referenced by drawRect().
|
private |
Definition at line 111 of file ExprCurve.h.
Referenced by drawPoints(), and mousePressEvent().
|
private |
Definition at line 95 of file ExprCurve.h.
Referenced by drawPoly(), mousePressEvent(), rebuildCurve(), and ~CurveScene().
|
private |
Definition at line 113 of file ExprCurve.h.
Referenced by drawPoly().
std::vector<T_CURVE::CV> CurveScene::_cvs |
Definition at line 90 of file ExprCurve.h.
Referenced by addPoint(), CurveControl::curveChanged(), drawPoints(), interpChanged(), mouseMoveEvent(), mousePressEvent(), ExprCurve::openDetail(), rebuildCurve(), removeAll(), removePoint(), selPosChanged(), and selValChanged().
|
private |
Definition at line 109 of file ExprCurve.h.
Referenced by CurveScene(), drawPoints(), drawPoly(), drawRect(), mouseMoveEvent(), mousePressEvent(), and resize().
|
private |
Definition at line 110 of file ExprCurve.h.
Referenced by interpChanged(), mouseMoveEvent(), and mousePressEvent().
|
private |
Definition at line 115 of file ExprCurve.h.
Referenced by mouseMoveEvent(), mousePressEvent(), and mouseReleaseEvent().
|
private |
Definition at line 112 of file ExprCurve.h.
Referenced by addPoint(), contextMenuEvent(), drawPoints(), interpChanged(), keyPressEvent(), mouseMoveEvent(), mousePressEvent(), removePoint(), selPosChanged(), and selValChanged().
|
private |
Definition at line 108 of file ExprCurve.h.
Referenced by CurveScene(), drawPoints(), drawPoly(), drawRect(), mouseMoveEvent(), mousePressEvent(), and resize().