#include <domainfacade.h>
Public Member Functions | |
void | attatch (Observer *o) |
void | detatch (Observer *o) |
void | registerFrontend (Frontend *frontend) |
Frontend * | getFrontend () |
void | setActiveFrame (int frameNumber) |
int | getActiveFrameNumber () |
void | addFrames (const vector< char * > &frameNames) |
void | removeFrames (unsigned int fromFrame, unsigned int toFrame) |
void | moveFrames (unsigned int fromFrame, unsigned int toFrame, unsigned int movePosition) |
int | addSound (unsigned int frameNumber, const char *filename) |
void | removeSound (unsigned int frameNumber, unsigned int soundNumber) |
void | setSoundName (unsigned int frameNumber, unsigned int soundNumber, char *soundName) |
void | playFrame (int frameNumber) |
bool | openProject (const char *filename) |
bool | saveProject (const char *filename) |
bool | newProject () |
bool | isUnsavedChanges () |
Frame * | getFrame (unsigned int frameNumber, unsigned int sceneNumber) |
Frame * | getFrame (unsigned int frameNumber) |
unsigned int | getModelSize () |
unsigned int | getSceneSize (int sceneNumber) |
unsigned int | getNumberOfScenes () |
const char * | getProjectFile () |
bool | undo () |
bool | redo () |
void | clearHistory () |
void | setActiveScene (int sceneNumber) |
int | getActiveSceneNumber () |
void | newScene (int index) |
void | removeScene (int sceneNumber) |
void | moveScene (int sceneNumber, int movePosition) |
bool | initAudioDevice () |
void | shutdownAudioDevice () |
bool | exportToVideo (VideoEncoder *encoder) |
bool | exportToCinerella (const char *file) |
void | animationChanged (const char *alteredFile) |
Static Public Member Functions | |
static DomainFacade * | getFacade () |
Protected Member Functions | |
DomainFacade () |
DomainFacade is implemented with lazy allocation.
|
The constructor. It is protected so that it will be impossible for other classes, who doesn't inherit from it to instanciate the singleton. |
|
Adds the frames in the vector to the animation model and sets up the undo command object
|
|
Adds a sound the given frame number. An error message will be sent to the frontend if somethings goes wrong with the adding.
|
|
Tells the domain that the file alteredFile has been changed outside the program and that it should be updated.
|
|
Attatches a new observer to the model. The observer will be notified when something is changed in the model.
|
|
Clears the undo history. |
|
Detatches an observer from the model. The observer will no longer be notified when something is changed in the model.
|
|
Exports the current project to a Cinerella project.
|
|
Exports the current project to a video file as specified by the video encoder.
|
|
Returns the number of the currently active frame in the model.
|
|
Returns the number of the currently active scene.
|
|
Static function to retrieve the factory instance object from the singleton class.
|
|
Overloaded function for convenience. Assumes the scene to retrieve there frame from is the active scene.
|
|
Retrieves a given frame.
|
|
Retrieves the registered frontend.
|
|
Retrieves the size of the model
|
|
Function for retrieving number of scenes.
|
|
Retrieves the project file.
|
|
Function for retrieving number of frames in a given scene.
|
|
Initializes the audio device so it is ready to play sounds. It will sends an error message to the frontend if somethings goes wrong, and audio will be disabled until the problem is fixed.
|
|
Checks if there are unsaved changes in the model.
|
|
Moves the frames in the frameNumbers container to toPosition.
|
|
Moves the scene at position sceneNumber to the position movePosition.
|
|
Creates a new project. |
|
Creates a new scene in the animation project.
|
|
Opens a project. |
|
Plays the frame with the number frameNumber
|
|
Redoes the last undo operation. |
|
Registers the GUI frontend which is used to display and update a progress bar when running time consuming operations.
|
|
Removes the frame between (inclusive) fromFrame and toFrame from the animation model.
|
|
Removes the scene at the location sceneNumber from the animation.
|
|
Removes the sound with index soundNumber from the frame with index frameNumber.
|
|
Saves the active project to a XML-file which is written to disk. |
|
Function to change the currently active frame. (Working frame).
|
|
Sets a new active scene (the scene to be worked on now).
|
|
Sets the name of the sound with index soundNumber in the frame with index frameNumber to soundName.
|
|
Shutdowns the audio device so other programs can use it. |
|
Undoes the last undoable operation on the model. |