1
0
mirror of https://github.com/Swordfish90/cool-retro-term.git synced 2024-10-06 02:50:50 +01:00

Improvements in menus

This commit is contained in:
Filippo Scognamiglio 2014-04-16 19:30:11 +02:00
parent 5d6040e45d
commit 3478e66044
2 changed files with 30 additions and 11 deletions

View File

@ -50,6 +50,12 @@ Item{
function unloadKTerminal(){
kterminal.active = false;
}
function pasteClipboard(){
kterminal.item.pasteClipboard();
}
function copyClipboard(){
kterminal.item.copyClipboard();
}
Loader{
id: kterminal
@ -85,14 +91,8 @@ Item{
}
Menu{
id: contextmenu
MenuItem{
text: qsTr("Copy")
onTriggered: kterminal.item.copyClipboard()
}
MenuItem{
text: qsTr("Paste")
onTriggered: kterminal.item.pasteClipboard()
}
MenuItem{action: copyAction}
MenuItem{action: pasteAction}
}
MouseArea{

View File

@ -36,21 +36,33 @@ ApplicationWindow{
Action {
id: fullscreenAction
text: "&Fullscreen"
text: qsTr("&Fullscreen")
shortcut: "Alt+F11"
onTriggered: shadersettings.fullscreen = !shadersettings.fullscreen;
}
Action {
id: quitAction
text: "&Quit"
text: qsTr("&Quit")
shortcut: "Ctrl+Q"
onTriggered: terminalWindow.close();
}
Action{
id: showsettingsAction
text: "&Settings"
text: qsTr("&Settings")
onTriggered: settingswindowloader.active = true;
}
Action{
id: copyAction
text: qsTr("&Copy")
shortcut: "Ctrl+Shift+C"
onTriggered: terminal.copyClipboard()
}
Action{
id: pasteAction
text: qsTr("&Paste")
shortcut: "Ctrl+Shift+V"
onTriggered: terminal.pasteClipboard()
}
menuBar: MenuBar {
id: menubar
@ -62,7 +74,14 @@ ApplicationWindow{
Menu {
title: qsTr("Edit")
visible: shadersettings.fullscreen ? false : true
MenuItem {action: copyAction}
MenuItem {action: pasteAction}
MenuSeparator{}
MenuItem {action: showsettingsAction}
}
Menu{
title: qsTr("View")
visible: shadersettings.fullscreen ? false : true
MenuItem {action: fullscreenAction}
}
}