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

Frame Class Reference

#include <frame.h>

List of all members.

Public Member Functions

 Frame (const char *filename)
 ~Frame ()
int addSound (const char *filename)
void removeSound (unsigned int soundNumber)
unsigned int getNumberOfSounds ()
vector< AudioFormat * > & getSounds ()
void setSoundName (unsigned int soundNumber, char *soundName)
char * getSoundName (unsigned int soundNumber)
char * getImagePath ()
void moveToProjectDir (const char *imageDir, const char *soundDir, unsigned int imgNum)
void copyToTemp ()
void moveToTrash ()
void markAsProjectFile ()
void playSounds (AudioDriver *driver)
bool isProjectFrame ()

Static Public Attributes

static unsigned int tmpNum = 0
static unsigned int trashNum = 0


Detailed Description

Class representing the frames in the animation

Author:
Bjoern Erik Nilsen & Fredrik Berg Kjoelstad


Constructor & Destructor Documentation

Frame::Frame const char *  filename  ) 
 

Creates a frame with the picture in the file with name filename,

Parameters:
filename the filename of the picture for this frame.

Frame::~Frame  ) 
 

Cleans up after the frame


Member Function Documentation

int Frame::addSound const char *  filename  ) 
 

Adds the sound in the file filename to this frame.

Parameters:
filename the name of the file where the sound is.
Returns:
zero on success, less than zero on failure; -1 = file is not readable -2 = not a valid audio file

void Frame::copyToTemp  ) 
 

Copies the files belonging to this frame to a temporary directory.

char * Frame::getImagePath  ) 
 

Retrieves the absolute path to the picture of this frame.

Returns:
the absolute path to the picture of this frame.

unsigned int Frame::getNumberOfSounds  ) 
 

Returns the number of sounds in this frame.

Returns:
the number of sounds in this frame.

char * Frame::getSoundName unsigned int  soundNumber  ) 
 

Retrieves the name of the sound at index soundNumber in this frame.

Parameters:
soundNumber the sound to return.
Returns:
the sound at index soundNumber in this frame.

vector< AudioFormat * > & Frame::getSounds  ) 
 

Returns the sounds belonging to this frame.

Returns:
a vector containing audio objects which kan be played with the implemented audio driver

bool Frame::isProjectFrame  ) 
 

Checks if this frame is a project frame.

Returns:
true if a project frame, false otherwise

void Frame::markAsProjectFile  ) 
 

Sets this frame as a valid project file.

void Frame::moveToProjectDir const char *  imageDir,
const char *  soundDir,
unsigned int  imgNum
 

Moves sounds and images belonging to this frame into project directories.

Parameters:
imageDir the image directory to move images into
soundDir the sound directory to move sounds into
imgNum a number describing the position of this frame relative to the other frames. E.g. 000005 if this frame is number five in the sequence of frames.

void Frame::moveToTrash  ) 
 

Moves the files belonging to this frame to a trash directory.

void Frame::playSounds AudioDriver driver  ) 
 

Plays the sounds belonging to this frame.

void Frame::removeSound unsigned int  soundNumber  ) 
 

Removes sound number soundNumber from this frame.

Parameters:
soundNumber 

void Frame::setSoundName unsigned int  soundNumber,
char *  soundName
 

Sets the name of the sound at index soundNumber in this frame to soundName

Parameters:
soundNumber the number of the sound to change the name of.
soundName the new name of the sound.


Member Data Documentation

unsigned int Frame::tmpNum = 0 [static]
 

Number of files in the temporary directory.

unsigned int Frame::trashNum = 0 [static]
 

Number of files in the trash directory.


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