Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7599 in orxonox.OLD for branches/qt_gui/src/lib/gui


Ignore:
Timestamp:
May 11, 2006, 5:47:48 PM (19 years ago)
Author:
bensch
Message:

qt_gui: more saveable

Location:
branches/qt_gui/src/lib/gui/qt_gui
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • branches/qt_gui/src/lib/gui/qt_gui/gui_audio.cc

    r7595 r7599  
    3030#include <QtGui/QLCDNumber>
    3131#include "debug.h"
     32#include "globals.h"
    3233
    3334#include "qt_gui_elements.h"
     
    3940  */
    4041  GuiAudio::GuiAudio(OrxGui::Gui* gui)
    41   : Element("Audio", gui), QGroupBox()
     42  : Element(CONFIG_SECTION_AUDIO, gui), QGroupBox()
    4243  {
    4344    QGridLayout* layout = new QGridLayout(this);
    4445
    4546    {
    46       QtGuiCheckBox* fullscreen = new QtGuiCheckBox("Enabled", this, true);
     47      QtGuiCheckBox* fullscreen = new QtGuiCheckBox(CONFIG_NAME_DISABLE_AUDIO, this, true);
    4748      layout->addWidget(fullscreen, 0, 1);
    4849
     
    5051      QLabel* soundCardLabel = new QLabel("Soundcard");
    5152      layout->addWidget(soundCardLabel, 1,1);
    52       QtGuiComboBox* soundCard = new QtGuiComboBox("SoundCard", this);
     53      QtGuiComboBox* soundCard = new QtGuiComboBox(CONFIG_NAME_SOUNDCARD, this);
    5354      layout->addWidget(soundCard, 2, 1);
    5455
    5556
    56       QtGuiSlider* channels = new QtGuiSlider("Channels", this, Qt::Vertical);
     57      QtGuiSlider* channels = new QtGuiSlider(CONFIG_NAME_AUDIO_CHANNELS, this, Qt::Vertical);
    5758      layout->addWidget(channels, 0, 0, 2, 1);
    5859      QLabel* channelsLabel = new QLabel("Channels");
     
    6566      QLabel* musicLabel = new QLabel("Music Volume");
    6667      layout->addWidget(musicLabel, 0, 2);
    67       QtGuiSlider* musicVolume = new QtGuiSlider("Music-Volume", this);
     68      QtGuiSlider* musicVolume = new QtGuiSlider(CONFIG_NAME_MUSIC_VOLUME, this);
    6869      layout->addWidget(musicVolume, 1, 2);
    6970
     
    7172      QLabel* effectsLabel = new QLabel("Effects Volume");
    7273      layout->addWidget(effectsLabel, 2,2);
    73       QtGuiSlider* effectVolume = new QtGuiSlider("Effects-Volume", this);
     74      QtGuiSlider* effectVolume = new QtGuiSlider(CONFIG_NAME_EFFECTS_VOLUME, this);
    7475      layout->addWidget(effectVolume, 3, 2);
    7576    }
  • branches/qt_gui/src/lib/gui/qt_gui/qt_gui_elements.cc

    r7598 r7599  
    4242  void QtGuiCheckBox::save()
    4343  {
     44    this->value() = this->checkState();
     45    Saveable::save();
    4446  }
    4547
     
    5355
    5456  }
     57
    5558  QtGuiSlider::~QtGuiSlider()
    5659  {}
    5760
     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  }
    5872
    5973
  • branches/qt_gui/src/lib/gui/qt_gui/qt_gui_elements.h

    r7598 r7599  
    5151    virtual ~QtGuiSlider();
    5252
     53    virtual void load();
     54    virtual void save();
     55
    5356  public slots:
    5457    //   void setSliderValue(float);
Note: See TracChangeset for help on using the changeset viewer.