Share page refactoring part 1
This commit is contained in:
parent
ed26706ee7
commit
a89104127a
32 changed files with 985 additions and 569 deletions
33
client/ui/qml/Controls/ContextMenu.qml
Normal file
33
client/ui/qml/Controls/ContextMenu.qml
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
import QtQuick 2.12
|
||||
import QtQuick.Controls 2.12
|
||||
import Qt.labs.platform 1.0
|
||||
|
||||
Menu {
|
||||
property var textObj
|
||||
|
||||
MenuItem {
|
||||
text: qsTr("C&ut")
|
||||
shortcut: StandardKey.Cut
|
||||
enabled: textObj.selectedText
|
||||
onTriggered: textObj.cut()
|
||||
}
|
||||
MenuItem {
|
||||
text: qsTr("&Copy")
|
||||
shortcut: StandardKey.Copy
|
||||
enabled: textObj.selectedText
|
||||
onTriggered: textObj.copy()
|
||||
}
|
||||
MenuItem {
|
||||
text: qsTr("&Paste")
|
||||
shortcut: StandardKey.Paste
|
||||
enabled: textObj.canPaste
|
||||
onTriggered: textObj.paste()
|
||||
}
|
||||
|
||||
MenuItem {
|
||||
text: qsTr("&SelectAll")
|
||||
shortcut: StandardKey.SelectAll
|
||||
enabled: textObj.length > 0
|
||||
onTriggered: textObj.selectAll()
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue