Skip to content

Commit

Permalink
Put Expressions groups table of contents in a collapsible widget (#8945)
Browse files Browse the repository at this point in the history
  • Loading branch information
DelazJ authored Mar 8, 2024
2 parents dbbfc92 + 3cc2dd2 commit 66cb58f
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 107 deletions.
177 changes: 70 additions & 107 deletions docs/user_manual/expressions/functions_list.rst
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,9 @@ Aggregates Functions

This group contains functions which aggregate values over layers and fields.

.. only:: html

.. contents::
:local:
:class: toc_columns
.. include:: text_include.rst
:start-after: .. functions_group_toc
:end-before: .. end_functions_group_toc

.. include:: expression_help/Aggregates.rst
:start-after: :orphan:
Expand All @@ -48,11 +46,9 @@ list data structures). The order of values within the array matters, unlike the
:ref:`'map' data structure <maps_functions>`, where the order of key-value pairs
is irrelevant and values are identified by their keys.

.. only:: html

.. contents::
:local:
:class: toc_columns
.. include:: text_include.rst
:start-after: .. functions_group_toc
:end-before: .. end_functions_group_toc

.. include:: expression_help/Arrays.rst
:start-after: :orphan:
Expand All @@ -70,11 +66,9 @@ Color Functions

This group contains functions for manipulating colors.

.. only:: html

.. contents::
:local:
:class: toc_columns
.. include:: text_include.rst
:start-after: .. functions_group_toc
:end-before: .. end_functions_group_toc

.. include:: expression_help/Color.rst
:start-after: :orphan:
Expand Down Expand Up @@ -109,11 +103,9 @@ Conditional Functions

This group contains functions to handle conditional checks in expressions.

.. only:: html

.. contents::
:local:
:class: toc_columns
.. include:: text_include.rst
:start-after: .. functions_group_toc
:end-before: .. end_functions_group_toc

.. include:: expression_help/Conditionals.rst
:start-after: :orphan:
Expand All @@ -127,11 +119,9 @@ Conversions Functions
This group contains functions to convert one data type to another
(e.g., string from/to integer, binary from/to string, string to date, ...).

.. only:: html

.. contents::
:local:
:class: toc_columns
.. include:: text_include.rst
:start-after: .. functions_group_toc
:end-before: .. end_functions_group_toc

.. include:: expression_help/Conversions.rst
:start-after: :orphan:
Expand Down Expand Up @@ -167,11 +157,9 @@ This group shares several functions with the :ref:`conversion_functions`
one of the date extraction functions (e.g., :ref:`day() <expression_function_Date_and_Time_day>`
to get the interval expressed in days)

.. only:: html

.. contents::
:local:
:class: toc_columns
.. include:: text_include.rst
:start-after: .. functions_group_toc
:end-before: .. end_functions_group_toc

.. include:: expression_help/Date_and_Time.rst
:start-after: :orphan:
Expand Down Expand Up @@ -230,11 +218,9 @@ To add a value to the expression you are writing, double-click on it in the list
If the value is of a string type, it should be simple quoted, otherwise no quote
is needed.

.. only:: html

.. contents::
:local:
:class: toc_columns
.. include:: text_include.rst
:start-after: .. functions_group_toc
:end-before: .. end_functions_group_toc

.. include:: expression_help/Fields_and_Values.rst
:start-after: :orphan:
Expand All @@ -245,11 +231,9 @@ Files and Paths Functions

This group contains functions which manipulate file and path names.

.. only:: html

.. contents::
:local:
:class: toc_columns
.. include:: text_include.rst
:start-after: .. functions_group_toc
:end-before: .. end_functions_group_toc

.. include:: expression_help/Files_and_Paths.rst
:start-after: :orphan:
Expand All @@ -261,11 +245,9 @@ Form Functions
This group contains functions that operate exclusively under the attribute form
context. For example, in :ref:`field's widgets <vector_attributes_menu>` settings.

.. only:: html

.. contents::
:local:
:class: toc_columns
.. include:: text_include.rst
:start-after: .. functions_group_toc
:end-before: .. end_functions_group_toc

.. include:: expression_help/Form.rst
:start-after: :orphan:
Expand All @@ -276,11 +258,9 @@ Fuzzy Matching Functions

This group contains functions for fuzzy comparisons between values.

.. only:: html

.. contents::
:local:
:class: toc_columns
.. include:: text_include.rst
:start-after: .. functions_group_toc
:end-before: .. end_functions_group_toc

.. include:: expression_help/Fuzzy_Matching.rst
:start-after: :orphan:
Expand All @@ -291,11 +271,9 @@ General Functions

This group contains general assorted functions.

.. only:: html

.. contents::
:local:
:class: toc_columns
.. include:: text_include.rst
:start-after: .. functions_group_toc
:end-before: .. end_functions_group_toc

.. include:: expression_help/General.rst
:start-after: :orphan:
Expand All @@ -315,11 +293,9 @@ Geometry Functions
This group contains functions that operate on geometry objects
(e.g. buffer, transform, $area).

.. only:: html

.. contents::
:local:
:class: toc_columns
.. include:: text_include.rst
:start-after: .. functions_group_toc
:end-before: .. end_functions_group_toc

.. include:: expression_help/GeometryGroup.rst
:start-after: :orphan:
Expand Down Expand Up @@ -449,7 +425,7 @@ Further reading: :ref:`qgisforcerhr` algorithm,
.. include:: expression_help/GeometryGroup.rst
:start-after: .. end_force_rhr_section
:end-before: .. end_intersection_section

Further reading: :ref:`qgisintersection` algorithm

.. include:: expression_help/GeometryGroup.rst
Expand Down Expand Up @@ -741,11 +717,9 @@ Layout Functions

This group contains functions to manipulate print layout items properties.

.. only:: html

.. contents::
:local:
:class: toc_columns
.. include:: text_include.rst
:start-after: .. functions_group_toc
:end-before: .. end_functions_group_toc

.. include:: expression_help/Layout.rst
:start-after: :orphan:
Expand Down Expand Up @@ -779,11 +753,9 @@ such as when performing :ref:`aggregates <aggregates_function>`, :ref:`attribute

It also provides some convenient functions to manipulate layers.

.. only:: html

.. contents::
:local:
:class: toc_columns
.. include:: text_include.rst
:start-after: .. functions_group_toc
:end-before: .. end_functions_group_toc

.. include:: expression_help/Map_Layers.rst
:start-after: :orphan:
Expand All @@ -808,11 +780,10 @@ arrays). Unlike the :ref:`list data structure <array_functions>` where values
order matters, the order of the key-value pairs in the map object is not relevant
and values are identified by their keys.

.. only:: html
.. include:: text_include.rst
:start-after: .. functions_group_toc
:end-before: .. end_functions_group_toc

.. contents::
:local:
:class: toc_columns

.. include:: expression_help/Maps.rst
:start-after: :orphan:
Expand All @@ -830,11 +801,9 @@ Mathematical Functions

This group contains math functions (e.g., square root, sin and cos).

.. only:: html

.. contents::
:local:
:class: toc_columns
.. include:: text_include.rst
:start-after: .. functions_group_toc
:end-before: .. end_functions_group_toc

.. include:: expression_help/Math.rst
:start-after: :orphan:
Expand All @@ -846,11 +815,9 @@ Meshes Functions

This group contains functions which calculate or return mesh related values.

.. only:: html

.. contents::
:local:
:class: toc_columns
.. include:: text_include.rst
:start-after: .. functions_group_toc
:end-before: .. end_functions_group_toc

.. include:: expression_help/Meshes.rst
:start-after: :orphan:
Expand All @@ -863,11 +830,9 @@ This group contains operators (e.g., +, -, \*).
Note that for most of the mathematical functions below,
if one of the inputs is NULL then the result is NULL.

.. only:: html

.. contents::
:local:
:class: toc_columns
.. include:: text_include.rst
:start-after: .. functions_group_toc
:end-before: .. end_functions_group_toc

.. include:: expression_help/Operators.rst
:start-after: :orphan:
Expand Down Expand Up @@ -919,7 +884,9 @@ Processing Functions

This group contains functions that operate on processing algorithms.

.. contents:: :local:
.. include:: text_include.rst
:start-after: .. functions_group_toc
:end-before: .. end_functions_group_toc

.. include:: expression_help/Processing.rst
:start-after: :orphan:
Expand All @@ -932,7 +899,9 @@ Rasters Functions

This group contains functions to operate on raster layer.

.. contents:: :local:
.. include:: text_include.rst
:start-after: .. functions_group_toc
:end-before: .. end_functions_group_toc

.. include:: expression_help/Rasters.rst
:start-after: :orphan:
Expand All @@ -945,11 +914,9 @@ Record and Attributes Functions

This group contains functions that operate on record identifiers.

.. only:: html

.. contents::
:local:
:class: toc_columns
.. include:: text_include.rst
:start-after: .. functions_group_toc
:end-before: .. end_functions_group_toc

.. include:: expression_help/Record_and_Attributes.rst
:start-after: :orphan:
Expand Down Expand Up @@ -1030,11 +997,9 @@ Sensors Functions

This group contains functions to interact with sensors.

.. only:: html

.. contents::
:local:
:class: toc_columns
.. include:: text_include.rst
:start-after: .. functions_group_toc
:end-before: .. end_functions_group_toc

.. include:: expression_help/Sensors.rst
:start-after: :orphan:
Expand All @@ -1048,11 +1013,9 @@ String Functions
This group contains functions that operate on strings
(e.g., that replace, convert to upper case).

.. only:: html

.. contents::
:local:
:class: toc_columns
.. include:: text_include.rst
:start-after: .. functions_group_toc
:end-before: .. end_functions_group_toc

.. include:: expression_help/String.rst
:start-after: :orphan:
Expand Down
21 changes: 21 additions & 0 deletions docs/user_manual/expressions/text_include.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
:orphan:

Texts For Include
=================

.. functions_group_toc
.. Used to display local TOC for expression functions groups
in columns within a collapsible widget, only on html build
.. only:: html

.. admonition:: Show/hide list of functions
:class: dropdown

.. only:: html

.. contents::
:local:
:class: toc_columns

.. end_functions_group_toc

0 comments on commit 66cb58f

Please sign in to comment.