Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

Scene Class Reference

#include <scene.h>

List of all members.

Public Member Functions

 Scene ()
 ~Scene ()
vector< Frame * > & getFrames ()
vector< char * > getImagePaths ()
unsigned int getSize ()
FramegetFrame (unsigned int frameNumber)
const vector< char * > addFrames (const vector< char * > &frameNames, unsigned int index, Frontend *frontend, unsigned int &numberOfCanceledFrames)
const vector< char * > removeFrames (unsigned int fromFrame, const unsigned int toFrame)
void moveFrames (unsigned int fromFrame, unsigned int toFrame, unsigned int movePosition)
void cleanFrames (unsigned int fromFrame, unsigned int toFrame)
char * addFrame (char *frameName, unsigned int &index)
void addSavedFrame (Frame *f)
int addSound (unsigned int frameNumber, const char *sound)
void removeSound (unsigned int frameNumber, unsigned int soundNumber)
void setSoundName (unsigned int frameNumber, unsigned int soundNumber, char *soundName)


Detailed Description

Class representing the scenes in the animation

Author:
Bjoern Erik Nilsen & Fredrik Berg Kjoelstad


Constructor & Destructor Documentation

Scene::Scene  ) 
 

Initializes the scene

Scene::~Scene  ) 
 

Cleans up the scene and delete the frames.


Member Function Documentation

char * Scene::addFrame char *  frameName,
unsigned int &  index
 

Creates a frame with the picture at location frameName and adds it at position at position index in the scene.

Parameters:
frameName the path to the picture to the frame to create.
index the place to create the frame.
Returns:
the new path to the picture file for the undo object.

const vector< char * > Scene::addFrames const vector< char * > &  frameNames,
unsigned int  index,
Frontend frontend,
unsigned int &  numberOfCanceledFrames
 

Adds the frames in the vector frameNames to the vector at position index.

Parameters:
frameNames the paths to the pictures of the frames to add to the scene.
index the location to add the frames to.
frontend the frontend for process handling.
numberOfCanceledFrames reference transfered int for setting how many frames was canceled in case the user aborts the adding while this functions runs.
Returns:
the new paths of the frames for the undo object, or NULL if the operation was canceled.

void Scene::addSavedFrame Frame f  ) 
 

Adds an already saved frame.

Parameters:
f the frame to add

int Scene::addSound unsigned int  frameNumber,
const char *  sound
 

Adds a sound located at the path ``sound'' to the frame at location frameNumber in the scene.

Parameters:
frameNumber the frame to add the sound to.
sound the path to the sound file containing the sound.
Returns:
zero on success, less than zero on failure; -1 = file is not readable -2 = not a valid audio file

void Scene::cleanFrames unsigned int  fromFrame,
unsigned int  toFrame
 

Cleans frames from the scene without moving them around. Used when the user aborts while adding frames.

Parameters:
fromFrame the first frame to remove.
toFrame the last frame to remove.

Frame * Scene::getFrame unsigned int  frameNumber  ) 
 

Retrieves the frame at position frameNumber in the scene.

Parameters:
frameNumber the number of the frame to retrieve.
Returns:
the frame at position frameNumber.

vector< Frame * > & Scene::getFrames  ) 
 

Temporary functions to assist in an orderly transfer of functionality from Animation, without having to break the project for big time-periods.

vector< char * > Scene::getImagePaths  ) 
 

Retrieves the image paths of all the frames in this scene. (This is an convenience function and is used when opening scenes)

Returns:
the image paths of all the frames in this scene.

unsigned int Scene::getSize  ) 
 

Retrieves the size of the scene (the number of frames in it).

Returns:
the number of frames in the scene.

void Scene::moveFrames unsigned int  fromFrame,
unsigned int  toFrame,
unsigned int  movePosition
 

Moves the frames at the positions from fromFrame to toFrame (inclusive) to the position movePosition inside the scene.

Parameters:
fromFrame the first frame to move.
toFrame the lst frame to move.
movePosition the position to move the frames to.

const vector< char * > Scene::removeFrames unsigned int  fromFrame,
const unsigned int  toFrame
 

Remove the frames at the positions from fromFrame to toFrame (inclusive) from the scene.

Parameters:
fromFrame the first frame to remove from the scene.
toFrame the last frame to remove from the scene.
Returns:
the new paths where the frame pictures has been moved. This is for the undo object.

void Scene::removeSound unsigned int  frameNumber,
unsigned int  soundNumber
 

Removes the the sound with the number soundNumber from the frame at location frameNumber.

Parameters:
frameNumber the frame to remove the sound from.
soundNumber the index of the sound to remove from the frame at index frameNumber.

void Scene::setSoundName unsigned int  frameNumber,
unsigned int  soundNumber,
char *  soundName
 

Sets the name of the sound at index soundNumber in the frame at location frameNumber to soundName.

Parameters:
frameNumber the frame containing the sound to change the name of.
soundNumber the sound to change the name of.
soundName the new name for the sound.


The documentation for this class was generated from the following files:
Generated on Thu May 19 01:51:22 2005 for stopmotion.kdevelop by  doxygen 1.4.2