/* 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, 1,0); QtGuiComboBox* soundCard = new QtGuiComboBox(CONFIG_NAME_SOUNDCARD, this, ""); layout->addWidget(soundCard, 1, 1, 1, 2); soundCard->addItem("Not supportet yet"); QtGuiSlider* channels = new QtGuiSlider(CONFIG_NAME_AUDIO_CHANNELS, this, 16, Qt::Vertical); layout->addWidget(channels, 1, 3, 3, 1); QLabel* channelsLabel = new QLabel("Channels"); layout->addWidget(channelsLabel, 5,3); QLCDNumber* channelNumber = new QLCDNumber(); connect(channels, SIGNAL(valueChanged(int)), channelNumber, SLOT(display(int))); layout->addWidget(channelNumber, 4, 3); QLabel* musicLabel = new QLabel("Music Volume"); layout->addWidget(musicLabel, 2, 0); QtGuiSlider* musicVolume = new QtGuiSlider(CONFIG_NAME_MUSIC_VOLUME, this, 80); layout->addWidget(musicVolume, 3, 0, 1, 2); QLCDNumber* musicNumber = new QLCDNumber(); connect(musicVolume, SIGNAL(valueChanged(int)), musicNumber, SLOT(display(int))); layout->addWidget(musicNumber, 2, 1); QLabel* effectsLabel = new QLabel("Effects Volume"); layout->addWidget(effectsLabel, 4, 0); QtGuiSlider* effectVolume = new QtGuiSlider(CONFIG_NAME_EFFECTS_VOLUME, this, 80); layout->addWidget(effectVolume, 5, 0, 1, 2); QLCDNumber* effectsNumber = new QLCDNumber(); connect(effectVolume, SIGNAL(valueChanged(int)), effectsNumber, SLOT(display(int))); layout->addWidget(effectsNumber, 4, 1); } } /** * Destructs the Audio-stuff */ GuiAudio::~GuiAudio() { // nothing to do here. } }