From: Tobias Koenig Date: Wed, 17 Oct 2012 17:29:41 +0000 (+0200) Subject: Use some slots of TextEditor now that we support them X-Git-Url: http://git.silmor.de/gitweb/?a=commitdiff_plain;h=ee91468154108ad3f5acf043b2cd7198a2d287b4;p=konrad%2FDeclarativeWidgets.git Use some slots of TextEditor now that we support them --- diff --git a/editor.qml b/editor.qml index 87aab50..6e9f5e0 100644 --- a/editor.qml +++ b/editor.qml @@ -1,13 +1,26 @@ import QtGui 1.0 MainWindow { + windowTitle: qsTr("Declarative Widget Editor") + + size: Qt.size(500, 300) MenuBar { Menu { title: qsTr("File") Action { - text: "New" + text: qsTr("New") + } + + Action { + text: qsTr("Save") + } + + Separator {} + + Action { + text: qsTr("Print") } Separator {} @@ -22,29 +35,63 @@ MainWindow { title: qsTr("Edit") Action { - text: "Copy" + text: qsTr("Undo") + onTriggered: textEdit.undo() + } - onTriggered: textEdit.copy() + Action { + text: qsTr("Redo") + onTriggered: textEdit.redo() + } + + Separator {} + + Action { + text: qsTr("Cut") + onTriggered: textEdit.cut() } Action { - text: "Paste" + text: qsTr("Copy") + onTriggered: textEdit.copy() + } + Action { + text: qsTr("Paste") onTriggered: textEdit.paste() } + + Separator {} + + Action { + text: qsTr("Select All") + onTriggered: textEdit.selectAll() + } } - Separator {} + Menu { + title: qsTr("View") + + Action { + text: qsTr("Enlarge Font") + onTriggered: textEdit.zoomIn() + } + + Action { + text: qsTr("Shrink Font") + onTriggered: textEdit.zoomOut() + } + } Menu { title: qsTr("Help") Action { - text: "About" + text: qsTr("About") } Action { - text: "About Qt" + text: qsTr("About Qt") } } }