Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

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

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

orxonox/trunk: QT-4 works on Tardis

File size: 1.4 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: Benjamin Grauer
13   co-programmer: ...
14*/
15
16//#define DEBUG_SPECIAL_MODULE DEBUG_MODULE_
17
18#include "qt_gui.h"
19
20#include <QtGui/QApplication>
21#include <QtGui/QToolBox>
22#include <QtGui/QGridLayout>
23
24
25#include "gui_video.h"
26#include "gui_audio.h"
27
28namespace OrxGui
29{
30  QtGui::QtGui(int argc, char** argv)
31  : QApplication(argc, argv)
32  {
33
34    this->mainWindow = new QMainWindow();
35
36
37    QGroupBox* groupBox = new QGroupBox(this->mainWindow);
38    QGridLayout* mainLayout = new QGridLayout(groupBox);
39    {
40      QToolBox* toolBox = new QToolBox(groupBox);
41      {
42
43        toolBox->addItem(new GuiVideo(toolBox), "Video");
44        toolBox->addItem(new GuiAudio(toolBox), "Audio");
45      }
46      mainLayout->addWidget(toolBox,1,1);
47    }
48
49    this->mainWindow->setCentralWidget(groupBox);
50    this->mainWindow->show();
51
52    this->exec();
53
54
55  }
56
57  QtGui::~QtGui()
58  {
59    delete this->mainWindow;
60  }
61
62  void QtGui::startGui()
63  {}
64
65  void QtGui::stopGui()
66  {}
67
68  void QtGui::suspend()
69  {}
70
71    //! Update the Gui.
72  void QtGui::update()
73  {
74    this->processEvents();
75  }
76
77}
Note: See TracBrowser for help on using the repository browser.