Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7548 in orxonox.OLD for branches/qt_gui


Ignore:
Timestamp:
May 6, 2006, 10:06:53 AM (19 years ago)
Author:
bensch
Message:

orxonox/qt_gui: start-stop-events

Location:
branches/qt_gui/src/lib/gui
Files:
4 edited

Legend:

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

    r7547 r7548  
    4444    this->state |= Gui::Quitting;
    4545  }
     46
     47  void Gui::startEvent()
     48  {
     49    this->state |= Gui::Starting;
     50  }
    4651}
  • branches/qt_gui/src/lib/gui/gui.h

    r7547 r7548  
    2020        Null          = 0,
    2121        Quitting      = 1,
    22         Startig       = 2,
     22        Starting      = 2,
    2323        Saving        = 4,
    2424      } State;
     
    4242  protected:
    4343    void quitEvent();
     44    void startEvent();
    4445
    4546    private:
  • branches/qt_gui/src/lib/gui/qt_gui/qt_gui.cc

    r7542 r7548  
    4747
    4848
     49      QPushButton* start = new QPushButton("start");
     50      connect(start, SIGNAL(released()), this, SLOT(startApp()));
     51      mainLayout->addWidget(start, 2,2);
     52
    4953      QPushButton* quit = new QPushButton("quit");
    50       connect(quit, SIGNAL(released()), this, SLOT(quit()));
     54      connect(quit, SIGNAL(released()), this, SLOT(quitApp()));
     55      mainLayout->addWidget(quit, 2,3);
    5156
    52       mainLayout->addWidget(quit, 2,3);
    5357    }
    5458
     
    8185  }
    8286
     87
     88  void QtGui::quitApp()
     89  {
     90    Gui::quitEvent();
     91    this->quit();
     92  }
     93  void QtGui::startApp()
     94  {
     95    Gui::startEvent();
     96    this->quit();
     97  }
     98
    8399}
  • branches/qt_gui/src/lib/gui/qt_gui/qt_gui.h

    r7543 r7548  
    3030      virtual void update();
    3131
     32    public slots:
     33      void quitApp();
     34      void startApp();
    3235
    3336    private:
Note: See TracChangeset for help on using the changeset viewer.