Last change
on this file since 7574 was
7555,
checked in by bensch, 19 years ago
|
orxonox/qt_gui: more elaborate Saveables
|
File size:
1.5 KB
|
Line | |
---|
1 | /* |
---|
2 | orxonox - the future of 3D-vertical-scrollers |
---|
3 | |
---|
4 | Copyright (C) 2004 orx |
---|
5 | |
---|
6 | This program is free software; you can redistribute it and/or modify |
---|
7 | it under the terms of the GNU General Public License as published by |
---|
8 | the Free Software Foundation; either version 2, or (at your option) |
---|
9 | any later version. |
---|
10 | |
---|
11 | ### File Specific: |
---|
12 | main-programmer: ... |
---|
13 | co-programmer: ... |
---|
14 | */ |
---|
15 | |
---|
16 | //#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_ |
---|
17 | |
---|
18 | #include "gui.h" |
---|
19 | |
---|
20 | namespace OrxGui |
---|
21 | { |
---|
22 | |
---|
23 | |
---|
24 | /** |
---|
25 | * standard constructor |
---|
26 | */ |
---|
27 | Gui::Gui () |
---|
28 | { |
---|
29 | //this->setClassID(CL_PROTO_ID, "Gui"); |
---|
30 | this->state = Gui::Null; |
---|
31 | } |
---|
32 | |
---|
33 | |
---|
34 | /** |
---|
35 | * standard deconstructor |
---|
36 | */ |
---|
37 | Gui::~Gui () |
---|
38 | { |
---|
39 | // delete what has to be deleted here |
---|
40 | } |
---|
41 | |
---|
42 | |
---|
43 | /** |
---|
44 | * @brief adds a SaveableGroup |
---|
45 | * @param saveableGroup the SaveableGroup to add to the SaveList. |
---|
46 | */ |
---|
47 | void Gui::addSaveableGroup(SaveableGroup* saveableGroup) |
---|
48 | { |
---|
49 | if (std::find (this->groups.begin(), this->groups.end(), saveableGroup) == this->groups.end()) |
---|
50 | this->groups.push_back(saveableGroup); |
---|
51 | } |
---|
52 | |
---|
53 | /** |
---|
54 | * @brief removes a SaveableGroup |
---|
55 | * @param saveableGroup the SaveableGroup to remove from the SaveList. |
---|
56 | */ |
---|
57 | void Gui::removeSaveableGroup(SaveableGroup* saveableGroup) |
---|
58 | { |
---|
59 | std::vector<SaveableGroup*>::iterator delElem = std::find (this->groups.begin(), this->groups.end(), saveableGroup); |
---|
60 | if (delElem != this->groups.end()) |
---|
61 | this->groups.erase(delElem); |
---|
62 | } |
---|
63 | |
---|
64 | void Gui::quitEvent() |
---|
65 | { |
---|
66 | this->state |= Gui::Quitting; |
---|
67 | } |
---|
68 | |
---|
69 | void Gui::startEvent() |
---|
70 | { |
---|
71 | this->state |= Gui::Starting; |
---|
72 | } |
---|
73 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.