[TOC]
Implements a client to communicate with the Open-Meteo REST API. The project creates a custom QML module and types related with weather conditions.
The repo depends on Qt libraries.
The project uses CMake presets as a way to share CMake configurations. Refer to cmake, ctest and cpack documentation for more information on the use of presets.
include(FetchContent)
FetchContent_Declare(
EstervOpenMeteo
GIT_REPOSITORY https://github.com/EddyTheCo/Esterv.Utils.OMClient.git
GIT_TAG vMAJOR.MINOR.PATCH
FIND_PACKAGE_ARGS MAJOR.MINOR CONFIG
)
FetchContent_MakeAvailable(EstervOpenMeteo)
target_link_libraries(<target> <PRIVATE|PUBLIC|INTERFACE> Esterv::OMClient)
If you want to use the QML module also add
target_link_libraries(<target> <PRIVATE|PUBLIC|INTERFACE> $<$<STREQUAL:$<TARGET_PROPERTY:Esterv::OMClient,TYPE>,STATIC_LIBRARY>:Esterv::OMClientplugin>)
You can read the API reference, or generate it yourself like
cmake --workflow --preset default-documentation
One needs to make available to the QML engine the different modules by setting the QML import path.
-
In your main function
engine.addImportPath("qrc:/esterVtech.com/imports");
to use the resource file. -
Set the environment variable like
export QML_IMPORT_PATH=installDir/CMAKE_INSTALL_LIBDIR
whereCMAKE_INSTALL_LIBDIR
is whereEsterv
folder was created.
The examples folder shows the use of the different custom types provided by the QML module.
One can also play with the types here
We appreciate any contribution!
Currently not all the weather codes are implemented, contribution to the shaders are highly appreciated. I find shaders very customizable, you can test your new shaders contribution here
You can open an issue or request a feature.
You can open a PR to the develop
branch and the CI/CD will take care of the rest.
Make sure to acknowledge your work, and ideas when contributing.