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

View File

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