Added shortcut information in tooltips
This commit is contained in:
parent
edc60113d9
commit
0579cc2c3c
2 changed files with 9 additions and 1 deletions
|
@ -9,6 +9,7 @@ Item {
|
||||||
property bool toggle: false
|
property bool toggle: false
|
||||||
property string helptext
|
property string helptext
|
||||||
property string hovertext
|
property string hovertext
|
||||||
|
property string shortcut
|
||||||
signal clicked
|
signal clicked
|
||||||
signal changed(bool value)
|
signal changed(bool value)
|
||||||
|
|
||||||
|
@ -70,7 +71,7 @@ Item {
|
||||||
|
|
||||||
onEntered: {
|
onEntered: {
|
||||||
button.hovered = true;
|
button.hovered = true;
|
||||||
tooltip_widget.hovertext = hovertext;
|
tooltip_widget.hovertext = button.hovertext + (button.shortcut ? (" (" + button.shortcut + ")") : "");
|
||||||
tooltip_widget.hovered = this;
|
tooltip_widget.hovered = this;
|
||||||
}
|
}
|
||||||
onExited: {
|
onExited: {
|
||||||
|
|
|
@ -89,6 +89,7 @@ OpenGLView {
|
||||||
objectName: "tool_render_quick"
|
objectName: "tool_render_quick"
|
||||||
picture: "images/icon_render_quick.png"
|
picture: "images/icon_render_quick.png"
|
||||||
hovertext: qsTr("Start a quick render")
|
hovertext: qsTr("Start a quick render")
|
||||||
|
shortcut: "F5"
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolbarButton {
|
ToolbarButton {
|
||||||
|
@ -96,6 +97,7 @@ OpenGLView {
|
||||||
objectName: "tool_render_final"
|
objectName: "tool_render_final"
|
||||||
picture: "images/tab_render.png"
|
picture: "images/tab_render.png"
|
||||||
hovertext: qsTr("Start a final render")
|
hovertext: qsTr("Start a final render")
|
||||||
|
shortcut: "Ctrl+F5"
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolbarButton {
|
ToolbarButton {
|
||||||
|
@ -103,6 +105,7 @@ OpenGLView {
|
||||||
objectName: "tool_render_show"
|
objectName: "tool_render_show"
|
||||||
picture: "images/icon_render_show.png"
|
picture: "images/icon_render_show.png"
|
||||||
hovertext: qsTr("Show last rendered image")
|
hovertext: qsTr("Show last rendered image")
|
||||||
|
shortcut: "F6"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -114,6 +117,7 @@ OpenGLView {
|
||||||
objectName: "tool_file_new"
|
objectName: "tool_file_new"
|
||||||
picture: "images/icon_file_new.png"
|
picture: "images/icon_file_new.png"
|
||||||
hovertext: qsTr("Generate a new scene")
|
hovertext: qsTr("Generate a new scene")
|
||||||
|
shortcut: "Ctrl+N"
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolbarButton {
|
ToolbarButton {
|
||||||
|
@ -121,6 +125,7 @@ OpenGLView {
|
||||||
objectName: "tool_file_save"
|
objectName: "tool_file_save"
|
||||||
picture: "images/icon_file_save.png"
|
picture: "images/icon_file_save.png"
|
||||||
hovertext: qsTr("Save the current scene to a file")
|
hovertext: qsTr("Save the current scene to a file")
|
||||||
|
shortcut: "Ctrl+S"
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolbarButton {
|
ToolbarButton {
|
||||||
|
@ -128,6 +133,7 @@ OpenGLView {
|
||||||
objectName: "tool_file_load"
|
objectName: "tool_file_load"
|
||||||
picture: "images/icon_file_load.png"
|
picture: "images/icon_file_load.png"
|
||||||
hovertext: qsTr("Load a scene from a file")
|
hovertext: qsTr("Load a scene from a file")
|
||||||
|
shortcut: "Ctrl+L"
|
||||||
}
|
}
|
||||||
|
|
||||||
ToolbarButton {
|
ToolbarButton {
|
||||||
|
@ -135,6 +141,7 @@ OpenGLView {
|
||||||
objectName: "tool_file_exit"
|
objectName: "tool_file_exit"
|
||||||
picture: "images/icon_exit.png"
|
picture: "images/icon_exit.png"
|
||||||
hovertext: qsTr("Exit the program")
|
hovertext: qsTr("Exit the program")
|
||||||
|
shortcut: "Ctrl+Q"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue