OpenClonk
C4ConsoleQtViewport.cpp File Reference
Include dependency graph for C4ConsoleQtViewport.cpp:

Go to the source code of this file.

Functions

uint32_t GetShiftWParam (QKeyEvent *event=nullptr)
 

Function Documentation

◆ GetShiftWParam()

uint32_t GetShiftWParam ( QKeyEvent *  event = nullptr)

Definition at line 152 of file C4ConsoleQtViewport.cpp.

References C4GFX_ZoomStep, C4MC_Button_LeftDouble, C4MC_Button_LeftDown, C4MC_Button_LeftUp, C4MC_Button_MiddleDouble, C4MC_Button_MiddleDown, C4MC_Button_MiddleUp, C4MC_Button_None, C4MC_Button_RightDouble, C4MC_Button_RightDown, C4MC_Button_RightUp, C4MC_Button_Wheel, C4MC_Button_X1Double, C4MC_Button_X1Down, C4MC_Button_X1Up, C4MC_Button_X2Double, C4MC_Button_X2Down, C4MC_Button_X2Up, Console, C4Console::EditCursor, C4EditCursor::HasTransformCursor(), C4EditCursor::LeftButtonDown(), C4EditCursor::LeftButtonUp(), C4GUI::MouseMove(), C4EditCursor::RightButtonDown(), C4EditCursor::RightButtonUp(), and ViewportScrollSpeed.

153 {
154  auto modifiers = event ? event->modifiers() : QGuiApplication::keyboardModifiers();
155  uint32_t result = 0;
156  if (modifiers & Qt::ShiftModifier) result |= MK_SHIFT;
157  if (modifiers & Qt::ControlModifier) result |= MK_CONTROL;
158  if (modifiers & Qt::AltModifier) result |= MK_ALT;
159  return result;
160 }
Here is the call graph for this function: