NifTK  16.4.1 - 0798f20
CMIC's Translational Medical Imaging Platform
Public Types | Signals | Public Member Functions | Protected Member Functions | List of all members
niftk::WindowsHotkeyHandler Class Reference
Inheritance diagram for niftk::WindowsHotkeyHandler:
Inheritance graph
[legend]
Collaboration diagram for niftk::WindowsHotkeyHandler:
Collaboration graph
[legend]

Public Types

enum  Hotkey { CTRL_ALT_F5 = 0x00030074, CTRL_ALT_F6 = 0x00030075, CTRL_ALT_F7 = 0x00030076 }
 

Signals

void HotkeyPressed (niftk::WindowsHotkeyHandler *, int)
 

Public Member Functions

 WindowsHotkeyHandler (Hotkey hk)
 
virtual ~WindowsHotkeyHandler ()
 

Protected Member Functions

virtual void run ()
 

Detailed Description

Custom thread with low-level Windows event loop to handle hotkey messages. These are not processed by Qt and simply disappear in its event handling mechanism. Works only on Windows. Instances of this object should be created by the main event loop. Do not moveToThread() this object to itself!

Member Enumeration Documentation

Currently known hotkeys. Note that the value is important: it decodes to virtual key codes etc.

Enumerator
CTRL_ALT_F5 
CTRL_ALT_F6 
CTRL_ALT_F7 

Constructor & Destructor Documentation

niftk::WindowsHotkeyHandler::WindowsHotkeyHandler ( Hotkey  hk)

Creates a new handler and starts the corresponding thread. Note that you have to know in advance which hotkey you want, there is no way to change it afterwards.

Init happens in run(), not in this constructor. Unfortunately, this means that error reporting is practically non-existent.

Exceptions
nothingshould not throw anything.
niftk::WindowsHotkeyHandler::~WindowsHotkeyHandler ( )
virtual

Member Function Documentation

void niftk::WindowsHotkeyHandler::HotkeyPressed ( niftk::WindowsHotkeyHandler ,
int   
)
signal

Beware: you really should connect this as QueuedConnection!

void niftk::WindowsHotkeyHandler::run ( )
protectedvirtual

Does the initialisation and runs a low-level Windows message loop. This will not do any Qt signal delivery! So it's important that you do not moveToThread() this object.


The documentation for this class was generated from the following files: