#include <SeExprEdCurve.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) |
void | drawRect () |
void | drawPoly () |
void | drawPoints () |
void | emitCurveChanged () |
void | rebuildCurve () |
Public Attributes | |
std::vector< T_CURVE::CV > | _cvs |
Private Types | |
typedef SeExpr::SeCurve< 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 | SeExprEdCurve |
Definition at line 52 of file SeExprEdCurve.h.
typedef SeExpr::SeCurve<double> CurveScene::T_CURVE [private] |
Definition at line 56 of file SeExprEdCurve.h.
typedef T_CURVE::InterpType CurveScene::T_INTERP [private] |
Definition at line 57 of file SeExprEdCurve.h.
CurveScene::CurveScene | ( | ) |
Definition at line 46 of file SeExprEdCurve.cpp.
References _height, _width, rebuildCurve(), and resize().
CurveScene::~CurveScene | ( | ) |
Definition at line 52 of file SeExprEdCurve.cpp.
References _curve.
void CurveScene::addPoint | ( | double | x, | |
double | y, | |||
const T_INTERP | interp, | |||
const bool | select = true | |||
) |
Definition at line 78 of file SeExprEdCurve.cpp.
References _cvs, _selectedItem, SeExpr::clamp(), drawPoints(), drawPoly(), and rebuildCurve().
Referenced by SeExprEdCurve::addPoint(), and mousePressEvent().
void CurveScene::curveChanged | ( | ) | [signal] |
Referenced by emitCurveChanged().
void CurveScene::cvSelected | ( | double | x, | |
double | y, | |||
T_INTERP | interp | |||
) | [signal] |
Referenced by mouseMoveEvent(), and mousePressEvent().
void CurveScene::drawPoints | ( | ) |
Definition at line 252 of file SeExprEdCurve.cpp.
References _circleObjects, _cvs, _height, SeExpr::SeCurve< T >::CV::_pos, _selectedItem, SeExpr::SeCurve< T >::CV::_val, and _width.
Referenced by addPoint(), mouseMoveEvent(), mousePressEvent(), removePoint(), resize(), selPosChanged(), and selValChanged().
void CurveScene::drawPoly | ( | ) |
Definition at line 232 of file SeExprEdCurve.cpp.
References _curve, _curvePoly, _height, _width, SeExpr::SeCurve< T >::getValue(), and x.
Referenced by addPoint(), interpChanged(), mouseMoveEvent(), removePoint(), resize(), selPosChanged(), and selValChanged().
void CurveScene::drawRect | ( | ) |
void CurveScene::emitCurveChanged | ( | ) |
Definition at line 214 of file SeExprEdCurve.cpp.
References curveChanged().
Referenced by interpChanged(), mouseMoveEvent(), mousePressEvent(), SeExprEdCurve::openDetail(), removePoint(), selPosChanged(), and selValChanged().
void CurveScene::interpChanged | ( | const int | interp | ) | [slot] |
Definition at line 176 of file SeExprEdCurve.cpp.
References _cvs, _interp, _selectedItem, drawPoly(), emitCurveChanged(), and rebuildCurve().
void CurveScene::keyPressEvent | ( | QKeyEvent * | event | ) | [virtual] |
Definition at line 105 of file SeExprEdCurve.cpp.
References _selectedItem, and removePoint().
void CurveScene::mouseMoveEvent | ( | QGraphicsSceneMouseEvent * | mouseEvent | ) | [virtual] |
Definition at line 149 of file SeExprEdCurve.cpp.
References _cvs, _height, _interp, _lmb, _selectedItem, _width, SeExpr::clamp(), cvSelected(), drawPoints(), drawPoly(), emitCurveChanged(), point, and rebuildCurve().
void CurveScene::mousePressEvent | ( | QGraphicsSceneMouseEvent * | mouseEvent | ) | [virtual] |
Definition at line 115 of file SeExprEdCurve.cpp.
References _circleObjects, _curve, _cvs, _height, _interp, _lmb, _selectedItem, _width, addPoint(), SeExpr::clamp(), cvSelected(), drawPoints(), emitCurveChanged(), SeExpr::SeCurve< T >::getLowerBoundCV(), SeExpr::SeCurve< T >::kMonotoneSpline, and SeExpr::SeCurve< T >::kNone.
void CurveScene::mouseReleaseEvent | ( | QGraphicsSceneMouseEvent * | mouseEvent | ) | [virtual] |
Definition at line 169 of file SeExprEdCurve.cpp.
References _lmb.
void CurveScene::rebuildCurve | ( | ) |
Definition at line 68 of file SeExprEdCurve.cpp.
References _curve, _cvs, SeExpr::SeCurve< T >::addPoint(), and SeExpr::SeCurve< T >::preparePoints().
Referenced by addPoint(), CurveScene(), interpChanged(), mouseMoveEvent(), removePoint(), selPosChanged(), and selValChanged().
void CurveScene::removeAll | ( | ) |
Definition at line 34 of file SeExprEdCurve.cpp.
References _cvs.
Referenced by SeExprEdCurve::openDetail().
void CurveScene::removePoint | ( | const int | index | ) |
Definition at line 94 of file SeExprEdCurve.cpp.
References _cvs, _selectedItem, drawPoints(), drawPoly(), emitCurveChanged(), and rebuildCurve().
Referenced by keyPressEvent().
void CurveScene::resize | ( | const int | width, | |
const int | height | |||
) | [slot] |
Definition at line 57 of file SeExprEdCurve.cpp.
References _height, _width, drawPoints(), drawPoly(), and drawRect().
Referenced by CurveScene().
void CurveScene::selPosChanged | ( | double | pos | ) | [slot] |
Definition at line 188 of file SeExprEdCurve.cpp.
References _cvs, _selectedItem, SeExpr::clamp(), drawPoints(), drawPoly(), emitCurveChanged(), and rebuildCurve().
void CurveScene::selValChanged | ( | double | val | ) | [slot] |
Definition at line 201 of file SeExprEdCurve.cpp.
References _cvs, _selectedItem, SeExpr::clamp(), drawPoints(), drawPoly(), emitCurveChanged(), and rebuildCurve().
friend class SeExprEdCurve [friend] |
Definition at line 85 of file SeExprEdCurve.h.
QGraphicsRectItem* CurveScene::_baseRect [private] |
Definition at line 107 of file SeExprEdCurve.h.
Referenced by drawRect().
std::vector<QGraphicsEllipseItem *> CurveScene::_circleObjects [private] |
Definition at line 104 of file SeExprEdCurve.h.
Referenced by drawPoints(), and mousePressEvent().
T_CURVE* CurveScene::_curve [private] |
Definition at line 88 of file SeExprEdCurve.h.
Referenced by drawPoly(), mousePressEvent(), rebuildCurve(), and ~CurveScene().
QGraphicsPolygonItem* CurveScene::_curvePoly [private] |
Definition at line 106 of file SeExprEdCurve.h.
Referenced by drawPoly().
std::vector<T_CURVE::CV> CurveScene::_cvs |
Definition at line 83 of file SeExprEdCurve.h.
Referenced by addPoint(), SeExprEdCurveControl::curveChanged(), drawPoints(), interpChanged(), mouseMoveEvent(), mousePressEvent(), SeExprEdCurve::openDetail(), rebuildCurve(), removeAll(), removePoint(), selPosChanged(), and selValChanged().
int CurveScene::_height [private] |
Definition at line 102 of file SeExprEdCurve.h.
Referenced by CurveScene(), drawPoints(), drawPoly(), drawRect(), mouseMoveEvent(), mousePressEvent(), and resize().
T_INTERP CurveScene::_interp [private] |
Definition at line 103 of file SeExprEdCurve.h.
Referenced by interpChanged(), mouseMoveEvent(), and mousePressEvent().
bool CurveScene::_lmb [private] |
Definition at line 108 of file SeExprEdCurve.h.
Referenced by mouseMoveEvent(), mousePressEvent(), and mouseReleaseEvent().
int CurveScene::_selectedItem [private] |
Definition at line 105 of file SeExprEdCurve.h.
Referenced by addPoint(), drawPoints(), interpChanged(), keyPressEvent(), mouseMoveEvent(), mousePressEvent(), removePoint(), selPosChanged(), and selValChanged().
int CurveScene::_width [private] |
Definition at line 101 of file SeExprEdCurve.h.
Referenced by CurveScene(), drawPoints(), drawPoly(), drawRect(), mouseMoveEvent(), mousePressEvent(), and resize().