Skip to content

Commit

Permalink
Merge pull request #144 from aeag/docs/add-how-LMFP-behaves-during-qg…
Browse files Browse the repository at this point in the history
…is-startup

Docs: add how LMFP behaves during QGIS startup
  • Loading branch information
Guts authored Dec 20, 2024
2 parents 797b17b + 7a83da0 commit fc31d50
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 2 deletions.
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

0 comments on commit fc31d50

Please sign in to comment.