Index: branches/qt_gui/src/lib/gui/gui.cc
===================================================================
--- branches/qt_gui/src/lib/gui/gui.cc	(revision 7543)
+++ branches/qt_gui/src/lib/gui/gui.cc	(revision 7547)
@@ -28,4 +28,5 @@
   {
     //this->setClassID(CL_PROTO_ID, "Gui");
+    this->state = Gui::Null;
   }
 
@@ -38,3 +39,8 @@
     // delete what has to be deleted here
   }
+
+  void Gui::quitEvent()
+  {
+    this->state |= Gui::Quitting;
+  }
 }
Index: branches/qt_gui/src/lib/gui/gui.h
===================================================================
--- branches/qt_gui/src/lib/gui/gui.h	(revision 7543)
+++ branches/qt_gui/src/lib/gui/gui.h	(revision 7547)
@@ -16,4 +16,12 @@
   class Gui : public BaseObject
   {
+    public:
+      typedef enum {
+        Null          = 0,
+        Quitting      = 1,
+        Startig       = 2,
+        Saving        = 4,
+      } State;
+
 
   public:
@@ -29,4 +37,12 @@
     //! Update the Gui.
     virtual void update() = 0;
+
+    unsigned int getState() const { return this->state; };
+
+  protected:
+    void quitEvent();
+
+    private:
+      unsigned int        state; //!< The State the Gui is in.
   };
 }
Index: branches/qt_gui/src/lib/gui/qt_gui/gui_video.cc
===================================================================
--- branches/qt_gui/src/lib/gui/qt_gui/gui_video.cc	(revision 7543)
+++ branches/qt_gui/src/lib/gui/qt_gui/gui_video.cc	(revision 7547)
@@ -31,8 +31,5 @@
 #include "debug.h"
 
-
-#include <QtGui/QPushButton>
-#include <QtGui/QCheckBox>
-#include <QtGui/QComboBox>
+#include "qt_gui_elements.h"
 
 namespace OrxGui
@@ -42,14 +39,14 @@
   */
   GuiVideo::GuiVideo(QWidget* parent)
-  : Element("Video"), QGroupBox(parent)
+      : Element("Video"), QGroupBox(parent)
   {
     QGridLayout* layout = new QGridLayout(this);
 
     {
-      QCheckBox* fullscreen = new QCheckBox(QString("FullScreen"), this);
+      QtGuiCheckBox* fullscreen = new QtGuiCheckBox("FullScreen", this);
       //fullscreen->setName();
       layout->addWidget(fullscreen, 0, 0);
 
-      QCheckBox* wireframe = new QCheckBox("Wireframe mode", this);
+      QtGuiCheckBox* wireframe = new QtGuiCheckBox("Wireframe mode", this);
       layout->addWidget(wireframe, 1, 0);
 
@@ -63,43 +60,34 @@
       }
 
+
+      QGroupBox* advanced = new QGroupBox("advanced");
+      {
+        QGridLayout* advLayout = new QGridLayout(advanced);              //!< Advanced Layout
+        {
+          QtGuiCheckBox* shadows = new QtGuiCheckBox("Shadows");         //!< CheckBox for shadows
+          advLayout->addWidget(shadows, 0,0);
+          QtGuiCheckBox* fog = new QtGuiCheckBox("Fog");                 //!< CheckBox for fog.
+          advLayout->addWidget(fog, 1,0);
+          QtGuiCheckBox* reflections = new QtGuiCheckBox("reflections");  //!< CheckBox for reflections
+          advLayout->addWidget(reflections, 2, 0);
+          QtGuiCheckBox* textures = new QtGuiCheckBox("textures");       //!< CheckBox for textures
+          advLayout->addWidget(textures, 3, 0);
+          /*
+          Menu* textureDetail;      //!< Menu for the Texture-Detail.
+          Label* modelDetailLabel;  //!< Label for model-detail.
+          Menu* modelDetail;        //!< model-detail.
+          CheckBox* particles;   //!< If the Particles should be enabled
+          Label* antiAliasingLabel; //!< Label for the anti-aliasing mode.
+          Menu* antiAliasing;       //!< Menu for the Antialiasing-mode.
+          Label* filterMethodLabel; //!< Label for filtering-Method.
+          Menu* filterMethod;       //!< Menu for filtering Method.
+          Button* closeButton;      //!< A Button to close the Advanced-settingsWindow.
+          */
+        }
+      }
+
+      layout->addWidget(advanced, 0, 2, 4, 1);
+
     }
-
-
-
-/*    Frame* videoFrame;        //!< The Frame that holds the video options.
-
-    videoFrame = new Frame("Video-Options:");
-    videoFrame->setGroupName("video");
-    {
-      Box* videoBox;            //!< The Box that holds the video options.
-
-      videoBox = new Box('v');
-      {
-        CheckButton* fullscreen;  //!< CheckButton for fullscreen-mode
-        Menu* resolution;         //!< Menu for the resolution
-        CheckButton* wireframe;   //!< CheckButton for wireframe Mode.
-
-        fullscreen = new CheckButton(CONFIG_NAME_FULLSCREEN);
-        fullscreen->setFlagName("windowed", "q", 1);
-        fullscreen->setDescription("Starts orxonox in windowed mode");
-        fullscreen->saveability();
-        videoBox->fill(fullscreen);
-        resolution = new Menu(CONFIG_NAME_RESOLUTION);
-        getResolutions(resolution);
-        resolution->saveability();
-        resolution->setFlagName("resolution", "r", 0);
-        resolution->setDescription("Sets the resolution of orxonox");
-        videoBox->fill(resolution);
-        wireframe = new CheckButton(CONFIG_NAME_WIREFRAME);
-        wireframe->setFlagName("wireframe", "w", 0);
-        wireframe->setDescription("Starts orxonox in wireframe mode");
-        wireframe->saveability();
-        videoBox->fill(wireframe);
-
-        videoBox->fill(advancedWindowCreate());
-      }
-      videoFrame->fill(videoBox);
-    }
-    setMainWidget(videoFrame);*/
   }
 
Index: branches/qt_gui/src/orxonox.cc
===================================================================
--- branches/qt_gui/src/orxonox.cc	(revision 7543)
+++ branches/qt_gui/src/orxonox.cc	(revision 7547)
@@ -500,6 +500,6 @@
     gui->startGui();
 
-//    if (!gui->startOrxonox)
-//      return 0;
+    if (gui->getState() & OrxGui::Gui::Quitting)
+      return 0;
 
     delete gui;
