#include <animationmodel.h>
Inheritance diagram for AnimationModel:
Public Member Functions | |
void | attatch (Observer *o) |
void | detatch (Observer *o) |
void | registerFrontend (Frontend *frontend) |
Frontend * | getFrontend () |
void | notifyAdd (const vector< char * > &frames, unsigned int index) |
void | notifyRemove (unsigned int fromFrame, unsigned int toFrame) |
void | notifyMove (unsigned int fromFrame, unsigned int toFrame, unsigned int movePosition) |
void | notifyNewActiveFrame (int frameNumber) |
void | notifyClear () |
void | notifyPlayFrame (int frameNumber) |
void | notifyNewScene (int index) |
void | notifyRemoveScene (int sceneNumber) |
void | notifyMoveScene (int sceneNumber, int movePosition) |
void | notifyNewActiveScene (int sceneNumber, vector< char * > framePaths, Frontend *frontend) |
void | notifyAnimationChanged (int frameNumber) |
virtual const vector< char * > | addFrames (const vector< char * > &frameNames, unsigned int index)=0 |
virtual const vector< char * > | removeFrames (unsigned int fromFrame, unsigned int toFrame)=0 |
virtual void | moveFrames (unsigned int fromFrame, unsigned int toFrame, unsigned int movePosition)=0 |
virtual int | addSound (unsigned int frameNumber, const char *filename)=0 |
virtual void | removeSound (unsigned int frameNumber, unsigned int soundNumber)=0 |
virtual void | setSoundName (unsigned int frameNumber, unsigned int soundNumber, char *soundName)=0 |
virtual Frame * | getFrame (unsigned int frameNumber, unsigned int sceneNumber)=0 |
virtual Frame * | getFrame (unsigned int frameNumber)=0 |
virtual unsigned int | getModelSize ()=0 |
virtual unsigned int | getSceneSize (int sceneNumber)=0 |
virtual unsigned int | getNumberOfScenes ()=0 |
virtual void | setActiveFrame (int frameNumber)=0 |
virtual void | playFrame (int frameNumber)=0 |
virtual int | getActiveFrameNumber ()=0 |
virtual void | clear ()=0 |
virtual const char * | getProjectFile ()=0 |
virtual bool | openProject (const char *filename)=0 |
virtual bool | saveProject (const char *filename)=0 |
virtual bool | newProject ()=0 |
virtual bool | isUnsavedChanges ()=0 |
virtual void | setActiveScene (int sceneNumber)=0 |
virtual int | getActiveSceneNumber ()=0 |
virtual void | newScene (int index)=0 |
virtual void | removeScene (int sceneNumber)=0 |
virtual void | moveScene (int sceneNumber, int movePosition)=0 |
virtual bool | initAudioDevice ()=0 |
virtual void | shutdownAudioDevice ()=0 |
virtual void | animationChanged (const char *alteredFile)=0 |
virtual bool | exportToVideo (VideoEncoder *encoder)=0 |
virtual bool | exportToCinerella (const char *file)=0 |
Protected Attributes | |
Frontend * | frontend |
AnimationModel serves as the Subject in our implementation of the observer pattern, and takes care of notifying the observers when a change occur.
|
Abstract function which adds a new frame to the AnimationModel.
Implemented in Animation. |
|
Abstract function for adding the sound from the file "sound" to frame at position frameNumber.
Implemented in Animation. |
|
Abstract function which must be implemented to handle what should happen when a frame has been altered outside the application.
Implemented in Animation. |
|
Attatches a new observer to the model. The observer will be notified when something is changed in the model.
|
|
Abstract function for clearing the model. Implemented in Animation. |
|
Detatches an observer from the model. The observer will no longer be notified when something is changed in the model.
|
|
Abstract function for exporting the current project to a Cinerella project.
Implemented in Animation. |
|
Abstract function for exporting the current project to a video file as specified by the video encoder.
Implemented in Animation. |
|
Abstract function which returns the number of the currently active frame in the model.
Implemented in Animation. |
|
Abstract function for retrieving the number of the currently active scene.
Implemented in Animation. |
|
Abstract overloaded function for convenience. Assumes the scene to retrieve there frame from is the active scene.
Implemented in Animation. |
|
Abstract function which retrieves a given frame
Implemented in Animation. |
|
Retrieves the registered frontend.
|
|
Abstract function which returns the size of the model.
Implemented in Animation. |
|
Abstract function for retrieving number of scenes.
Implemented in Animation. |
|
Abstract function for retrieving the project file
Implemented in Animation. |
|
Abstract function for retrieving number of frames in a given scene.
Implemented in Animation. |
|
Abstract function for initializing the audio device so it is ready to play sounds.
Implemented in Animation. |
|
Abstract function to check if there are unsaved changes.
Implemented in Animation. |
|
Abstract function for moving the frames from fromFrame (inclusive) to toFrame to toPosition.
Implemented in Animation. |
|
Abstract function which moves the scene at position sceneNumber to the position movePosition.
Implemented in Animation. |
|
Abstract funtion to create a new project.
Implemented in Animation. |
|
Abstract function for adding a new scene at a given index in the vector containing the scenes.
Implemented in Animation. |
|
Notify the observers that a frame is added to the model.
|
|
Notify the observers that the disk representation of the animation has been altered.
|
|
Notify the observers that the model has been cleared. |
|
Notify the observers that a frame in the model has changed location (moved).
|
|
Notify the observers that a scene in the animation has been moved.
|
|
Notify the observers the active frame in the model has changed.
|
|
Notify the observers that a new scene is set as the active scene.
|
|
Notify the observers that a new scene has been added to the animation.
|
|
Notify the observers that a frame is to be played.
|
|
Notify the observers that a selection of frames are removed from the model.
|
|
Notify the observers that a scene has been removed from the animation.
|
|
Abstract function for opening a project.
Implemented in Animation. |
|
Abstract function for playing the frame with number frameNumber.
Implemented in Animation. |
|
Registers the GUI frontend which is used to displaying and updating progress when running timeconsuming operations.
|
|
Abstract function to remove the frames between (inclusive) fromFrame and toFrame from the animation.
Implemented in Animation. |
|
Abstract function which removes the scene at the location sceneNumber from the animation.
Implemented in Animation. |
|
Abstract function which removes the sound with index soundNumber from the frame with index frameNumber.
Implemented in Animation. |
|
Abstract function which saves the active project to a XML-file which is written to disk.
Implemented in Animation. |
|
Abstract function for changing the currently active frame.
Implemented in Animation. |
|
Abstract funtion for setting new active scene.
Implemented in Animation. |
|
Abstract function whick sets the name of the sound with index soundNumber in the frame with index frameNumber to soundName.
Implemented in Animation. |
|
Abstract function for shutting down the audio device so other programs can use it. Implemented in Animation. |
|
Pointer to the frontend that can be used to display progress and error messages. |