Changeset 7599 in orxonox.OLD for branches/qt_gui
- Timestamp:
- May 11, 2006, 5:47:48 PM (19 years ago)
- Location:
- branches/qt_gui/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/qt_gui/src/defs/globals.h
r7598 r7599 61 61 #define CONFIG_NAME_FILTER_METHOD "Filtering-Method" 62 62 63 #define CONFIG_NAME_SOUNDCARD "Soundcard" 63 64 #define CONFIG_NAME_DISABLE_AUDIO "Disable-Audio" 64 65 #define CONFIG_NAME_AUDIO_CHANNELS "Audio-Channels" -
branches/qt_gui/src/lib/gui/qt_gui/gui_audio.cc
r7595 r7599 30 30 #include <QtGui/QLCDNumber> 31 31 #include "debug.h" 32 #include "globals.h" 32 33 33 34 #include "qt_gui_elements.h" … … 39 40 */ 40 41 GuiAudio::GuiAudio(OrxGui::Gui* gui) 41 : Element( "Audio", gui), QGroupBox()42 : Element(CONFIG_SECTION_AUDIO, gui), QGroupBox() 42 43 { 43 44 QGridLayout* layout = new QGridLayout(this); 44 45 45 46 { 46 QtGuiCheckBox* fullscreen = new QtGuiCheckBox( "Enabled", this, true);47 QtGuiCheckBox* fullscreen = new QtGuiCheckBox(CONFIG_NAME_DISABLE_AUDIO, this, true); 47 48 layout->addWidget(fullscreen, 0, 1); 48 49 … … 50 51 QLabel* soundCardLabel = new QLabel("Soundcard"); 51 52 layout->addWidget(soundCardLabel, 1,1); 52 QtGuiComboBox* soundCard = new QtGuiComboBox( "SoundCard", this);53 QtGuiComboBox* soundCard = new QtGuiComboBox(CONFIG_NAME_SOUNDCARD, this); 53 54 layout->addWidget(soundCard, 2, 1); 54 55 55 56 56 QtGuiSlider* channels = new QtGuiSlider( "Channels", this, Qt::Vertical);57 QtGuiSlider* channels = new QtGuiSlider(CONFIG_NAME_AUDIO_CHANNELS, this, Qt::Vertical); 57 58 layout->addWidget(channels, 0, 0, 2, 1); 58 59 QLabel* channelsLabel = new QLabel("Channels"); … … 65 66 QLabel* musicLabel = new QLabel("Music Volume"); 66 67 layout->addWidget(musicLabel, 0, 2); 67 QtGuiSlider* musicVolume = new QtGuiSlider( "Music-Volume", this);68 QtGuiSlider* musicVolume = new QtGuiSlider(CONFIG_NAME_MUSIC_VOLUME, this); 68 69 layout->addWidget(musicVolume, 1, 2); 69 70 … … 71 72 QLabel* effectsLabel = new QLabel("Effects Volume"); 72 73 layout->addWidget(effectsLabel, 2,2); 73 QtGuiSlider* effectVolume = new QtGuiSlider( "Effects-Volume", this);74 QtGuiSlider* effectVolume = new QtGuiSlider(CONFIG_NAME_EFFECTS_VOLUME, this); 74 75 layout->addWidget(effectVolume, 3, 2); 75 76 } -
branches/qt_gui/src/lib/gui/qt_gui/qt_gui_elements.cc
r7598 r7599 42 42 void QtGuiCheckBox::save() 43 43 { 44 this->value() = this->checkState(); 45 Saveable::save(); 44 46 } 45 47 … … 53 55 54 56 } 57 55 58 QtGuiSlider::~QtGuiSlider() 56 59 {} 57 60 61 void QtGuiSlider::load() 62 { 63 Saveable::load(); 64 this->setValue(this->Saveable::value().getInt()); 65 } 66 67 void QtGuiSlider::save() 68 { 69 this->Saveable::value() = this->QSlider::value(); 70 Saveable::save(); 71 } 58 72 59 73 -
branches/qt_gui/src/lib/gui/qt_gui/qt_gui_elements.h
r7598 r7599 51 51 virtual ~QtGuiSlider(); 52 52 53 virtual void load(); 54 virtual void save(); 55 53 56 public slots: 54 57 // void setSliderValue(float);
Note: See TracChangeset
for help on using the changeset viewer.