|
VR-Engage
2.2
|
This Qt-based class monitors focus changes in application windows and notifies the mouse control system when focus state changes occur. This enables proper handling of mouse input when the application loses focus.
#include <mouseControl.h>
Public Member Functions | |
| DtMouseControlFocusWatcher (makVrv::DtDe &de) | |
| virtual | ~DtMouseControlFocusWatcher () override |
| void | updateFocusState () |
Private Attributes | |
| makVrv::DtDe & | myDe |
| QMetaObject::Connection | myFocusChangedConnection |
| bool | myWidgetInFocus |
| bool | myFocusState |
| makVre::DtMouseControlFocusWatcher::DtMouseControlFocusWatcher | ( | makVrv::DtDe & | de | ) |
Constructor that initializes focus watching.
Sets up the focus watcher with the given display environment and connects to the Qt signal for application focus changes.
| de | Reference to the display environment |
References de().
|
overridevirtual |
Destructor.
Cleans up focus watcher resources
| void makVre::DtMouseControlFocusWatcher::updateFocusState | ( | ) |
Check and update the application focus state.
Determines if the application window has focus and sends a message if the focus state has changed since the last check.
|
private |
Reference to the display environment.
|
private |
Connection to Qt's focus changed signal.
|
private |
Flag indicating if a widget within the application has focus.
|
private |
Current focus state of the application.