Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/trunk/src/lib/gui/qt_gui/gui_audio.cc @ 7799

Last change on this file since 7799 was 7661, checked in by bensch, 19 years ago

orxonox/trunk: merged the QT_GUI back to the trunk
merged with command:
svn merge https://svn.orxonox.net/orxonox/branches/qt_gui . -r7607:HEAD

absolutely no conflicts :)

File size: 2.5 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, 0,1);
53      QtGuiComboBox* soundCard = new QtGuiComboBox(CONFIG_NAME_SOUNDCARD, this, "");
54      layout->addWidget(soundCard, 0, 2);
55
56
57      QtGuiSlider* channels = new QtGuiSlider(CONFIG_NAME_AUDIO_CHANNELS, this, 16, Qt::Vertical);
58      layout->addWidget(channels, 0, 3, 2, 1);
59      QLabel* channelsLabel = new QLabel("Channels");
60      layout->addWidget(channelsLabel, 3,3);
61      QLCDNumber* channelNumber = new QLCDNumber();
62      connect(channels, SIGNAL(valueChanged(int)), channelNumber, SLOT(display(int)));
63      layout->addWidget(channelNumber, 2,3);
64
65
66      QLabel* musicLabel = new QLabel("Music Volume");
67      layout->addWidget(musicLabel, 1, 0);
68      QtGuiSlider* musicVolume = new QtGuiSlider(CONFIG_NAME_MUSIC_VOLUME, this, 80);
69      layout->addWidget(musicVolume, 2, 0, 1, 2);
70
71
72      QLabel* effectsLabel = new QLabel("Effects Volume");
73      layout->addWidget(effectsLabel, 3, 0);
74      QtGuiSlider* effectVolume = new QtGuiSlider(CONFIG_NAME_EFFECTS_VOLUME, this, 80);
75      layout->addWidget(effectVolume, 4, 0, 1, 2);
76    }
77
78
79  }
80
81  /**
82   *  Destructs the Audio-stuff
83  */
84  GuiAudio::~GuiAudio()
85  {
86    // nothing to do here.
87  }
88
89
90}
Note: See TracBrowser for help on using the repository browser.