Changeset 7470 in orxonox.OLD for branches/qt_gui/src/lib
- Timestamp:
- May 2, 2006, 8:21:00 AM (19 years ago)
- Location:
- branches/qt_gui/src/lib/gui
- Files:
-
- 4 edited
- 2 copied
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
branches/qt_gui/src/lib/gui/Makefile.am
r7442 r7470 1 SUBDIRS = gtk_gui \ 2 gl_gui \ 3 qt_gui 1 MAINSRCDIR=../.. 2 include $(MAINSRCDIR)/defs/include_paths.am 3 4 AM_LDFLAGS = 5 6 noinst_LIBRARIES = libORXbasegui.a 7 8 9 libORXbasegui_a_SOURCES = \ 10 gui_element.cc \ 11 gui_saveable.cc 12 13 14 noinst_HEADERS= \ 15 gui_element.h \ 16 gui_saveable.h 17 18 EXTRA_DIST = 19 20 SUBDIRS = \ 21 . \ 22 gtk_gui \ 23 gl_gui \ 24 qt_gui -
branches/qt_gui/src/lib/gui/gtk_gui/gui_element.h
r5039 r7470 1 /*! 1 /*! 2 2 * @file gui_element.h 3 3 * Definition of ... 4 4 5 5 */ … … 16 16 GuiElement(); 17 17 virtual ~GuiElement(); 18 18 19 19 /** @returns the main Widget of this GuiElement. */ 20 Widget* getWidget() { return this->mainWidget;}20 Widget* getWidget() { return this->mainWidget; } 21 21 protected: 22 22 void setMainWidget(Widget* widget); 23 23 24 24 private: 25 25 Widget* mainWidget; -
branches/qt_gui/src/lib/gui/gui_element.cc
r7469 r7470 1 /* 1 /* 2 2 orxonox - the future of 3D-vertical-scrollers 3 3 … … 20 20 #include "gui_gtk.h" 21 21 22 using namespace std; 22 namespace OrxGui 23 { 23 24 24 25 25 /**26 * standard constructor27 @todo this constructor is not jet implemented - do it28 */29 GuiElement::GuiElement () 30 {31 this->mainWidget = NULL;32 }26 /** 27 * standard constructor 28 @todo this constructor is not jet implemented - do it 29 */ 30 GuiElement::GuiElement () 31 { 32 this->mainWidget = NULL; 33 } 33 34 34 35 35 /**36 * standard deconstructor36 /** 37 * standard deconstructor 37 38 38 */ 39 GuiElement::~GuiElement () 40 { 41 // delete what has to be deleted here 39 */ 40 GuiElement::~GuiElement () 41 { 42 // delete what has to be deleted here 43 } 44 45 /** 46 * Every GuiElement should set this, or it could result in a SegFault. 47 */ 48 void GuiElement::setMainWidget(Widget* widget) 49 { 50 this->mainWidget = widget; 51 } 42 52 } 43 44 /**45 * Every GuiElement should set this, or it could result in a SegFault.46 */47 void GuiElement::setMainWidget(Widget* widget)48 {49 this->mainWidget = widget;50 } -
branches/qt_gui/src/lib/gui/gui_element.h
r7469 r7470 1 /*! 1 /*! 2 2 * @file gui_element.h 3 3 * Definition of ... 4 4 5 5 */ … … 9 9 10 10 class Widget; 11 namespace OrxGui 12 { 13 //! A SuperClass for all the Different GuiElements 14 class GuiElement 15 { 11 16 12 //! A SuperClass for all the Different GuiElements 13 class GuiElement { 17 public: 18 GuiElement(); 19 virtual ~GuiElement(); 14 20 15 public: 16 GuiElement(); 17 virtual ~GuiElement(); 18 19 /** @returns the main Widget of this GuiElement. */ 20 Widget* getWidget() {return this->mainWidget;} 21 protected: 22 void setMainWidget(Widget* widget); 23 24 private: 25 Widget* mainWidget; 26 }; 21 /** @returns the main Widget of this GuiElement. */ 22 Widget* getWidget() { return this->mainWidget; } 23 protected: 24 void setMainWidget(Widget* widget); 27 25 26 private: 27 Widget* mainWidget; 28 }; 29 } 28 30 #endif /* _GUI_ELEMENT_H */ -
branches/qt_gui/src/lib/gui/gui_saveable.h
r7469 r7470 12 12 13 13 // FORWARD DECLARATION 14 namespace OrxGui 15 { 16 //! A class for ... 17 class GuiSaveable 18 { 19 public: 20 protected: 21 GuiSaveable(const std::string& optionName); 22 virtual ~GuiSaveable(); 14 23 15 namespace OrxGui 16 { 17 //! A class for ... 18 class GuiSaveable 19 { 20 public: 21 protected: 22 GuiSaveable(const std::string& optionName); 23 virtual ~GuiSaveable(); 24 void makeSaveable(); 24 25 25 void makeSaveable(); 26 virtual void load(const MultiType& value) = 0; 27 virtual const MultiType& save() = 0; 26 28 27 virtual void load(const MultiType& value) = 0; 28 virtual const MultiType& save() = 0; 29 MultiType& getValue() { return this->value; }; 30 const MultiType& getValue() const { return this->value; }; 31 bool isSaveable() const { return this->bSaveable; }; 29 32 30 MultiType& getValue() { return this->value; }; 31 const MultiType& getValue() const { return this->value; }; 32 bool isSaveable() const { return this->bSaveable; }; 33 protected: 34 virtual void makingElementSaveable() {}; 33 35 34 protected: 35 virtual void makingElementSaveable() {}; 36 37 private: 38 MultiType value; 39 bool bSaveable; 40 }; 36 private: 37 MultiType value; 38 bool bSaveable; 39 }; 41 40 42 41 43 42 44 class GuiSaveableGroup : virtual public GuiSaveable45 {46 public:47 GuiSaveableGroup(const std::string& name);48 ~GuiSaveableGroup();43 class GuiSaveableGroup : virtual public GuiSaveable 44 { 45 public: 46 GuiSaveableGroup(const std::string& name); 47 ~GuiSaveableGroup(); 49 48 50 void addSaveable(GuiSaveable* saveable);51 void removeSaveable(GuiSaveable* saveable);49 void addSaveable(GuiSaveable* saveable); 50 void removeSaveable(GuiSaveable* saveable); 52 51 53 protected:54 virtual void makingElementSaveable();55 private:56 std::vector<GuiSaveable*> saveables;57 static std::vector<GuiSaveableGroup*> saveableGroups;58 };52 protected: 53 virtual void makingElementSaveable(); 54 private: 55 std::vector<GuiSaveable*> saveables; 56 static std::vector<GuiSaveableGroup*> saveableGroups; 57 }; 59 58 60 } 61 59 } 62 60 #endif /* _GUI_SAVEABLE_H */ -
branches/qt_gui/src/lib/gui/qt_gui/Makefile.am
r7442 r7470 13 13 14 14 libORXqtgui_a_SOURCES = \ 15 gui_saveable.cc \16 \17 15 qt_gui.cc 18 16 19 17 noinst_HEADERS= \ 20 gui_saveable.h \21 \22 18 qt_gui.h 23 19 -
branches/qt_gui/src/lib/gui/qt_gui/qt_gui.h
r7447 r7470 8 8 9 9 #include "base_object.h" 10 #include " gui_saveable.h"10 #include "../gui_saveable.h" 11 11 #include <list> 12 12
Note: See TracChangeset
for help on using the changeset viewer.