AnimationFrameSpinBox Class Reference

A spin box that will allow a user to select a frame of an animation. More...

#include <AnimationFrameSpinBox.h>

List of all members.

Signals

void frameChanged (const AnimationFrame &frame)

Public Member Functions

 AnimationFrameSpinBox (QWidget *pParent)
virtual ~AnimationFrameSpinBox ()
void setFrames (const std::vector< AnimationFrame > &frames, FrameType type)
void setFrames (AnimationController *pController)
void setFrames (Animation *pAnimation)
const std::vector
< AnimationFrame > & 
getFrames () const
void setCurrentFrame (const AnimationFrame &frame)
const AnimationFramegetCurrentFrame () const
virtual void stepBy (int steps)
FrameType getFrameType () const

Protected Member Functions

virtual StepEnabled stepEnabled () const
virtual QString convertToText (int index)


Detailed Description

A spin box that will allow a user to select a frame of an animation.

There are two types of animations: frame-based that uses frame values to go though the frames and time-based that go though frames by using the number of seconds since January 1, 1970. This spin box will handle both of these types.

Definition at line 30 of file AnimationFrameSpinBox.h.


Constructor & Destructor Documentation

AnimationFrameSpinBox::AnimationFrameSpinBox ( QWidget *  pParent  ) 

Creates a new animation spin box.

Parameters:
pParent The parent widget.

virtual AnimationFrameSpinBox::~AnimationFrameSpinBox (  )  [virtual]

Destroys the spin box.


Member Function Documentation

void AnimationFrameSpinBox::setFrames ( const std::vector< AnimationFrame > &  frames,
FrameType  type 
)

This method will set up the vector of animation frames that will be used in the spin box.

Parameters:
frames the animation frame vector.
type The animation type.

void AnimationFrameSpinBox::setFrames ( AnimationController pController  ) 

This method will set up the vector of animation frames that will be used in the spin box.

Parameters:
pController the controller that holds the animation frames.

void AnimationFrameSpinBox::setFrames ( Animation pAnimation  ) 

This method will set up the vector of animation frames that will be used in the spin box.

Parameters:
pAnimation A set of animation frames.

const std::vector<AnimationFrame>& AnimationFrameSpinBox::getFrames (  )  const

Returns a vector containing the spin box frames.

Returns:
The spin box frame vector.

void AnimationFrameSpinBox::setCurrentFrame ( const AnimationFrame frame  ) 

This method will make the spin box select the given animation frame if it's in the spin box.

Parameters:
frame The animation frame to set in the spin box.

const AnimationFrame& AnimationFrameSpinBox::getCurrentFrame (  )  const

This method will get the animation frame that is currently selected in the spin box.

Returns:
The selected animation frame in the spin box.

virtual void AnimationFrameSpinBox::stepBy ( int  steps  )  [virtual]

Updates the spin box text if the user triggers a step.

Parameters:
steps The number of steps.

FrameType AnimationFrameSpinBox::getFrameType (  )  const

Returns the type of animation.

Returns:
The animation type.

virtual StepEnabled AnimationFrameSpinBox::stepEnabled (  )  const [protected, virtual]

This method will determine whether the spin box can step up or step down.

Returns:
The spin box step state.

virtual QString AnimationFrameSpinBox::convertToText ( int  index  )  [protected, virtual]

This method will use the given index to get a frame from the animation frame vector and convert the frame value to text.

If there are no frames in the spin box, this method will return an empty string.

Parameters:
index The frame index used to convert the frame to text.
Returns:
The string containing the frame value.

void AnimationFrameSpinBox::frameChanged ( const AnimationFrame frame  )  [signal]

Called when the spin box text has been changed.

Parameters:
frame The new selected frame in the spin box.


Software Development Kit - Opticks 4.9.0 Build 16218