![]() |
http://www.sim.no http://www.coin3d.org |
The SoQtKeyboard class is the keyboard input device abstraction.The SoQtKeyboard class is the glue between native keyboard handling and keyboard interaction with the Inventor scenegraph. More...
#include <Inventor/Qt/devices/SoQtKeyboard.h>
Public Types | |
enum | Events { KEY_PRESS = 0x01, KEY_RELEASE = 0x02, ALL_EVENTS = KEY_PRESS | KEY_RELEASE } |
Public Member Functions | |
virtual SoType | getTypeId (void) const |
SoQtKeyboard (int eventmask=ALL_EVENTS) | |
virtual | ~SoQtKeyboard (void) |
virtual void | enable (QWidget *widget, SoQtEventHandler *handler, void *closure) |
virtual void | disable (QWidget *widget, SoQtEventHandler *handler, void *closure) |
virtual const SoEvent * | translateEvent (QEvent *event) |
Static Public Member Functions | |
static void | initClass (void) |
static SoType | getClassTypeId (void) |
static void * | createInstance (void) |
Friends | |
class | SoQtKeyboardP |
class | SoGuiKeyboardP |
The SoQtKeyboard class is the keyboard input device abstraction.
The SoQtKeyboard class is the glue between native keyboard handling and keyboard interaction with the Inventor scenegraph.
All components derived from the SoQtRenderArea have got an SoQtKeyboard device attached by default.
enum SoQtKeyboard::Events |
SoQtKeyboard::SoQtKeyboard | ( | int | mask = ALL_EVENTS |
) |
Constructor. The mask specifies which keyboard-related events to handle. Others will just be ignored.
SoQtKeyboard::~SoQtKeyboard | ( | void | ) | [virtual] |
Destructor.
void SoQtKeyboard::initClass | ( | void | ) | [static] |
Sets up initialization for data common to all instances of this class, submitting necessary information to the internal SoQt type system.
Reimplemented from SoQtDevice.
SoType SoQtKeyboard::getClassTypeId | ( | void | ) | [static] |
This static method returns the SoType object associated with objects of this class.
Reimplemented from SoQtDevice.
SoType SoQtKeyboard::getTypeId | ( | void | ) | const [virtual] |
Returns the type identification of an object derived from a class inheriting SoQtObject. This is used for run-time type checking and "downward" casting.
Usage example:
void foo(SoQtViewer * comp) { if (comp->getTypeId() == SoQtExaminerViewer::getClassTypeId()) { // safe downward cast, knows the type SoQtExaminerViewer * exviewer = (SoQtExaminerViewer *)comp; } else if (comp->getTypeId().isOfType(SoQtFlyViewer::getClassTypeId())) { // safe downward cast, knows the type SoQtFlyViewer * flyviewer = (SoQtFlyViewer *)comp; // then something else } }
Reimplemented from SoQtDevice.
void SoQtKeyboard::enable | ( | QWidget * | widget, | |
SoQtEventHandler * | handler, | |||
void * | closure | |||
) | [virtual] |
This method will enable the device for the widget.
handler is invoked with the closure argument when an event occur in widget.
Implements SoQtDevice.
void SoQtKeyboard::disable | ( | QWidget * | widget, | |
SoQtEventHandler * | handler, | |||
void * | closure | |||
) | [virtual] |
This method will disable the handler for the device.
Implements SoQtDevice.
const SoEvent * SoQtKeyboard::translateEvent | ( | QEvent * | event | ) | [virtual] |
This method translates from native events to Open Inventor SoEvent events.
Implements SoQtDevice.
References SoQtDevice::getLastEventPosition(), KEY_PRESS, KEY_RELEASE, and SoQtDevice::setEventPosition().
Copyright © 1998-2005 by Systems in Motion AS. All rights reserved.
Generated on Mon Nov 23 17:55:04 2009 for SoQt by Doxygen. 1.6.1