Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

qt_gui: better stuff and so on

File size: 2.4 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
33#include "qt_gui_elements.h"
34
35namespace OrxGui
36{
37  /**
38   *  Creates the Audio-Option-Frame
39  */
40  GuiAudio::GuiAudio(OrxGui::Gui* gui)
41  : Element("Audio", gui), QGroupBox()
42  {
43    QGridLayout* layout = new QGridLayout(this);
44
45    {
46      QtGuiCheckBox* fullscreen = new QtGuiCheckBox("Enabled", this, true);
47      layout->addWidget(fullscreen, 0, 1);
48
49
50      QLabel* soundCardLabel = new QLabel("Soundcard");
51      layout->addWidget(soundCardLabel, 1,1);
52      QtGuiComboBox* soundCard = new QtGuiComboBox("SoundCard", this);
53      layout->addWidget(soundCard, 2, 1);
54
55
56      QtGuiSlider* channels = new QtGuiSlider("Channels", this, Qt::Vertical);
57      layout->addWidget(channels, 0, 0, 2, 1);
58      QLabel* channelsLabel = new QLabel("Channels");
59      layout->addWidget(channelsLabel, 3,0);
60      QLCDNumber* channelNumber = new QLCDNumber();
61      connect(channels, SIGNAL(valueChanged(int)), channelNumber, SLOT(display(int)));
62      layout->addWidget(channelNumber, 2,0);
63
64
65      QLabel* musicLabel = new QLabel("Music Volume");
66      layout->addWidget(musicLabel, 0, 2);
67      QtGuiSlider* musicVolume = new QtGuiSlider("Music-Volume", this);
68      layout->addWidget(musicVolume, 1, 2);
69
70
71      QLabel* effectsLabel = new QLabel("Effects Volume");
72      layout->addWidget(effectsLabel, 2,2);
73      QtGuiSlider* effectVolume = new QtGuiSlider("Effects-Volume", this);
74      layout->addWidget(effectVolume, 3, 2);
75    }
76
77
78  }
79
80  /**
81   *  Destructs the Audio-stuff
82  */
83  GuiAudio::~GuiAudio()
84  {
85    // nothing to do here.
86  }
87
88
89}
Note: See TracBrowser for help on using the repository browser.