- Timestamp:
- May 11, 2006, 12:22:03 AM (19 years ago)
- Location:
- branches/qt_gui/src/lib/gui/qt_gui
- Files:
-
- 4 edited
- 2 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/qt_gui/src/lib/gui/qt_gui/Makefile.am
r7542 r7585 21 21 \ 22 22 gui_video.cc \ 23 gui_audio.cc 23 gui_audio.cc \ 24 gui_general.cc 24 25 25 26 noinst_HEADERS= \ … … 28 29 \ 29 30 gui_video.h \ 30 gui_audio.h 31 gui_audio.h \ 32 gui_general.cc 33 31 34 32 35 EXTRA_DIST = -
branches/qt_gui/src/lib/gui/qt_gui/gui_general.cc
r7582 r7585 25 25 26 26 27 #include "gui_ audio.h"27 #include "gui_general.h" 28 28 29 29 #include <QtGui/QLayout> … … 35 35 { 36 36 /** 37 * Creates the Audio-Option-Frame37 * Creates the General-Option-Frame 38 38 */ 39 Gui Audio::GuiAudio(OrxGui::Gui* gui)40 : Element(" Audio", gui), QGroupBox()39 GuiGeneral::GuiGeneral(OrxGui::Gui* gui) 40 : Element("General", gui), QGroupBox() 41 41 { 42 42 QGridLayout* layout = new QGridLayout(this); 43 43 44 44 { 45 QtGuiCheckBox* fullscreen = new QtGuiCheckBox("Enabled", this, true); 46 layout->addWidget(fullscreen, 0, 1); 45 QLabel* dataDirLabel = new QLabel("DataDirectory"); 46 layout->addWidget(dataDirLabel, 0,0); 47 QtGuiInputLine* dataDir = new QtGuiInputLine("SoundCard", this); 48 layout->addWidget(dataDir, 0, 1, 1, 2); 47 49 50 QLabel* debugLabel = new QLabel("debug-mode"); 51 layout->addWidget(debugLabel, 1,0); 52 QtGuiComboBox* debug = new QtGuiComboBox("debug", this); 53 layout->addWidget(debug, 1, 1, 1, 2); 48 54 49 QLabel* soundCardLabel = new QLabel("Soundcard"); 50 layout->addWidget(soundCardLabel, 1,1); 51 QtGuiComboBox* soundCard = new QtGuiComboBox("SoundCard", this); 52 layout->addWidget(soundCard, 2, 1); 53 54 QtGuiSlider* channels = new QtGuiSlider("Channels", this, Qt::Vertical); 55 layout->addWidget(channels, 0, 0, 3, 1); 56 QLabel* channelsLabel = new QLabel("Channels"); 57 layout->addWidget(channelsLabel, 3,0); 58 59 60 QLabel* musicLabel = new QLabel("Music Volume"); 61 layout->addWidget(musicLabel, 0, 2); 62 QtGuiSlider* musicVolume = new QtGuiSlider("Music-Volume", this); 63 layout->addWidget(musicVolume, 1, 2); 64 65 66 QLabel* effectsLabel = new QLabel("Effects Volume"); 67 layout->addWidget(effectsLabel, 2,2); 68 QtGuiSlider* effectVolume = new QtGuiSlider("Effects-Volume", this); 69 layout->addWidget(effectVolume, 3, 2); 55 debug->addItem("0 - minimal"); 56 debug->addItem("1 - errors"); 57 debug->addItem("2 - warnings"); 58 debug->addItem("3 - information"); 59 debug->addItem("4 - debug"); 60 debug->addItem("5 - extremely debug"); 70 61 } 71 62 … … 74 65 75 66 /** 76 * Destructs the Audio-stuff67 * Destructs the General-stuff 77 68 */ 78 Gui Audio::~GuiAudio()69 GuiGeneral::~GuiGeneral() 79 70 { 80 71 // nothing to do here. -
branches/qt_gui/src/lib/gui/qt_gui/gui_general.h
r7582 r7585 1 1 /*! 2 \file gui_ audio.h3 \brief File that holds the class that creates the Audio-Options.2 \file gui_general.h 3 \brief File that holds the class that creates the General-Options. 4 4 */ 5 #ifndef _GUI_ AUDIO_H6 #define _GUI_ AUDIO_H5 #ifndef _GUI_GENERAL_H 6 #define _GUI_GENERAL_H 7 7 8 8 #include "../gui_element.h" … … 14 14 { 15 15 //! Class that creates the Audio-Options. 16 class Gui Audio: public OrxGui::Element, public QGroupBox16 class GuiGeneral : public OrxGui::Element, public QGroupBox 17 17 { 18 18 public: 19 Gui Audio(OrxGui::Gui* gui);20 virtual ~Gui Audio();19 GuiGeneral(OrxGui::Gui* gui); 20 virtual ~GuiGeneral(); 21 21 22 22 }; 23 23 } 24 24 25 #endif /* _GUI_ AUDIO_H */25 #endif /* _GUI_GENERAL_H */ -
branches/qt_gui/src/lib/gui/qt_gui/qt_gui.cc
r7555 r7585 25 25 #include "gui_video.h" 26 26 #include "gui_audio.h" 27 #include "gui_general.h" 27 28 28 29 namespace OrxGui … … 43 44 toolBox->addItem(new GuiVideo(this), "Video"); 44 45 toolBox->addItem(new GuiAudio(this), "Audio"); 46 toolBox->addItem(new GuiGeneral(this), "General"); 45 47 } 46 48 mainLayout->addWidget(toolBox,1,1, 1, 3); -
branches/qt_gui/src/lib/gui/qt_gui/qt_gui_elements.cc
r7555 r7585 33 33 { 34 34 this->setTristate(value.getBool()); 35 35 this->value() = value; 36 36 } 37 37 … … 81 81 82 82 83 QtGuiInputLine::QtGuiInputLine(const std::string& name, SaveableGroup* group) 84 : QLineEdit(), Saveable(name, group) 85 { 86 87 88 } 89 90 91 void QtGuiInputLine::load(const MultiType& value) 92 { 93 this->setText(value.getString().c_str()); 94 this->value() = value; 95 } 96 97 98 99 const MultiType& QtGuiInputLine::save() 100 { 101 return this->value(); 102 } 103 104 105 106 83 107 } -
branches/qt_gui/src/lib/gui/qt_gui/qt_gui_elements.h
r7555 r7585 70 70 }; 71 71 72 class QtGuiInputLine : public QLineEdit, public OrxGui::Saveable 73 { 74 Q_OBJECT 75 76 public: 77 QtGuiInputLine(const std::string& name, SaveableGroup* group); 78 79 virtual void load(const MultiType& value); 80 virtual const MultiType& save(); 81 }; 82 72 83 } 73 84
Note: See TracChangeset
for help on using the changeset viewer.