#include <SeExprEdColorCurve.h>
Public Slots | |
void | interpChanged (const int interp) |
void | selPosChanged (double pos) |
void | selValChanged (const SeVec3d &val) |
void | resize (const int width, const int height) |
Signals | |
void | cvSelected (double x, const SeVec3d y, const T_INTERP interp) |
void | curveChanged () |
Public Member Functions | |
CCurveScene () | |
~CCurveScene () | |
void | addPoint (double x, const SeVec3d 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 | drawPoints () |
QPixmap & | getPixmap () |
void | emitCurveChanged () |
void | rebuildCurve () |
Public Attributes | |
std::vector< T_CURVE::CV > | _cvs |
Private Types | |
typedef SeExpr::SeCurve< SeVec3d > | T_CURVE |
typedef T_CURVE::InterpType | T_INTERP |
Private Member Functions | |
QByteArray | getCPixmap () |
Private Attributes | |
T_CURVE * | _curve |
int | _width |
int | _height |
SeVec3d | _color |
T_INTERP | _interp |
std::vector < QGraphicsEllipseItem * > | _circleObjects |
int | _selectedItem |
QPixmap | _pixmap |
bool | _pixmapDirty |
QWidget * | _baseRectW |
QGraphicsProxyWidget * | _baseRect |
bool | _lmb |
Friends | |
class | SeExprEdColorCurve |
Definition at line 35 of file SeExprEdColorCurve.h.
typedef SeExpr::SeCurve<SeVec3d> CCurveScene::T_CURVE [private] |
Definition at line 39 of file SeExprEdColorCurve.h.
typedef T_CURVE::InterpType CCurveScene::T_INTERP [private] |
Definition at line 40 of file SeExprEdColorCurve.h.
CCurveScene::CCurveScene | ( | ) |
Definition at line 35 of file SeExprEdColorCurve.cpp.
References _height, _width, rebuildCurve(), and resize().
CCurveScene::~CCurveScene | ( | ) |
Definition at line 42 of file SeExprEdColorCurve.cpp.
References _curve.
void CCurveScene::addPoint | ( | double | x, | |
const SeVec3d | y, | |||
const T_INTERP | interp, | |||
const bool | select = true | |||
) |
Definition at line 69 of file SeExprEdColorCurve.cpp.
References _baseRectW, _cvs, _pixmapDirty, _selectedItem, SeExpr::clamp(), cvSelected(), drawPoints(), and rebuildCurve().
Referenced by SeExprEdColorCurve::addPoint(), and mousePressEvent().
void CCurveScene::curveChanged | ( | ) | [signal] |
Referenced by emitCurveChanged().
Referenced by addPoint(), mouseMoveEvent(), and mousePressEvent().
void CCurveScene::drawPoints | ( | ) |
Definition at line 285 of file SeExprEdColorCurve.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 CCurveScene::drawRect | ( | ) |
Definition at line 270 of file SeExprEdColorCurve.cpp.
References _baseRect, _baseRectW, _height, and _width.
Referenced by resize().
void CCurveScene::emitCurveChanged | ( | ) |
Definition at line 214 of file SeExprEdColorCurve.cpp.
References curveChanged().
Referenced by interpChanged(), mouseMoveEvent(), mousePressEvent(), SeExprEdColorCurve::openDetail(), removePoint(), selPosChanged(), and selValChanged().
QByteArray CCurveScene::getCPixmap | ( | ) | [private] |
Definition at line 232 of file SeExprEdColorCurve.cpp.
References _curve, _height, _width, SeExpr::SeCurve< T >::getValue(), SeExpr::max(), and SeExpr::min().
Referenced by getPixmap().
QPixmap & CCurveScene::getPixmap | ( | ) |
Definition at line 219 of file SeExprEdColorCurve.cpp.
References _height, _pixmap, _pixmapDirty, _width, and getCPixmap().
Referenced by SeExprEdCBoxWidget::paintEvent().
void CCurveScene::interpChanged | ( | const int | interp | ) | [slot] |
Definition at line 172 of file SeExprEdColorCurve.cpp.
References _baseRectW, _cvs, _interp, _pixmapDirty, _selectedItem, emitCurveChanged(), and rebuildCurve().
void CCurveScene::keyPressEvent | ( | QKeyEvent * | event | ) | [virtual] |
Definition at line 105 of file SeExprEdColorCurve.cpp.
References _selectedItem, and removePoint().
void CCurveScene::mouseMoveEvent | ( | QGraphicsSceneMouseEvent * | mouseEvent | ) | [virtual] |
Definition at line 147 of file SeExprEdColorCurve.cpp.
References _baseRectW, _cvs, _interp, _lmb, _pixmapDirty, _selectedItem, _width, SeExpr::clamp(), cvSelected(), drawPoints(), emitCurveChanged(), point, and rebuildCurve().
void CCurveScene::mousePressEvent | ( | QGraphicsSceneMouseEvent * | mouseEvent | ) | [virtual] |
Definition at line 114 of file SeExprEdColorCurve.cpp.
References _circleObjects, _color, _curve, _cvs, _interp, _lmb, _selectedItem, _width, addPoint(), SeExpr::clamp(), cvSelected(), drawPoints(), emitCurveChanged(), SeExpr::SeCurve< T >::getLowerBoundCV(), SeExpr::SeCurve< T >::kMonotoneSpline, and SeExpr::SeCurve< T >::kNone.
void CCurveScene::mouseReleaseEvent | ( | QGraphicsSceneMouseEvent * | mouseEvent | ) | [virtual] |
Definition at line 165 of file SeExprEdColorCurve.cpp.
References _lmb.
void CCurveScene::rebuildCurve | ( | ) |
Definition at line 60 of file SeExprEdColorCurve.cpp.
References _curve, _cvs, SeExpr::SeCurve< T >::addPoint(), and SeExpr::SeCurve< T >::preparePoints().
Referenced by addPoint(), CCurveScene(), interpChanged(), mouseMoveEvent(), removePoint(), selPosChanged(), and selValChanged().
void CCurveScene::removeAll | ( | ) |
Definition at line 99 of file SeExprEdColorCurve.cpp.
References _cvs.
Referenced by SeExprEdColorCurve::openDetail().
void CCurveScene::removePoint | ( | const int | index | ) |
Definition at line 87 of file SeExprEdColorCurve.cpp.
References _baseRectW, _cvs, _pixmapDirty, _selectedItem, drawPoints(), emitCurveChanged(), and rebuildCurve().
Referenced by keyPressEvent().
void CCurveScene::resize | ( | const int | width, | |
const int | height | |||
) | [slot] |
Definition at line 48 of file SeExprEdColorCurve.cpp.
References _height, _pixmap, _pixmapDirty, _width, drawPoints(), and drawRect().
Referenced by CCurveScene().
void CCurveScene::selPosChanged | ( | double | pos | ) | [slot] |
Definition at line 185 of file SeExprEdColorCurve.cpp.
References _baseRectW, _cvs, _pixmapDirty, _selectedItem, SeExpr::clamp(), drawPoints(), emitCurveChanged(), and rebuildCurve().
void CCurveScene::selValChanged | ( | const SeVec3d & | val | ) | [slot] |
Definition at line 199 of file SeExprEdColorCurve.cpp.
References _baseRectW, _color, _cvs, _pixmapDirty, _selectedItem, drawPoints(), emitCurveChanged(), and rebuildCurve().
Referenced by SeExprEdColorCurve::setSwatchColor().
friend class SeExprEdColorCurve [friend] |
Definition at line 68 of file SeExprEdColorCurve.h.
QGraphicsProxyWidget* CCurveScene::_baseRect [private] |
Definition at line 93 of file SeExprEdColorCurve.h.
Referenced by drawRect().
QWidget* CCurveScene::_baseRectW [private] |
Definition at line 92 of file SeExprEdColorCurve.h.
Referenced by addPoint(), drawRect(), interpChanged(), mouseMoveEvent(), removePoint(), selPosChanged(), and selValChanged().
std::vector<QGraphicsEllipseItem *> CCurveScene::_circleObjects [private] |
Definition at line 88 of file SeExprEdColorCurve.h.
Referenced by drawPoints(), and mousePressEvent().
SeVec3d CCurveScene::_color [private] |
Definition at line 86 of file SeExprEdColorCurve.h.
Referenced by mousePressEvent(), and selValChanged().
T_CURVE* CCurveScene::_curve [private] |
Definition at line 70 of file SeExprEdColorCurve.h.
Referenced by getCPixmap(), mousePressEvent(), rebuildCurve(), and ~CCurveScene().
std::vector<T_CURVE::CV> CCurveScene::_cvs |
Definition at line 66 of file SeExprEdColorCurve.h.
Referenced by addPoint(), SeExprEdCCurveControl::curveChanged(), drawPoints(), interpChanged(), mouseMoveEvent(), mousePressEvent(), SeExprEdColorCurve::openDetail(), rebuildCurve(), removeAll(), removePoint(), selPosChanged(), and selValChanged().
int CCurveScene::_height [private] |
Definition at line 85 of file SeExprEdColorCurve.h.
Referenced by CCurveScene(), drawPoints(), drawRect(), getCPixmap(), getPixmap(), and resize().
T_INTERP CCurveScene::_interp [private] |
Definition at line 87 of file SeExprEdColorCurve.h.
Referenced by interpChanged(), mouseMoveEvent(), and mousePressEvent().
bool CCurveScene::_lmb [private] |
Definition at line 94 of file SeExprEdColorCurve.h.
Referenced by mouseMoveEvent(), mousePressEvent(), and mouseReleaseEvent().
QPixmap CCurveScene::_pixmap [private] |
Definition at line 90 of file SeExprEdColorCurve.h.
Referenced by getPixmap(), and resize().
bool CCurveScene::_pixmapDirty [private] |
Definition at line 91 of file SeExprEdColorCurve.h.
Referenced by addPoint(), getPixmap(), interpChanged(), mouseMoveEvent(), removePoint(), resize(), selPosChanged(), and selValChanged().
int CCurveScene::_selectedItem [private] |
Definition at line 89 of file SeExprEdColorCurve.h.
Referenced by addPoint(), drawPoints(), interpChanged(), keyPressEvent(), mouseMoveEvent(), mousePressEvent(), removePoint(), selPosChanged(), and selValChanged().
int CCurveScene::_width [private] |
Definition at line 84 of file SeExprEdColorCurve.h.
Referenced by CCurveScene(), drawPoints(), drawRect(), getCPixmap(), getPixmap(), mouseMoveEvent(), mousePressEvent(), and resize().