/* orxonox - the future of 3D-vertical-scrollers Copyright (C) 2004 orx This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. ### File Specific: main-programmer: Benjamin Grauer */ #include "gui_audio.h" #include #include #include "debug.h" #include "globals.h" #include "qt_gui_elements.h" namespace OrxGui { /** * Creates the Audio-Option-Frame */ GuiAudio::GuiAudio(OrxGui::Gui* gui) : Element(CONFIG_SECTION_AUDIO, gui), QGroupBox() { QGridLayout* layout = new QGridLayout(this); { QtGuiCheckBox* disableAudio = new QtGuiCheckBox(CONFIG_NAME_DISABLE_AUDIO, this, false); layout->addWidget(disableAudio, 0, 0); QLabel* soundCardLabel = new QLabel("Soundcard"); layout->addWidget(soundCardLabel, 0,1); QtGuiComboBox* soundCard = new QtGuiComboBox(CONFIG_NAME_SOUNDCARD, this, ""); layout->addWidget(soundCard, 0, 2); QtGuiSlider* channels = new QtGuiSlider(CONFIG_NAME_AUDIO_CHANNELS, this, 16, Qt::Vertical); layout->addWidget(channels, 0, 3, 2, 1); QLabel* channelsLabel = new QLabel("Channels"); layout->addWidget(channelsLabel, 3,3); QLCDNumber* channelNumber = new QLCDNumber(); connect(channels, SIGNAL(valueChanged(int)), channelNumber, SLOT(display(int))); layout->addWidget(channelNumber, 2,3); QLabel* musicLabel = new QLabel("Music Volume"); layout->addWidget(musicLabel, 1, 0); QtGuiSlider* musicVolume = new QtGuiSlider(CONFIG_NAME_MUSIC_VOLUME, this, 80); layout->addWidget(musicVolume, 2, 0, 1, 2); QLabel* effectsLabel = new QLabel("Effects Volume"); layout->addWidget(effectsLabel, 3, 0); QtGuiSlider* effectVolume = new QtGuiSlider(CONFIG_NAME_EFFECTS_VOLUME, this, 80); layout->addWidget(effectVolume, 4, 0, 1, 2); } } /** * Destructs the Audio-stuff */ GuiAudio::~GuiAudio() { // nothing to do here. } }