File indexing completed on 2024-05-12 16:23:32
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 FRAMEPREFERENCESMENU_H 0021 #define FRAMEPREFERENCESMENU_H 0022 0023 #include "menuframe.h" 0024 0025 #include <QListWidget> 0026 #include <QPushButton> 0027 #include <QLabel> 0028 #include <QLayout> 0029 #include <QGridLayout> 0030 0031 class SoundHandler; 0032 class FrameBar; 0033 0034 /** 0035 * A customized GUI menu class for the frame preferences menu. 0036 * 0037 * Inherits from MenuFrame but adds some functionality around loading the 0038 * present preferences when opened. 0039 * 0040 * @author Bjoern Erik Nilsen & Fredrik Berg Kjoelstad 0041 */ 0042 class FramePreferencesMenu : public MenuFrame { 0043 Q_OBJECT 0044 public: 0045 0046 /** 0047 * Creates and sets up the preferences menu. 0048 * @param parent the parent widget 0049 * @param soundHandler the sound handler 0050 * @param frameBar The frame bar. 0051 * @param name the name of the menu 0052 */ 0053 FramePreferencesMenu( QWidget * parent = 0, SoundHandler *soundHandler = 0, 0054 const FrameBar *frameBar = 0, const char * name = 0); 0055 0056 virtual ~FramePreferencesMenu(); 0057 0058 /** 0059 * Retranslates the strings in the frame preferences menu. 0060 */ 0061 void retranslateStrings(); 0062 0063 private: 0064 SoundHandler *soundHandler; 0065 const FrameBar *frameBar; 0066 QListWidget *soundsList; 0067 QLabel *soundsLabel; 0068 QPushButton *closeButton; 0069 QPushButton *addSoundButton; 0070 QPushButton *removeSoundsButton; 0071 QPushButton *changeNameButton; 0072 QGridLayout *grid; 0073 0074 public slots: 0075 /** 0076 * Opens the menu. 0077 */ 0078 void open(); 0079 0080 /** 0081 * Closes the menu and turns the focus to the newFocusWidget. 0082 */ 0083 void close(); 0084 }; 0085 0086 #endif