Changeset 7549 in orxonox.OLD for branches/qt_gui
- Timestamp:
- May 6, 2006, 10:52:49 AM (19 years ago)
- Location:
- branches/qt_gui/src/lib/gui
- Files:
-
- 12 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/qt_gui/src/lib/gui/gui.h
r7548 r7549 8 8 9 9 #include "base_object.h" 10 #include <vector> 10 11 11 12 // FORWARD DECLARATION … … 13 14 namespace OrxGui 14 15 { 16 class SaveableGroup; 17 15 18 //! A class for ... 16 19 class Gui : public BaseObject 17 20 { 18 19 20 21 22 23 24 21 public: 22 typedef enum { 23 Null = 0, 24 Quitting = 1, 25 Starting = 2, 26 Saving = 4, 27 } State; 25 28 26 29 … … 40 43 unsigned int getState() const { return this->state; }; 41 44 45 46 void addSaveableGroup(SaveableGroup* saveableGroup); 47 42 48 protected: 43 49 void quitEvent(); 44 50 void startEvent(); 45 51 46 private: 47 unsigned int state; //!< The State the Gui is in. 52 private: 53 unsigned int state; //!< The State the Gui is in. 54 std::vector<SaveableGroup*> groups; 48 55 }; 49 56 } -
branches/qt_gui/src/lib/gui/gui_element.cc
r7539 r7549 27 27 * standard constructor 28 28 */ 29 Element::Element (const std::string& name )30 : SaveableGroup(name )29 Element::Element (const std::string& name, OrxGui::Gui* gui) 30 : SaveableGroup(name, gui) 31 31 { 32 32 //this->mainWidget = NULL; -
branches/qt_gui/src/lib/gui/gui_element.h
r7539 r7549 13 13 { 14 14 class Widget; 15 class Gui; 15 16 16 17 //! A SuperClass for all the Different GuiElements 17 18 class Element : public SaveableGroup 18 19 { 19 20 20 public: 21 Element(const std::string& name );21 Element(const std::string& name, OrxGui::Gui* gui); 22 22 virtual ~Element(); 23 23 }; -
branches/qt_gui/src/lib/gui/gui_saveable.cc
r7493 r7549 48 48 49 49 50 SaveableGroup::SaveableGroup(const std::string& groupName )50 SaveableGroup::SaveableGroup(const std::string& groupName, OrxGui::Gui* gui) 51 51 : Saveable(groupName) 52 52 { 53 53 54 } 54 55 -
branches/qt_gui/src/lib/gui/gui_saveable.h
r7539 r7549 14 14 namespace OrxGui 15 15 { 16 class Gui; 17 16 18 //! A class for ... 17 19 class Saveable : public BaseObject … … 52 54 53 55 protected: 54 SaveableGroup(const std::string& name );56 SaveableGroup(const std::string& name, OrxGui::Gui* gui); 55 57 virtual void makingElementSaveable(); 56 58 -
branches/qt_gui/src/lib/gui/qt_gui/gui_audio.cc
r7539 r7549 37 37 * Creates the Audio-Option-Frame 38 38 */ 39 GuiAudio::GuiAudio( QWidget* parent)40 : Element("Audio" ), QGroupBox(parent)39 GuiAudio::GuiAudio(OrxGui::Gui* gui) 40 : Element("Audio", gui), QGroupBox() 41 41 { 42 42 QGridLayout* layout = new QGridLayout(this); … … 44 44 { 45 45 QtGuiCheckBox* fullscreen = new QtGuiCheckBox("Enabled", true); 46 //fullscreen->setName();47 46 layout->addWidget(fullscreen, 0, 0); 48 47 … … 50 49 layout->addWidget(wireframe, 1, 0); 51 50 52 QtGuiComboBox* resolution= new QtGuiComboBox("SoundCard");53 layout->addWidget( resolution, 2, 0);51 QtGuiComboBox* soundCard = new QtGuiComboBox("SoundCard"); 52 layout->addWidget(soundCard, 2, 0); 54 53 54 QtGuiSlider* channels = new QtGuiSlider("Channels"); 55 layout->addWidget(channels, 3, 0); 55 56 57 QtGuiSlider* musicVolume = new QtGuiSlider("Music-Volume"); 58 layout->addWidget(musicVolume,0, 1); 59 QtGuiSlider* effectVolume = new QtGuiSlider("Effects-Volume"); 60 layout->addWidget(effectVolume, 0, 2); 56 61 } 57 62 -
branches/qt_gui/src/lib/gui/qt_gui/gui_audio.h
r7534 r7549 17 17 { 18 18 public: 19 GuiAudio( QWidget* parent = NULL);19 GuiAudio(OrxGui::Gui* gui); 20 20 virtual ~GuiAudio(); 21 21 -
branches/qt_gui/src/lib/gui/qt_gui/gui_video.cc
r7547 r7549 38 38 * Creates the Video-Option-Frame 39 39 */ 40 GuiVideo::GuiVideo( QWidget* parent)41 : Element("Video" ), QGroupBox(parent)40 GuiVideo::GuiVideo(OrxGui::Gui* gui) 41 : Element("Video", gui), QGroupBox() 42 42 { 43 43 QGridLayout* layout = new QGridLayout(this); -
branches/qt_gui/src/lib/gui/qt_gui/gui_video.h
r7534 r7549 17 17 { 18 18 public: 19 GuiVideo( QWidget* parent = NULL);19 GuiVideo(OrxGui::Gui* gui); 20 20 virtual ~GuiVideo(); 21 21 -
branches/qt_gui/src/lib/gui/qt_gui/qt_gui.cc
r7548 r7549 41 41 { 42 42 43 toolBox->addItem(new GuiVideo(t oolBox), "Video");44 toolBox->addItem(new GuiAudio(t oolBox), "Audio");43 toolBox->addItem(new GuiVideo(this), "Video"); 44 toolBox->addItem(new GuiAudio(this), "Audio"); 45 45 } 46 46 mainLayout->addWidget(toolBox,1,1, 1, 3); … … 61 61 62 62 this->exec(); 63 64 65 63 } 66 64 … … 91 89 this->quit(); 92 90 } 91 93 92 void QtGui::startApp() 94 93 { -
branches/qt_gui/src/lib/gui/qt_gui/qt_gui_elements.cc
r7539 r7549 43 43 } 44 44 45 46 47 48 49 QtGuiSlider::QtGuiSlider(const std::string& name) 50 : QSlider(), Saveable(name) 51 { 52 53 } 54 QtGuiSlider::~QtGuiSlider() 55 {} 56 57 58 59 60 61 62 63 45 64 QtGuiComboBox::QtGuiComboBox(const std::string& name) 46 65 : QComboBox(), Saveable(name) -
branches/qt_gui/src/lib/gui/qt_gui/qt_gui_elements.h
r7543 r7549 48 48 49 49 public: 50 QtGuiSlider( );51 virtual ~QtGuiSlider() {};50 QtGuiSlider(const std::string& name); 51 virtual ~QtGuiSlider(); 52 52 53 53 public slots:
Note: See TracChangeset
for help on using the changeset viewer.