From 7b0880566d9980742e9656c57315f64f7fdd1df9 Mon Sep 17 00:00:00 2001 From: Marco Matthies <71844+marcom@users.noreply.github.com> Date: Tue, 4 Jun 2024 13:45:07 +0200 Subject: [PATCH] Move population graph to main window next to map --- src/main.qml | 29 ++++++++++------------------- 1 file changed, 10 insertions(+), 19 deletions(-) diff --git a/src/main.qml b/src/main.qml index eca6820..5b36598 100644 --- a/src/main.qml +++ b/src/main.qml @@ -49,10 +49,6 @@ ApplicationWindow { } Menu { title: "&Data" - Action { - text: "Show &Population Graph" - onTriggered: { populationGraph.visible = true } - } Action { text: "Save &Simulation Output" onTriggered: { Julia.saveoutput() } @@ -78,10 +74,19 @@ ApplicationWindow { // visualise the model map and the locations of animals MakieViewport { id: mapviewport - anchors.fill: parent + width: parent.width / 2 + height: parent.height renderFunction: render_map_callback } + MakieViewport { + id: plotviewport + x: parent.width / 2 + width: parent.width / 2 + height: parent.height + renderFunction: render_plot_callback + } + // the main control bar, with pause/step/run buttons, the progress // bar and a speed slider footer: ToolBar { @@ -166,20 +171,6 @@ Distributed under the MIT license." onAccepted: { Julia.savesimulation(selectedFile.toString()) } } - Window { - id: populationGraph - title: "Population Graph" - width: 512 - height: 512 - visible: false - - MakieViewport { - id: plotviewport - anchors.fill: parent - renderFunction: render_plot_callback - } - } - Popup { id: splashPopup parent: Overlay.overlay -- GitLab