Open 3D Engine LyShine Gem API Reference  24.09
O3DE is an open-source, fully-featured, high-fidelity, modular 3D engine for building games and simulations, available to every industry.
SplineWidget Class Reference

Inherits QWidget, and AbstractSplineWidget.

Inherited by CUiAnimViewSplineCtrl.

Signals

void beforeChange ()
 
void change ()
 
void timeChange ()
 
void scrollZoomRequested ()
 
void clicked ()
 
void rightClicked ()
 

Public Member Functions

 SplineWidget (QWidget *parent)
 
void update () override
 
void update (const QRect &rect) override
 
QPoint mapFromGlobal (const QPoint &point) const override
 
void SetTimelineCtrl (TimelineWidget *pTimelineCtrl)
 
QWidget * WidgetCast () override
 
- Public Member Functions inherited from AbstractSplineWidget
int InsertKey (ISplineInterpolator *pSpline, ISplineInterpolator *pDetailSpline, const QPoint &point)
 
virtual void SetCapture ()
 
void SetGrid (int numX, int numY)
 
void SetTimeRange (const Range &range)
 
void SetValueRange (const Range &range)
 
void SetDefaultValueRange (const Range &range)
 
void SetDefaultKeyTangentType (ESplineKeyTangentType type)
 
ESplineKeyTangentType GetDefaultKeyTangentType () const
 
void SetTooltipValueScale (float x, float y)
 
void SetSplineSet (ISplineSet *pSplineSet)
 
void AddSpline (ISplineInterpolator *pSpline, ISplineInterpolator *pDetailSpline, COLORREF color)
 
void AddSpline (ISplineInterpolator *pSpline, ISplineInterpolator *pDetailSpline, COLORREF anColorArray[4])
 
void RemoveSpline (ISplineInterpolator *pSpline)
 
void RemoveAllSplines ()
 
int GetSplineCount () const
 
ISplineInterpolator * GetSpline (int nIndex) const
 
void SetTimeMarker (float fTime)
 
float GetTimeMarker () const
 
void SetTimeScale (float timeScale)
 
void SetGridTimeScale (float fGridTimeScale)
 
float GetGridTimeScale ()
 
void SetMinTimeEpsilon (float fMinTimeEpsilon)
 
float GetMinTimeEpsilon () const
 
void SetSnapTime (bool bOn)
 
void SetSnapValue (bool bOn)
 
bool IsSnapTime () const
 
bool IsSnapValue () const
 
float SnapTimeToGridVertical (float time)
 
void OnUserCommand (UINT cmd)
 
void FitSplineToViewWidth ()
 
void FitSplineToViewHeight ()
 
void CopyKeys ()
 
void PasteKeys ()
 
void StoreUndo ()
 
void ZeroAll ()
 
void KeyAll ()
 
void SelectAll ()
 
void RemoveSelectedKeyTimes ()
 
void RedrawWindowAroundMarker ()
 
void SplinesChanged ()
 
void SetControlAmplitude (bool controlAmplitude)
 
bool GetControlAmplitude () const
 
void GotoNextKey (bool previousKey)
 
void RemoveAllKeysButThis ()
 
Vec2 ClientToWorld (const QPoint &point)
 
QPoint WorldToClient (Vec2 v)
 
Vec2 GetZoom ()
 
void SetZoom (Vec2 zoom, const QPoint &center)
 
void SetZoom (Vec2 zoom)
 
void SetScrollOffset (Vec2 ofs)
 
Vec2 GetScrollOffset ()
 
float SnapTime (float time)
 
float SnapValue (float val)
 
virtual int GetKeyTimeCount () const
 
virtual float GetKeyTime (int index) const
 
virtual void MoveKeyTimes (int numChanges, int *indices, float scale, float offset, bool copyKeys)
 
virtual bool GetKeyTimeSelected (int index) const
 
virtual void SetKeyTimeSelected (int index, bool selected)
 
virtual int GetKeyCount (int index) const
 
virtual int GetKeyCountBound () const
 
virtual void BeginEdittingKeyTimes ()
 
virtual void EndEdittingKeyTimes ()
 
void SetEditLock (bool bLock)
 

Protected Member Functions

void paintEvent (QPaintEvent *event) override
 
void resizeEvent (QResizeEvent *event) override
 
void mousePressEvent (QMouseEvent *event) override
 
void mouseReleaseEvent (QMouseEvent *event) override
 
void mouseMoveEvent (QMouseEvent *event) override
 
void mouseDoubleClickEvent (QMouseEvent *event) override
 
void wheelEvent (QWheelEvent *event) override
 
void OnLButtonDown (const QPoint &point, Qt::KeyboardModifiers modifiers)
 
void OnLButtonUp (const QPoint &point, Qt::KeyboardModifiers modifiers)
 
void OnRButtonDown (const QPoint &point, Qt::KeyboardModifiers modifiers)
 
void OnMButtonDown (const QPoint &point, Qt::KeyboardModifiers modifiers)
 
void OnMButtonUp (const QPoint &point, Qt::KeyboardModifiers modifiers)
 
void DrawGrid (QPainter *painter)
 
void DrawSpline (QPainter *pDC, SSplineInfo &splineInfo, float startTime, float endTime)
 
void DrawKeys (QPainter *painter, int splineIndex, float startTime, float endTime)
 
void DrawTimeMarker (QPainter *pDC)
 
void DrawTangentHandle (QPainter *pDC, int nSpline, int nKey, int nDimension)
 
void SendNotifyEvent (int nEvent) override
 
void captureMouseImpl () override
 
void releaseMouseImpl () override
 
void setCursorImpl (UINT cursor) override
 
- Protected Member Functions inherited from AbstractSplineWidget
virtual bool GetTangentHandlePts (QPoint &inTangentPt, QPoint &pt, QPoint &outTangentPt, int nSpline, int nKey, int nDimension)
 
EHitCode HitTest (const QPoint &point)
 
ISplineInterpolator * HitSpline (const QPoint &point)
 
void StartTracking (bool copyKeys)
 
void StopTracking ()
 
void RemoveKey (ISplineInterpolator *pSpline, int nKey)
 
void RemoveSelectedKeys ()
 
void RemoveSelectedKeyTimesImpl ()
 
void MoveSelectedKeys (Vec2 offset, bool copyKeys)
 
void ScaleAmplitudeKeys (float time, float startValue, float offset)
 
void TimeScaleKeys (float time, float startTime, float endTime)
 
void ValueScaleKeys (float startValue, float endValue)
 
void ModifySelectedKeysFlags (int nRemoveFlags, int nAddFlags)
 
QPoint TimeToPoint (float time, ISplineInterpolator *pSpline)
 
float TimeToXOfs (float x)
 
void PointToTimeValue (QPoint point, float &time, float &value)
 
float XOfsToTime (int x)
 
QPoint XOfsToPoint (int x, ISplineInterpolator *pSpline)
 
virtual void ClearSelection ()
 
virtual void SelectKey (ISplineInterpolator *pSpline, int nKey, int nDimension, bool bSelect)
 
bool IsKeySelected (ISplineInterpolator *pSpline, int nKey, int nDimension) const
 
int GetNumSelected ()
 
void SetHorizontalExtent (int min, int max)
 
virtual void SelectRectangle (const QRect &rc, bool bSelect)
 
void UpdateKeyTimes () const
 
void ConditionalStoreUndo ()
 
void ClearSelectedKeys ()
 
void DuplicateSelectedKeys ()
 
virtual ISplineCtrlUndoCreateSplineCtrlUndoObject (std::vector< ISplineInterpolator * > &splineContainer)
 

Protected Attributes

QRubberBand * m_rubberBand
 
- Protected Attributes inherited from AbstractSplineWidget
QRect m_rcClipRect
 
QRect m_rcSpline
 
QRect m_rcClient
 
QPoint m_cMousePos
 
QPoint m_cMouseDownPos
 
QPoint m_hitPoint
 
EHitCode m_hitCode
 
int m_nHitKeyIndex
 
int m_nHitDimension
 
int m_bHitIncomingHandle
 
ISplineInterpolator * m_pHitSpline
 
ISplineInterpolator * m_pHitDetailSpline
 
QPoint m_curvePoint
 
float m_fTimeMarker
 
int m_nKeyDrawRadius
 
bool m_bSnapTime
 
bool m_bSnapValue
 
bool m_bBitmapValid
 
int m_gridX
 
int m_gridY
 
float m_fMinTime
 
float m_fMaxTime
 
float m_fMinValue
 
float m_fMaxValue
 
float m_fTooltipScaleX
 
float m_fTooltipScaleY
 
float m_fMinTimeEpsilon
 
QPoint m_lastToolTipPos
 
QString m_tooltipText
 
QRect m_rcSelect
 
QRect m_TimeUpdateRect
 
float m_fTimeScale
 
float m_fValueScale
 
float m_fGridTimeScale
 
Range m_timeRange
 
Range m_valueRange
 
Range m_defaultValueRange
 
double m_ticksStep
 
EEditMode m_editMode
 
int m_nLeftOffset
 
CWndGridHelper m_grid
 
std::vector< SSplineInfom_splines
 
bool m_bKeyTimesDirty
 
std::vector< KeyTimem_keyTimes
 
int m_totalSplineCount
 
bool m_copyKeys
 
bool m_startedDragging
 
bool m_controlAmplitude
 
ESplineKeyTangentType m_defaultKeyTangentType
 
bool m_boLeftMouseButtonDown
 
ISplineSetm_pSplineSet
 
bool m_bEditLock
 
ISplineCtrlUndom_pCurrentUndo
 
AbstractTimelineWidgetm_pTimelineCtrl
 

Additional Inherited Members

- Protected Types inherited from AbstractSplineWidget
enum  EHitCode {
  HIT_NOTHING , HIT_KEY , HIT_SPLINE , HIT_TIMEMARKER ,
  HIT_TANGENT_HANDLE
}
 
enum  EEditMode {
  NothingMode = 0 , SelectMode , TrackingMode , ScrollZoomMode ,
  ScrollMode , ZoomMode , TimeMarkerMode
}
 
- Static Protected Attributes inherited from AbstractSplineWidget
static const float threshold
 

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