Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7861 in orxonox.OLD for trunk/src


Ignore:
Timestamp:
May 25, 2006, 4:47:24 PM (19 years ago)
Author:
bensch
Message:

test control

Location:
trunk/src/lib/gui/qt_gui
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/lib/gui/qt_gui/gui_control.cc

    r7661 r7861  
    7777      : QPushButton(QString().fromStdString(name)), Saveable(name, group, defaultValue)
    7878  {
     79    this->bListening = false;
     80
     81    //connect(this, SIGNAL(released()), this, SLOT(listen()));
     82
    7983  }
    8084
     
    9195
    9296
     97  bool GuiControlInput::event ( QEvent * e )
     98  {
     99
     100    if (!this->bListening)
     101      return false;
     102
     103
     104
     105    this->bListening = true;
     106    return true;
     107  }
     108
     109  void GuiControlInput::listen()
     110  {
     111    this->bListening = true;
     112    this->grabKeyboard();
     113  }
     114
    93115}
  • trunk/src/lib/gui/qt_gui/gui_control.h

    r7661 r7861  
    3434    virtual void save();
    3535
     36
     37    virtual bool event(QEvent* e);
    3638  public slots:
    37     ///TODO: MAKE IT CONFIGUREABLE.
     39    void listen();
    3840  signals:
    3941    //    void optionChanged();
     42
     43    private:
     44      bool bListening;
    4045  };
     46
     47
    4148
    4249}
Note: See TracChangeset for help on using the changeset viewer.