Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs: add how LMFP behaves during QGIS startup #144

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
# 3rd party
"myst_parser",
"sphinx_copybutton",
"sphinxcontrib.mermaid",
]


Expand All @@ -48,7 +49,7 @@
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None
# language = None

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
Expand Down Expand Up @@ -82,6 +83,17 @@
"qgis": ("https://qgis.org/pyqgis/master/", None),
}

# mermaid
mermaid_d3_zoom = True
mermaid_params = [
"--theme",
"forest",
"--backgroundColor",
"transparent",
]
# TODO: remove next line when the mermaid version shipped with sphinxcontrib-mermaid is 11.4+
mermaid_version = "11.4.1"

# MyST Parser
myst_enable_extensions = [
"amsmath",
Expand Down
File renamed without changes.
24 changes: 24 additions & 0 deletions docs/how_does_it_works.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# How does it work?

```{mermaid}
---
title: "How Layers Menu From Project behaves during QGIS launch"
---
flowchart TD
A@{ shape: circle, label: "QGIS starts" } -->|splash screen displayed| B(load GUI and plugins)

subgraph "QGIS UI main thread"
B -->|GUI is initialized| C@{ shape: curv-trap, label: "QGIS main UI displayed" }
C ==> Q((("QGIS is mainly usable")))
end

subgraph "LMFP thread (QgsTask)"
C -.->|threaded LMFP| D[[read projects configuration]]
D -.-> E[[check project's cache]]
E -.->|cache still valid| F(create menus from caches JSON files)
F == menus appear in the main UI ==> Q
E -.->|cache has expired or is invalid| G(download/copy remote files)
G -.->|store cache|H("{path_to_qgis_profile}/cache/menu_from_project")
H --> F
end
```
3 changes: 2 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ caption: Usage
---
usage/en_use
usage/fr_use
how_does_it_works
```

```{toctree}
Expand All @@ -33,7 +34,7 @@ maxdepth: 1
caption: Contributing
---
development/contribute
development/environment
development/setup
development/documentation
development/translation
development/packaging
Expand Down
1 change: 1 addition & 0 deletions requirements/documentation.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@ furo>=2024
myst-parser[linkify]>=2
sphinx-autobuild>=2024
sphinx-copybutton>=0.5
sphinxcontrib-mermaid>=1,<2
Loading