Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: orxonox.OLD/branches/qt_gui/src/lib/gui/gui.cc @ 7555

Last change on this file since 7555 was 7555, checked in by bensch, 18 years ago

orxonox/qt_gui: more elaborate Saveables

File size: 1.5 KB
RevLine 
[4744]1/*
[1853]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.
[1855]10
11   ### File Specific:
12   main-programmer: ...
13   co-programmer: ...
[1853]14*/
15
[3955]16//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_
[1853]17
[7476]18#include "gui.h"
[1853]19
[7476]20namespace OrxGui
[3365]21{
[4320]22
23
[7476]24  /**
25   * standard constructor
26  */
27  Gui::Gui ()
28  {
29    //this->setClassID(CL_PROTO_ID, "Gui");
[7547]30    this->state = Gui::Null;
[7476]31  }
[1853]32
33
[7476]34  /**
35   * standard deconstructor
36  */
37  Gui::~Gui ()
38  {
39    // delete what has to be deleted here
40  }
[7547]41
[7555]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
[7547]64  void Gui::quitEvent()
65  {
66    this->state |= Gui::Quitting;
67  }
[7548]68
69  void Gui::startEvent()
70  {
71    this->state |= Gui::Starting;
72  }
[3543]73}
Note: See TracBrowser for help on using the repository browser.