File indexing completed on 2024-05-05 04:56:27
0001 /*************************************************************************** 0002 * Copyright (C) 2005-2008 by Bjoern Erik Nilsen & Fredrik Berg Kjoelstad* 0003 * bjoern.nilsen@bjoernen.com & fredrikbk@hotmail.com * 0004 * * 0005 * This program is free software; you can redistribute it and/or modify * 0006 * it under the terms of the GNU General Public License as published by * 0007 * the Free Software Foundation; either version 2 of the License, or * 0008 * (at your option) any later version. * 0009 * * 0010 * This program is distributed in the hope that it will be useful, * 0011 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 0012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 0013 * GNU General Public License for more details. * 0014 * * 0015 * You should have received a copy of the GNU General Public License * 0016 * along with this program; if not, write to the * 0017 * Free Software Foundation, Inc., * 0018 * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * 0019 ***************************************************************************/ 0020 #ifndef SOUNDHANDLER_H 0021 #define SOUNDHANDLER_H 0022 0023 #include "src/config.h" 0024 0025 #include <QObject> 0026 #include <QStatusBar> 0027 #include <QListWidget> 0028 0029 class FrameBar; 0030 0031 /** 0032 * This class handles request related to sounds (adding, removing, etc). 0033 * 0034 * @author Bjoern Erik Nilsen & Fredrik Berg Kjoelstad 0035 */ 0036 class SoundHandler : public QObject { 0037 Q_OBJECT 0038 public: 0039 /** 0040 * Creates and initializes the Soundhandler. 0041 * @param parent the parent of the soundhandler. 0042 * @param sb a statusbar for displaying status information to the user. 0043 * @param homeDir the home directory of the user. 0044 * @param name the name of the soundhandler 0045 */ 0046 SoundHandler ( QObject *parent = 0, QStatusBar *sb = 0, 0047 const FrameBar* frameBar = 0, const char* homeDir = 0, 0048 const char *name = 0 ); 0049 0050 /** 0051 * Add the soundsList to the handler so that it can be cleared and filled as 0052 * needed. 0053 * @param soundsList the listbox to add to the handler. 0054 */ 0055 //void setSoundsList(Q3ListBox *soundsList); 0056 void setSoundsList(QListWidget *soundsList); 0057 0058 public slots: 0059 0060 /** 0061 * Attaches a sound to a frame in the animation. 0062 */ 0063 void addSound(); 0064 0065 /** 0066 * Removes a sound from a frame in the animation. 0067 */ 0068 void removeSound(); 0069 0070 /** 0071 * Sets the name of a sound in a frame in the animation. 0072 */ 0073 void setSoundName(); 0074 0075 private: 0076 QStatusBar *statusBar; 0077 const FrameBar* frameBar; 0078 const char* homeDir; 0079 //Q3ListBox *soundsList; 0080 QListWidget *soundsList; 0081 }; 0082 0083 #endif