Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

Last change on this file since 9879 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
Line 
1/*
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,
18   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
20
21   ### File Specific:
22   main-programmer: Benjamin Grauer
23
24*/
25
26
27#include "gui_audio.h"
28
29#include <QtGui/QLayout>
30#include <QtGui/QLCDNumber>
31#include "debug.h"
32#include "globals.h"
33
34#include "qt_gui_elements.h"
35
36namespace OrxGui
37{
38  /**
39   *  Creates the Audio-Option-Frame
40  */
41  GuiAudio::GuiAudio(OrxGui::Gui* gui)
42      : Element(CONFIG_SECTION_AUDIO, gui), QGroupBox()
43  {
44    QGridLayout* layout = new QGridLayout(this);
45
46    {
47      QtGuiCheckBox* disableAudio = new QtGuiCheckBox(CONFIG_NAME_DISABLE_AUDIO, this, false);
48      layout->addWidget(disableAudio, 0, 0);
49
50
51      QLabel* soundCardLabel = new QLabel("Soundcard");
52      layout->addWidget(soundCardLabel, 1,0);
53      QtGuiComboBox* soundCard = new QtGuiComboBox(CONFIG_NAME_SOUNDCARD, this, "");
54      layout->addWidget(soundCard, 1, 1, 1, 2);
55      soundCard->addItem("Not supportet yet");
56
57
58      QtGuiSlider* channels = new QtGuiSlider(CONFIG_NAME_AUDIO_CHANNELS, this, 16, Qt::Vertical);
59      layout->addWidget(channels, 1, 3, 3, 1);
60      QLabel* channelsLabel = new QLabel("Channels");
61      layout->addWidget(channelsLabel, 5,3);
62      QLCDNumber* channelNumber = new QLCDNumber();
63      connect(channels, SIGNAL(valueChanged(int)), channelNumber, SLOT(display(int)));
64      layout->addWidget(channelNumber, 4, 3);
65
66
67      QLabel* musicLabel = new QLabel("Music Volume");
68      layout->addWidget(musicLabel, 2, 0);
69      QtGuiSlider* musicVolume = new QtGuiSlider(CONFIG_NAME_MUSIC_VOLUME, this, 80);
70      layout->addWidget(musicVolume, 3, 0, 1, 2);
71
72      QLCDNumber* musicNumber = new QLCDNumber();
73      connect(musicVolume, SIGNAL(valueChanged(int)), musicNumber, SLOT(display(int)));
74      layout->addWidget(musicNumber, 2, 1);
75
76
77      QLabel* effectsLabel = new QLabel("Effects Volume");
78      layout->addWidget(effectsLabel, 4, 0);
79      QtGuiSlider* effectVolume = new QtGuiSlider(CONFIG_NAME_EFFECTS_VOLUME, this, 80);
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
86    }
87
88
89  }
90
91  /**
92   *  Destructs the Audio-stuff
93  */
94  GuiAudio::~GuiAudio()
95  {
96    // nothing to do here.
97  }
98
99
100}
Note: See TracBrowser for help on using the repository browser.