Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/lib/gui/qt/gui_audio.cc @ 10585

Last change on this file since 10585 was 8145, checked in by bensch, 18 years ago

trunk: merged the gui back
merged with command:
svn merge -r8114:HEAD https://svn.orxonox.net/orxonox/branches/gui .
→ no conflicts

File size: 3.0 KB
RevLine 
[4777]1/*
[2581]2   orxonox - the future of 3D-vertical-scrollers
3
4   Copyright (C) 2004 orx
5
6   This program is free software; you can redistribute it and/or modify
7   it under the terms of the GNU General Public License as published by
8   the Free Software Foundation; either version 2, or (at your option)
9   any later version.
10
11   This program is distributed in the hope that it will be useful,
12   but WITHOUT ANY WARRANTY; without even the implied warranty of
13   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14   GNU General Public License for more details.
15
16   You should have received a copy of the GNU General Public License
17   along with this program; if not, write to the Free Software Foundation,
[4777]18   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
[2581]19
20
21   ### File Specific:
22   main-programmer: Benjamin Grauer
23
24*/
25
26
[7495]27#include "gui_audio.h"
[7484]28
[7534]29#include <QtGui/QLayout>
[7595]30#include <QtGui/QLCDNumber>
[7481]31#include "debug.h"
[7599]32#include "globals.h"
[3624]33
[7539]34#include "qt_gui_elements.h"
[7484]35
[7481]36namespace OrxGui
[2018]37{
[7481]38  /**
[7495]39   *  Creates the Audio-Option-Frame
[7481]40  */
[7549]41  GuiAudio::GuiAudio(OrxGui::Gui* gui)
[7858]42      : Element(CONFIG_SECTION_AUDIO, gui), QGroupBox()
[4064]43  {
[7484]44    QGridLayout* layout = new QGridLayout(this);
[7493]45
[7484]46    {
[7636]47      QtGuiCheckBox* disableAudio = new QtGuiCheckBox(CONFIG_NAME_DISABLE_AUDIO, this, false);
48      layout->addWidget(disableAudio, 0, 0);
[7484]49
[7493]50
[7551]51      QLabel* soundCardLabel = new QLabel("Soundcard");
[7856]52      layout->addWidget(soundCardLabel, 1,0);
[7632]53      QtGuiComboBox* soundCard = new QtGuiComboBox(CONFIG_NAME_SOUNDCARD, this, "");
[7856]54      layout->addWidget(soundCard, 1, 1, 1, 2);
[7855]55      soundCard->addItem("Not supportet yet");
[7493]56
[7595]57
[7632]58      QtGuiSlider* channels = new QtGuiSlider(CONFIG_NAME_AUDIO_CHANNELS, this, 16, Qt::Vertical);
[7856]59      layout->addWidget(channels, 1, 3, 3, 1);
[7551]60      QLabel* channelsLabel = new QLabel("Channels");
[7856]61      layout->addWidget(channelsLabel, 5,3);
[7595]62      QLCDNumber* channelNumber = new QLCDNumber();
63      connect(channels, SIGNAL(valueChanged(int)), channelNumber, SLOT(display(int)));
[7856]64      layout->addWidget(channelNumber, 4, 3);
[7493]65
[7551]66
67      QLabel* musicLabel = new QLabel("Music Volume");
[7856]68      layout->addWidget(musicLabel, 2, 0);
[7632]69      QtGuiSlider* musicVolume = new QtGuiSlider(CONFIG_NAME_MUSIC_VOLUME, this, 80);
[7856]70      layout->addWidget(musicVolume, 3, 0, 1, 2);
[7551]71
[7856]72      QLCDNumber* musicNumber = new QLCDNumber();
73      connect(musicVolume, SIGNAL(valueChanged(int)), musicNumber, SLOT(display(int)));
74      layout->addWidget(musicNumber, 2, 1);
[7551]75
[7856]76
[7551]77      QLabel* effectsLabel = new QLabel("Effects Volume");
[7856]78      layout->addWidget(effectsLabel, 4, 0);
[7632]79      QtGuiSlider* effectVolume = new QtGuiSlider(CONFIG_NAME_EFFECTS_VOLUME, this, 80);
[7856]80      layout->addWidget(effectVolume, 5, 0, 1, 2);
81
82      QLCDNumber* effectsNumber = new QLCDNumber();
83      connect(effectVolume, SIGNAL(valueChanged(int)), effectsNumber, SLOT(display(int)));
84      layout->addWidget(effectsNumber, 4, 1);
85
[7484]86    }
87
88
[4064]89  }
[2018]90
[7481]91  /**
[7495]92   *  Destructs the Audio-stuff
[7481]93  */
[7495]94  GuiAudio::~GuiAudio()
[7481]95  {
96    // nothing to do here.
97  }
[3423]98
99
[3624]100}
Note: See TracBrowser for help on using the repository browser.