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

frame.h

00001 /***************************************************************************
00002  *   Copyright (C) 2005 by Bjoern Erik Nilsen & Fredrik Berg Kjoelstad     *
00003  *   bjoern_erik_nilsen@hotmail.com & fredrikbk@hotmail.com                *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 2 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write to the                         *
00017  *   Free Software Foundation, Inc.,                                       *
00018  *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
00019  ***************************************************************************/
00020 #ifndef FRAME_H
00021 #define FRAME_H
00022 
00023 #include "src/config.h"
00024 #include "src/technical/audio/audioformat.h"
00025 #include "src/technical/audio/audiodriver.h"
00026 
00027 #include <vector>
00028 #include <string>
00029 using namespace std;
00030 
00036 class Frame
00037 {
00038 public:
00040         static unsigned int tmpNum;
00041         
00043         static unsigned int trashNum;
00044         
00051          Frame(const char *filename); 
00052          
00056          ~Frame();
00057          
00065         int addSound(const char *filename);
00066         
00071         void removeSound( unsigned int soundNumber );
00072         
00077         unsigned int getNumberOfSounds();
00078         
00084         vector<AudioFormat*>& getSounds();
00085         
00092         void setSoundName(unsigned int soundNumber, char* soundName);
00093         
00099         char* getSoundName(unsigned int soundNumber);
00100          
00105         char* getImagePath();
00106          
00115         void moveToProjectDir(const char *imageDir, const char *soundDir, unsigned int imgNum);
00116          
00120         void copyToTemp();
00121          
00125         void moveToTrash();
00126           
00130         void markAsProjectFile();
00131         
00135         void playSounds(AudioDriver *driver);
00136         
00141         bool isProjectFrame();
00142  
00143 private:
00145         static char tempPath[256];
00146         
00148         static char trashPath[256];
00149         
00152         char *imagePath; // absolute path
00153         
00155         vector<AudioFormat*> sounds;
00156         
00159         vector<string> soundNames;
00160         
00163         bool isProjectFile;
00164         
00166         int soundNum;
00167 
00172         void moveToSoundDir(const char *directory);
00173         
00179         void moveToImageDir(const char *directory, unsigned int imgNum);
00180         
00186         char* getImageId();
00187 };
00188 
00189 #endif

Generated on Thu May 19 01:51:20 2005 for stopmotion.kdevelop by  doxygen 1.4.2