first version
This commit is contained in:
parent
f553ab00b8
commit
46eb093f0f
|
@ -0,0 +1,14 @@
|
||||||
|
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue