Merge pull request #5105 from maxGimeno/Demo-Update_key_bindings_doc-maxGimeno

Polyhedron demo: Update Mouse and Key Bindings
This commit is contained in:
Laurent Rineau 2020-10-23 15:57:11 +02:00
commit c0b108abf1
2 changed files with 2 additions and 7 deletions

View File

@ -679,7 +679,6 @@ void CGAL::QGLViewer::setDefaultShortcuts() {
setShortcut(qglviewer::FULL_SCREEN, ::Qt::ALT + ::Qt::Key_Return);
setShortcut(qglviewer::ANIMATION, ::Qt::Key_Return);
setShortcut(qglviewer::HELP, ::Qt::Key_H);
setShortcut(qglviewer::EDIT_CAMERA, ::Qt::Key_C);
setShortcut(qglviewer::MOVE_CAMERA_LEFT, ::Qt::Key_Left);
setShortcut(qglviewer::MOVE_CAMERA_RIGHT, ::Qt::Key_Right);
setShortcut(qglviewer::MOVE_CAMERA_UP, ::Qt::Key_Up);
@ -701,9 +700,6 @@ void CGAL::QGLViewer::setDefaultShortcuts() {
tr("Opens this help window", "HELP action description");
keyboardActionDescription_[qglviewer::ANIMATION] =
tr("Starts/stops the animation", "ANIMATION action description");
keyboardActionDescription_[qglviewer::EDIT_CAMERA] =
tr("Toggles camera paths display",
"EDIT_CAMERA action description"); // TODO change
keyboardActionDescription_[qglviewer::ENABLE_TEXT] =
tr("Toggles the display of the text", "ENABLE_TEXT action description");
keyboardActionDescription_[qglviewer::EXIT_VIEWER] =

View File

@ -318,15 +318,14 @@ void Viewer::doBindings()
//modify mouse bindings that have been updated
setMouseBinding(Qt::Key(0), Qt::NoModifier, Qt::LeftButton, CGAL::qglviewer::RAP_FROM_PIXEL, true, Qt::RightButton);
setMouseBinding(Qt::ShiftModifier, Qt::RightButton, CGAL::qglviewer::NO_CLICK_ACTION, false, Qt::NoButton);
setMouseBindingDescription(Qt::ShiftModifier, Qt::RightButton,
tr("Select and pop context menu"));
setMouseBinding(Qt::Key_R, Qt::NoModifier, Qt::LeftButton, CGAL::qglviewer::RAP_FROM_PIXEL);
//use the new API for these
setMouseBinding(Qt::ShiftModifier, Qt::LeftButton, CGAL::qglviewer::SELECT);
setMouseBindingDescription(Qt::Key(0), Qt::ShiftModifier, Qt::LeftButton,
tr("Selects and display context "
"menu of the selected item"));
setMouseBindingDescription(Qt::Key_I, Qt::NoModifier, Qt::LeftButton,
tr("Show/hide the primitive ID of the types selected in the context menu of the picked item."));
setMouseBindingDescription(Qt::Key_D, Qt::NoModifier, Qt::LeftButton,