91
91
/////////////////////////////////////////////////////
93
93
// Left and right buttons together make a camera zoom : emulates a mouse third button if needed.
94
setMouseBinding(Qt::LeftButton + Qt::RightButton, CAMERA, ZOOM);
94
setMouseBinding(Qt::NoModifier, Qt::LeftButton | Qt::RightButton, CAMERA, ZOOM);
96
96
// Disable previous TRANSLATE mouse binding (and remove it from help mouse tab).
97
setMouseBinding(Qt::RightButton, NO_CLICK_ACTION);
97
setMouseBinding(Qt::NoModifier, Qt::RightButton, NO_CLICK_ACTION);
99
99
#if QT_VERSION < 0x040000
100
100
// Alt+left button translates the camera (since right button will popup a menu).
101
setMouseBinding(Qt::AltButton | Qt::LeftButton, CAMERA, TRANSLATE);
101
setMouseBinding(Qt::AltButton, Qt::LeftButton, CAMERA, TRANSLATE);
102
102
// Define Control+Shift+Right button as selection shortcut
103
setMouseBinding(Qt::ControlButton | Qt::ShiftButton | Qt::RightButton, SELECT);
103
setMouseBinding(Qt::ControlButton | Qt::ShiftButton, Qt::RightButton, SELECT);
104
104
// Alt + mouse wheel MOVE_FORWARD the camera.
105
105
setWheelBinding(Qt::AltButton, CAMERA, MOVE_FORWARD);
107
setMouseBinding(Qt::CTRL + Qt::SHIFT + Qt::RightButton, SELECT);
107
setMouseBinding(Qt::ControlModifier | Qt::ShiftModifier, Qt::RightButton, SELECT);
108
108
setWheelBinding(Qt::AltModifier, CAMERA, MOVE_FORWARD);
109
setMouseBinding(Qt::ALT + Qt::LeftButton, CAMERA, TRANSLATE);
109
setMouseBinding(Qt::AltModifier, Qt::LeftButton, CAMERA, TRANSLATE);
112
112
// Add custom mouse bindings description (see mousePressEvent())
113
setMouseBindingDescription(Qt::RightButton, "Opens a camera path context menu");
113
setMouseBindingDescription(Qt::NoModifier, Qt::RightButton, "Opens a camera path context menu");
115
115
// Display the help window. The help window tabs are automatically updated when you define new
116
116
// standard key or mouse bindings (as is done above). Custom bindings descriptions are added using