reformatted

This commit is contained in:
Paolo Cignoni 2007-11-21 09:50:49 +00:00
parent 743e4f7a9e
commit 01ca6ad3a0
1 changed files with 9 additions and 18 deletions

View File

@ -35,19 +35,13 @@ static vcg::Trackball::Button QT2VCG (Qt::MouseButton qtbt, Qt::KeyboardModifier
{
int vcgbt = vcg::Trackball::BUTTON_NONE;
if (qtbt & Qt::LeftButton)
vcgbt |= vcg::Trackball::BUTTON_LEFT;
if (qtbt & Qt::RightButton)
vcgbt |= vcg::Trackball::BUTTON_RIGHT;
if (qtbt & Qt::MidButton)
vcgbt |= vcg::Trackball::BUTTON_MIDDLE;
if (qtbt & Qt::LeftButton) vcgbt |= vcg::Trackball::BUTTON_LEFT;
if (qtbt & Qt::RightButton) vcgbt |= vcg::Trackball::BUTTON_RIGHT;
if (qtbt & Qt::MidButton) vcgbt |= vcg::Trackball::BUTTON_MIDDLE;
if (modifiers & Qt::ShiftModifier)
vcgbt |= vcg::Trackball::KEY_SHIFT;
if (modifiers & Qt::ControlModifier)
vcgbt |= vcg::Trackball::KEY_CTRL;
if (modifiers & Qt::AltModifier)
vcgbt |= vcg::Trackball::KEY_ALT;
if (modifiers & Qt::ShiftModifier) vcgbt |= vcg::Trackball::KEY_SHIFT;
if (modifiers & Qt::ControlModifier) vcgbt |= vcg::Trackball::KEY_CTRL;
if (modifiers & Qt::AltModifier) vcgbt |= vcg::Trackball::KEY_ALT;
return vcg::Trackball::Button (vcgbt);
}
@ -57,12 +51,9 @@ static vcg::Trackball::Button QTWheel2VCG (Qt::KeyboardModifiers modifiers)
{
int vcgbt = vcg::Trackball::WHEEL;
if (modifiers & Qt::ShiftModifier)
vcgbt |= vcg::Trackball::KEY_SHIFT;
if (modifiers & Qt::ControlModifier)
vcgbt |= vcg::Trackball::KEY_CTRL;
if (modifiers & Qt::AltModifier)
vcgbt |= vcg::Trackball::KEY_ALT;
if (modifiers & Qt::ShiftModifier) vcgbt |= vcg::Trackball::KEY_SHIFT;
if (modifiers & Qt::ControlModifier) vcgbt |= vcg::Trackball::KEY_CTRL;
if (modifiers & Qt::AltModifier) vcgbt |= vcg::Trackball::KEY_ALT;
return vcg::Trackball::Button (vcgbt);
}