Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Persefone desktop
Manage
Activity
Members
Plan
Wiki
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Deploy
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Persefone
Persefone desktop
Commits
f172c7ca
Commit
f172c7ca
authored
1 year ago
by
xo30xoqa
Browse files
Options
Downloads
Patches
Plain Diff
Started working on the main QML file
parent
549a4588
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitignore
+1
-0
1 addition, 0 deletions
.gitignore
src/main.qml
+151
-0
151 additions, 0 deletions
src/main.qml
src/mockup.ui
+21
-1
21 additions, 1 deletion
src/mockup.ui
with
173 additions
and
1 deletion
.gitignore
0 → 100644
+
1
−
0
View file @
f172c7ca
examples
This diff is collapsed.
Click to expand it.
src/main.qml
0 → 100644
+
151
−
0
View file @
f172c7ca
/// PersefoneDesktop - a GUI to the Persefone model of agriculture and ecosystems
///
/// This file defines the layout of the main window.
///
import
QtQuick
import
QtQuick
.
Controls
import
QtQuick
.
Dialogs
import
QtQuick
.
Layouts
import
org
.
julialang
ApplicationWindow
{
id
:
mainWindow
title
:
"
Persefone.jl Desktop
"
width
:
1024
height
:
768
visible
:
true
menuBar
:
MenuBar
{
Menu
{
title
:
"
&Simulation
"
Action
{
text
:
"
&New Simulation
"
}
Action
{
text
:
"
&Load Saved State
"
}
Action
{
text
:
"
&Save Current State
"
}
MenuSeparator
{
}
Action
{
text
:
"
&Quit
"
onTriggered
:
{
mainWindow
.
close
()
}
}
}
Menu
{
title
:
"
&Help
"
Action
{
text
:
"
&Documentation
"
onTriggered
:
{
Qt
.
openUrlExternally
(
"
https://persefone-model.eu/documentation
"
)
}
}
Action
{
text
:
"
&Website
"
onTriggered
:
{
Qt
.
openUrlExternally
(
"
https://persefone-model.eu/
"
)
}
}
Action
{
text
:
"
&About
"
onTriggered
:
{
aboutDialog
.
open
()
}
}
}
}
MessageDialog
{
id
:
aboutDialog
text
:
"
Persefone.jl Desktop
"
informativeText
:
"
A mechanistic model of agricultural landscapes
\
and ecosystems in Europe.
\n\n\
© 2023 Daniel Vedder, Lea Kolb, Guy Pe'er
\n\
Distributed under the MIT license.
"
}
RowLayout
{
anchors.fill
:
parent
/* MakieViewport { */
/* id: viewport */
/* Layout.fillWidth: true */
/* Layout.fillHeight: true */
/* //renderFunction: render_callback //TODO */
/* } */
// the calendar is no longer a single widget, but needs to be
// constructed manually :-(
ColumnLayout
{
id
:
calenderWidget
Layout.alignment
:
Qt
.
AlignHCenter
Text
{
text
:
"
<b>
"
+
Qt
.
formatDate
(
new
Date
(),
"
MMM yyyy
"
)
+
"
</b>
"
//FIXME
}
DayOfWeekRow
{
locale
:
grid
.
locale
Layout.column
:
1
Layout.fillWidth
:
true
}
MonthGrid
{
id
:
grid
//month: Calendar.December //FIXME
//year: 2015 //FIXME
locale
:
Qt
.
locale
(
"
en_GB
"
)
Layout.fillWidth
:
true
Layout.fillHeight
:
true
delegate
:
Text
{
horizontalAlignment
:
Text
.
AlignHCenter
verticalAlignment
:
Text
.
AlignVCenter
opacity
:
model
.
month
===
grid
.
month
?
1
:
0
text
:
model
.
today
?
"
<b>
"
+
model
.
day
+
"
</b>
"
:
model
.
day
font
:
grid
.
font
required
property
var
model
}
}
}
}
// the main control bar, with pause/step/run buttons, the progress
// bar and a speed slider
footer
:
ToolBar
{
RowLayout
{
id
:
controlBar
anchors.fill
:
parent
Layout.alignment
:
Qt
.
AlignVCenter
Layout.fillWidth
:
true
// anchors.topMargin: 5 //FIXME
// anchors.bottomMargin: 5
Button
{
id
:
pauseButton
text
:
"
||
"
ToolTip.text
:
"
Pause
"
ToolTip.visible
:
hovered
//onClicked: //TODO
}
Button
{
id
:
stepButton
text
:
"
>
"
ToolTip.text
:
"
Step
"
ToolTip.visible
:
hovered
//onClicked: //TODO
}
Button
{
id
:
runButton
text
:
"
>>
"
ToolTip.text
:
"
Run
"
ToolTip.visible
:
hovered
//onClicked: //TODO
}
ProgressBar
{
id
:
progressBar
from
:
0
to
:
100
value
:
24
Layout.fillWidth
:
true
ToolTip.text
:
"
Simulation progress
"
ToolTip.visible
:
hovered
}
Slider
{
id
:
speedSlider
from
:
0.0
to
:
2.0
value
:
0.5
stepSize
:
0.1
snapMode
:
Slider
.
SnapAlways
ToolTip.text
:
"
Time delay between updates
"
ToolTip.visible
:
hovered
}
}
}
}
This diff is collapsed.
Click to expand it.
src/
MainWindow
.ui
→
src/
mockup
.ui
+
21
−
1
View file @
f172c7ca
...
...
@@ -129,7 +129,11 @@
<property
name=
"title"
>
<string>
&
Menu
</string>
</property>
<addaction
name=
"separator"
/>
<addaction
name=
"action_New_run"
/>
<addaction
name=
"actionLoad_saved_state"
/>
<addaction
name=
"actionSave_current_state"
/>
<addaction
name=
"separator"
/>
<addaction
name=
"action_Quit"
/>
</widget>
<widget
class=
"QMenu"
name=
"menu_Help"
>
...
...
@@ -137,6 +141,7 @@
<string>
&
Help
</string>
</property>
<addaction
name=
"actionHelp"
/>
<addaction
name=
"actionWebsite"
/>
<addaction
name=
"actionAbout"
/>
</widget>
<addaction
name=
"menu_Menu"
/>
...
...
@@ -145,7 +150,7 @@
<widget
class=
"QStatusBar"
name=
"statusbar"
/>
<action
name=
"actionHelp"
>
<property
name=
"text"
>
<string>
Help
</string>
<string>
Documentation
</string>
</property>
</action>
<action
name=
"actionAbout"
>
...
...
@@ -163,6 +168,21 @@
<string>
&
Quit
</string>
</property>
</action>
<action
name=
"actionSave_current_state"
>
<property
name=
"text"
>
<string>
&
Save current state
</string>
</property>
</action>
<action
name=
"actionLoad_saved_state"
>
<property
name=
"text"
>
<string>
&
Load saved state
</string>
</property>
</action>
<action
name=
"actionWebsite"
>
<property
name=
"text"
>
<string>
Website
</string>
</property>
</action>
</widget>
<resources/>
<connections/>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment