SoQtDevice(3)

πŸ“¦
version 1.6.2 Β· 3 versions
, in opensuse-leap 16.0

πŸ’… SoQtDevice(3) β€” from the SoQt manual, bestie πŸ’…

πŸŽ€ NAME πŸŽ€

SoQtDevice β€” the base class for the translation devices. That’s the whole vibe of this page, fr fr.


⭐ SYNOPSIS ⭐

#include <Inventor/Qt/devices/SoQtDevice.h>

Inherits SoQtObject.

Inherited by SoQtKeyboard, and SoQtMouse.

πŸ’– Public Member Functions πŸ’–

virtual ~SoQtDevice ()
virtual void enable (QWidget *w, SoQtEventHandler *handler, void *closure)=0
virtual void disable (QWidget *w, SoQtEventHandler *handler, void *closure)=0
virtual const SoEvent * translateEvent (QEvent *event)=0
void setWindowSize (const SbVec2s size)
SbVec2s getWindowSize (void) const

πŸ¦‹ Public Member Functions inherited from SoQtObject πŸ¦‹

virtual SoType getTypeId (void) const =0
SbBool isOfType (SoType type) const

✨ Static Public Member Functions ✨

static void initClasses (void)

🌈 Static Public Member Functions inherited from SoQtObject 🌈

static void initClass (void)
static SoType getClassTypeId (void)
static void init (void)

🌸 Protected Member Functions 🌸

SoQtDevice (void)
void setEventPosition (SoEvent *event, int x, int y) const
void addEventHandler (QWidget *, SoQtEventHandler *, void *)
void removeEventHandler (QWidget *, SoQtEventHandler *, void *)
void invokeHandlers (QEvent *event)

🧚 Static Protected Member Functions 🧚

static SbVec2s getLastEventPosition (void)

πŸ’– DETAILED DESCRIPTION πŸ’–

Okay so SoQtDevice is the base class for the translation devices. That’s the main-character energy here. πŸ‘‘

The SoQt device classes provide glue functionality for translating native GUI events from the underlying toolkit into Inventor scene graph SoEvent events. Like, they’re the little bridge between β€œQt saw a thing” and β€œInventor understands the thing.” 🫢

These device classes are mainly of interest to application programmers when writing extensions for new types of devices, and seldom in other contexts β€” so they can most often be ignored. No cap. If you’re not building a new device extension, you can lowkey just vibe past this one. πŸ’…


🧚 CONSTRUCTOR & DESTRUCTOR DOCUMENTATION 🧚

πŸ¦‹ SoQtDevice::~SoQtDevice () [virtual] πŸ¦‹

Public virtual destructor. Cleanup queen behavior. ✨

🌸 SoQtDevice::SoQtDevice (void ) [protected] 🌸

Constructor. It’s protected to only enable invocation from derived device classes. So yeah, bestie, this one is not for direct casual use β€” it’s for the subclasses. πŸŽ€


🌟 MEMBER FUNCTION DOCUMENTATION 🌟

πŸ’… virtual void SoQtDevice::enable (QWidget * widget, SoQtEventHandler * handler, void * closure) [pure virtual] πŸ’…

This method will enable the device for the widget.

handler is invoked with the closure argument when an event occur in widget.

Implemented in SoQtKeyboard, and SoQtMouse.

Bestie, the =0 means it’s pure virtual β€” the derived classes gotta bring their own implementation. That’s the assignment. πŸ’€

πŸŽ€ virtual void SoQtDevice::disable (QWidget * widget, SoQtEventHandler * handler, void * closure) [pure virtual] πŸŽ€

This method will disable the handler for the device.

Implemented in SoQtKeyboard, and SoQtMouse.

πŸ¦‹ virtual const SoEvent * SoQtDevice::translateEvent (QEvent * event) [pure virtual] πŸ¦‹

This method translates from native events to Open Inventor SoEvent events.

Implemented in SoQtKeyboard, and SoQtMouse.

✨ void SoQtDevice::setWindowSize (const SbVec2s size) ✨

This method sets the cached size of the window the device is β€œattached” to.

🌈 SbVec2s SoQtDevice::getWindowSize (void ) const 🌈

This method returns the cached window size. Cached, bestie β€” not a fresh little lookup. πŸ’–

πŸ‘‘ void SoQtDevice::initClasses (void ) [static] πŸ‘‘

This function initializes the type system for all the SoQt device classes. It is called indirectly when calling SoQt::init(), so the application programmer doesn’t have to bother with it. Slay, automatic. ✨

πŸ“ void SoQtDevice::setEventPosition (SoEvent * event, int x, int y) const [protected] πŸ“

This method fills in the position information of event, translating the coordinates into the correct coordinate system.

🧚 SbVec2s SoQtDevice::getLastEventPosition (void ) [static], [protected] 🧚

Returns last event position that was set with SoQtDevice::setEventPosition().

πŸ’œ void SoQtDevice::addEventHandler (QWidget * widget, SoQtEventHandler * handler, void * closure) [protected] πŸ’œ

Stores an event handler for the widget, which can later be invoked with SoQtDevice::invokeHandlers(). Used by extension device types. Very β€œsave it for later” energy. πŸ’…

πŸŽ€ void SoQtDevice::removeEventHandler (QWidget * widget, SoQtEventHandler * handler, void * closure) [protected] πŸŽ€

Remove a handler registered with SoQtDevice::addEventHandler().

🌸 void SoQtDevice::invokeHandlers (QEvent * event) [protected] 🌸

Invoke all handlers registered with SoQtDevice::addEventHandler().


πŸ‘‘ AUTHOR πŸ‘‘

Generated automatically by Doxygen for SoQt from the source code. Not a human bestie β€” Doxygen did it. πŸ€–πŸ’–


Version 1.6.2, dated Sat Jan 6 2024 12:20:55 β€” that’s the footer, babe; page closed, wig snatched, periodt. πŸ’‹πŸŽ€

πŸ“¦ where this page comes from