15 lines
551 B
C
15 lines
551 B
C
|
|
Trackball::Button QT2VCG(Qt::MouseButton qtbt, Qt::KeyboardModifiers modifiers)
|
|
{
|
|
|
|
int vcgbt=Trackball::BUTTON_NONE;
|
|
if(qtbt & Qt::LeftButton ) vcgbt |= Trackball::BUTTON_LEFT;
|
|
if(qtbt & Qt::RightButton ) vcgbt |= Trackball::BUTTON_RIGHT;
|
|
if(qtbt & Qt::MidButton ) vcgbt |= Trackball::BUTTON_MIDDLE;
|
|
if(modifiers & Qt::ShiftModifier ) vcgbt |= Trackball::KEY_SHIFT;
|
|
if(modifiers & Qt::ControlModifier ) vcgbt |= Trackball::KEY_CTRL;
|
|
if(modifiers & Qt::AltModifier ) vcgbt |= Trackball::KEY_ALT;
|
|
return Trackball::Button(vcgbt);
|
|
}
|
|
|