Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/qt_gui/src/lib/gui/qt_gui/gui_audio.cc @ 7599

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

qt_gui: more saveable

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* fullscreen = new QtGuiCheckBox(CONFIG_NAME_DISABLE_AUDIO, this, true);
48      layout->addWidget(fullscreen, 0, 1);
49
50
51      QLabel* soundCardLabel = new QLabel("Soundcard");
52      layout->addWidget(soundCardLabel, 1,1);
53      QtGuiComboBox* soundCard = new QtGuiComboBox(CONFIG_NAME_SOUNDCARD, this);
54      layout->addWidget(soundCard, 2, 1);
55
56
57      QtGuiSlider* channels = new QtGuiSlider(CONFIG_NAME_AUDIO_CHANNELS, this, Qt::Vertical);
58      layout->addWidget(channels, 0, 0, 2, 1);
59      QLabel* channelsLabel = new QLabel("Channels");
60      layout->addWidget(channelsLabel, 3,0);
61      QLCDNumber* channelNumber = new QLCDNumber();
62      connect(channels, SIGNAL(valueChanged(int)), channelNumber, SLOT(display(int)));
63      layout->addWidget(channelNumber, 2,0);
64
65
66      QLabel* musicLabel = new QLabel("Music Volume");
67      layout->addWidget(musicLabel, 0, 2);
68      QtGuiSlider* musicVolume = new QtGuiSlider(CONFIG_NAME_MUSIC_VOLUME, this);
69      layout->addWidget(musicVolume, 1, 2);
70
71
72      QLabel* effectsLabel = new QLabel("Effects Volume");
73      layout->addWidget(effectsLabel, 2,2);
74      QtGuiSlider* effectVolume = new QtGuiSlider(CONFIG_NAME_EFFECTS_VOLUME, this);
75      layout->addWidget(effectVolume, 3, 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.