Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7547 in orxonox.OLD


Ignore:
Timestamp:
May 6, 2006, 9:52:07 AM (18 years ago)
Author:
bensch
Message:

orxonox/qt_gui: more gui-implementation

Location:
branches/qt_gui/src
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/qt_gui/src/lib/gui/gui.cc

    r7476 r7547  
    2828  {
    2929    //this->setClassID(CL_PROTO_ID, "Gui");
     30    this->state = Gui::Null;
    3031  }
    3132
     
    3839    // delete what has to be deleted here
    3940  }
     41
     42  void Gui::quitEvent()
     43  {
     44    this->state |= Gui::Quitting;
     45  }
    4046}
  • branches/qt_gui/src/lib/gui/gui.h

    r7476 r7547  
    1616  class Gui : public BaseObject
    1717  {
     18    public:
     19      typedef enum {
     20        Null          = 0,
     21        Quitting      = 1,
     22        Startig       = 2,
     23        Saving        = 4,
     24      } State;
     25
    1826
    1927  public:
     
    2937    //! Update the Gui.
    3038    virtual void update() = 0;
     39
     40    unsigned int getState() const { return this->state; };
     41
     42  protected:
     43    void quitEvent();
     44
     45    private:
     46      unsigned int        state; //!< The State the Gui is in.
    3147  };
    3248}
  • branches/qt_gui/src/lib/gui/qt_gui/gui_video.cc

    r7534 r7547  
    3131#include "debug.h"
    3232
    33 
    34 #include <QtGui/QPushButton>
    35 #include <QtGui/QCheckBox>
    36 #include <QtGui/QComboBox>
     33#include "qt_gui_elements.h"
    3734
    3835namespace OrxGui
     
    4239  */
    4340  GuiVideo::GuiVideo(QWidget* parent)
    44   : Element("Video"), QGroupBox(parent)
     41      : Element("Video"), QGroupBox(parent)
    4542  {
    4643    QGridLayout* layout = new QGridLayout(this);
    4744
    4845    {
    49       QCheckBox* fullscreen = new QCheckBox(QString("FullScreen"), this);
     46      QtGuiCheckBox* fullscreen = new QtGuiCheckBox("FullScreen", this);
    5047      //fullscreen->setName();
    5148      layout->addWidget(fullscreen, 0, 0);
    5249
    53       QCheckBox* wireframe = new QCheckBox("Wireframe mode", this);
     50      QtGuiCheckBox* wireframe = new QtGuiCheckBox("Wireframe mode", this);
    5451      layout->addWidget(wireframe, 1, 0);
    5552
     
    6360      }
    6461
     62
     63      QGroupBox* advanced = new QGroupBox("advanced");
     64      {
     65        QGridLayout* advLayout = new QGridLayout(advanced);              //!< Advanced Layout
     66        {
     67          QtGuiCheckBox* shadows = new QtGuiCheckBox("Shadows");         //!< CheckBox for shadows
     68          advLayout->addWidget(shadows, 0,0);
     69          QtGuiCheckBox* fog = new QtGuiCheckBox("Fog");                 //!< CheckBox for fog.
     70          advLayout->addWidget(fog, 1,0);
     71          QtGuiCheckBox* reflections = new QtGuiCheckBox("reflections");  //!< CheckBox for reflections
     72          advLayout->addWidget(reflections, 2, 0);
     73          QtGuiCheckBox* textures = new QtGuiCheckBox("textures");       //!< CheckBox for textures
     74          advLayout->addWidget(textures, 3, 0);
     75          /*
     76          Menu* textureDetail;      //!< Menu for the Texture-Detail.
     77          Label* modelDetailLabel;  //!< Label for model-detail.
     78          Menu* modelDetail;        //!< model-detail.
     79          CheckBox* particles;   //!< If the Particles should be enabled
     80          Label* antiAliasingLabel; //!< Label for the anti-aliasing mode.
     81          Menu* antiAliasing;       //!< Menu for the Antialiasing-mode.
     82          Label* filterMethodLabel; //!< Label for filtering-Method.
     83          Menu* filterMethod;       //!< Menu for filtering Method.
     84          Button* closeButton;      //!< A Button to close the Advanced-settingsWindow.
     85          */
     86        }
     87      }
     88
     89      layout->addWidget(advanced, 0, 2, 4, 1);
     90
    6591    }
    66 
    67 
    68 
    69 /*    Frame* videoFrame;        //!< The Frame that holds the video options.
    70 
    71     videoFrame = new Frame("Video-Options:");
    72     videoFrame->setGroupName("video");
    73     {
    74       Box* videoBox;            //!< The Box that holds the video options.
    75 
    76       videoBox = new Box('v');
    77       {
    78         CheckButton* fullscreen;  //!< CheckButton for fullscreen-mode
    79         Menu* resolution;         //!< Menu for the resolution
    80         CheckButton* wireframe;   //!< CheckButton for wireframe Mode.
    81 
    82         fullscreen = new CheckButton(CONFIG_NAME_FULLSCREEN);
    83         fullscreen->setFlagName("windowed", "q", 1);
    84         fullscreen->setDescription("Starts orxonox in windowed mode");
    85         fullscreen->saveability();
    86         videoBox->fill(fullscreen);
    87         resolution = new Menu(CONFIG_NAME_RESOLUTION);
    88         getResolutions(resolution);
    89         resolution->saveability();
    90         resolution->setFlagName("resolution", "r", 0);
    91         resolution->setDescription("Sets the resolution of orxonox");
    92         videoBox->fill(resolution);
    93         wireframe = new CheckButton(CONFIG_NAME_WIREFRAME);
    94         wireframe->setFlagName("wireframe", "w", 0);
    95         wireframe->setDescription("Starts orxonox in wireframe mode");
    96         wireframe->saveability();
    97         videoBox->fill(wireframe);
    98 
    99         videoBox->fill(advancedWindowCreate());
    100       }
    101       videoFrame->fill(videoBox);
    102     }
    103     setMainWidget(videoFrame);*/
    10492  }
    10593
  • branches/qt_gui/src/orxonox.cc

    r7479 r7547  
    500500    gui->startGui();
    501501
    502 //    if (!gui->startOrxonox)
    503 //      return 0;
     502    if (gui->getState() & OrxGui::Gui::Quitting)
     503      return 0;
    504504
    505505    delete gui;
Note: See TracChangeset for help on using the changeset viewer.