From 0579cc2c3c97c73062deacd3d1630c3c84128b98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Lemaire?= Date: Fri, 21 Aug 2015 00:46:42 +0200 Subject: [PATCH] Added shortcut information in tooltips --- src/interface/modeler/quickapp/qml/ToolbarButton.qml | 3 ++- src/interface/modeler/quickapp/qml/main.qml | 7 +++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/src/interface/modeler/quickapp/qml/ToolbarButton.qml b/src/interface/modeler/quickapp/qml/ToolbarButton.qml index 9d92bb3..6542b85 100644 --- a/src/interface/modeler/quickapp/qml/ToolbarButton.qml +++ b/src/interface/modeler/quickapp/qml/ToolbarButton.qml @@ -9,6 +9,7 @@ Item { property bool toggle: false property string helptext property string hovertext + property string shortcut signal clicked signal changed(bool value) @@ -70,7 +71,7 @@ Item { onEntered: { button.hovered = true; - tooltip_widget.hovertext = hovertext; + tooltip_widget.hovertext = button.hovertext + (button.shortcut ? (" (" + button.shortcut + ")") : ""); tooltip_widget.hovered = this; } onExited: { diff --git a/src/interface/modeler/quickapp/qml/main.qml b/src/interface/modeler/quickapp/qml/main.qml index 7861fc9..cdfc20d 100644 --- a/src/interface/modeler/quickapp/qml/main.qml +++ b/src/interface/modeler/quickapp/qml/main.qml @@ -89,6 +89,7 @@ OpenGLView { objectName: "tool_render_quick" picture: "images/icon_render_quick.png" hovertext: qsTr("Start a quick render") + shortcut: "F5" } ToolbarButton { @@ -96,6 +97,7 @@ OpenGLView { objectName: "tool_render_final" picture: "images/tab_render.png" hovertext: qsTr("Start a final render") + shortcut: "Ctrl+F5" } ToolbarButton { @@ -103,6 +105,7 @@ OpenGLView { objectName: "tool_render_show" picture: "images/icon_render_show.png" hovertext: qsTr("Show last rendered image") + shortcut: "F6" } } @@ -114,6 +117,7 @@ OpenGLView { objectName: "tool_file_new" picture: "images/icon_file_new.png" hovertext: qsTr("Generate a new scene") + shortcut: "Ctrl+N" } ToolbarButton { @@ -121,6 +125,7 @@ OpenGLView { objectName: "tool_file_save" picture: "images/icon_file_save.png" hovertext: qsTr("Save the current scene to a file") + shortcut: "Ctrl+S" } ToolbarButton { @@ -128,6 +133,7 @@ OpenGLView { objectName: "tool_file_load" picture: "images/icon_file_load.png" hovertext: qsTr("Load a scene from a file") + shortcut: "Ctrl+L" } ToolbarButton { @@ -135,6 +141,7 @@ OpenGLView { objectName: "tool_file_exit" picture: "images/icon_exit.png" hovertext: qsTr("Exit the program") + shortcut: "Ctrl+Q" } }