Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Changeset 7635 in orxonox.OLD for branches/qt_gui/src/lib/event/key_mapper.h


Ignore:
Timestamp:
May 17, 2006, 10:12:33 AM (18 years ago)
Author:
bensch
Message:

orxonox/qt_gui: less debug

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/qt_gui/src/lib/event/key_mapper.h

    r7256 r7635  
    1010
    1111#include "base_object.h"
    12 //#include "event_def.h"
    13 
     12#include <string>
    1413class IniParser;
    1514
    16 //! A mapping from key-name to key-id
    17 typedef struct orxKeyMapping
     15//! The map class functionalities
     16class KeyMapper : public BaseObject
    1817{
    19   int* pValue;
    20   char* pName;
    21 };
     18public:
     19  //! A mapping from key-name to key-id
     20  typedef struct KeyMapping
     21  {
     22    int* pValue;
     23    const std::string pName;
     24  };
    2225
    23 
    24 //! The map class functionalities
    25 class KeyMapper : public BaseObject {
    26 
    27  public:
     26public:
    2827  KeyMapper();
    2928  virtual ~KeyMapper();
     
    3332  void loadKeyBindings(IniParser* iniParser);
    3433
     34  static const KeyMapping* const getKeyMapping() { return KeyMapper::map; };
     35
    3536  void debug();
    3637
    37  private:
     38private:
    3839  int* nameToIndex (const std::string& name);
    3940  void mapKeys(const std::string& name, int* index);
    4041
    41  public:
     42public:
    4243  static int PEV_FORWARD;           //!< forward button
    4344  static int PEV_BACKWARD;          //!< backward buttton
     
    7374  static int PEV_QUIT;              //!< quit button
    7475
    75  private:
    76   int         coord[2];              //!< temp place to save variables in nameToIndex() function
     76private:
     77  int                coord[2];      //!< temp place to save variables in nameToIndex() function
     78  static KeyMapping  map[];         //!< The KeyMapping that maps strings to ID's and Vice Versa
    7779};
    7880
Note: See TracChangeset for help on using the changeset viewer.