aboutsummaryrefslogtreecommitdiff
path: root/main_view.qml
diff options
context:
space:
mode:
authorSamuel Fadel <samuelfadel@gmail.com>2016-02-11 12:03:59 -0200
committerSamuel Fadel <samuelfadel@gmail.com>2016-02-11 12:03:59 -0200
commitb5ca997b2d2a64f955b78208d0362cba0278f8d3 (patch)
tree0dbd235d7c91c11968946142e8ed7df155471c7e /main_view.qml
parentff08c0541156faf8a220a62b4192a80803b86da3 (diff)
Modified the way the history interacts with other components.
* Main class is now responsible for updating map components whenever the current map changes (even rewinding): this simplifies other objects because they don't have to know anything about how the data is being displayed later (no CP/RP juggling everywhere) * Added undo/reset actions to main view, including menu items * ProjectionHistory now has specific signals for each change happening to the history
Diffstat (limited to 'main_view.qml')
-rw-r--r--main_view.qml29
1 files changed, 25 insertions, 4 deletions
diff --git a/main_view.qml b/main_view.qml
index cfbea4f..b0cee3c 100644
--- a/main_view.qml
+++ b/main_view.qml
@@ -28,6 +28,12 @@ ApplicationWindow {
}
Menu {
+ title: "Edit"
+ MenuItem { action: undoManipulationAction }
+ MenuItem { action: resetManipulationAction }
+ }
+
+ Menu {
title: "Select"
MenuItem { action: selectRPsAction }
MenuItem { action: selectCPsAction }
@@ -79,6 +85,7 @@ ApplicationWindow {
y: parent.y
z: 1
anchors.fill: parent
+ glyphSize: 3.0
}
Scatterplot {
@@ -258,10 +265,10 @@ ApplicationWindow {
id: cpGlyphSizeSpinBox
maximumValue: 100
minimumValue: 6
- value: cpPlot.glyphSize()
decimals: 1
stepSize: 1
- onValueChanged: cpPlot.setGlyphSize(this.value)
+ value: cpPlot.glyphSize
+ onValueChanged: cpPlot.glyphSize = this.value
}
Label { text: "Opacity:" }
@@ -364,10 +371,10 @@ ApplicationWindow {
id: rpGlyphSizeSpinBox
maximumValue: 100
minimumValue: 2
- value: rpPlot.glyphSize()
decimals: 1
stepSize: 1
- onValueChanged: rpPlot.setGlyphSize(this.value)
+ value: rpPlot.glyphSize
+ onValueChanged: rpPlot.glyphSize = this.value
}
Label { text: "Opacity:" }
@@ -460,6 +467,20 @@ ApplicationWindow {
}
Action {
+ id: undoManipulationAction
+ text: "&Undo manipulation"
+ shortcut: "Ctrl+Z"
+ onTriggered: Main.undoManipulation()
+ }
+
+ Action {
+ id: resetManipulationAction
+ text: "&Reset manipulation"
+ shortcut: "Ctrl+R"
+ onTriggered: Main.resetManipulation()
+ }
+
+ Action {
id: selectRPsAction
text: "&Regular points"
shortcut: "R"