QuickGraphLib 0.1.0a6__tar.gz → 0.1.0a8__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- quickgraphlib-0.1.0a8/.clang-format +7 -0
- quickgraphlib-0.1.0a8/.gitignore +9 -0
- quickgraphlib-0.1.0a8/.pre-commit-config.yaml +52 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/CMakeLists.txt +7 -3
- {quickgraphlib-0.1.0a6/QuickGraphLib.egg-info → quickgraphlib-0.1.0a8}/PKG-INFO +81 -78
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/QuickGraphLib/AntialiasingContainer.qml +3 -2
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/QuickGraphLib/Axis.qml +3 -3
- quickgraphlib-0.1.0a8/QuickGraphLib/CMakeLists.txt +88 -0
- quickgraphlib-0.1.0a8/QuickGraphLib/DataTypes.cpp +68 -0
- quickgraphlib-0.1.0a8/QuickGraphLib/DataTypes.hpp +33 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/QuickGraphLib/GraphArea.qml +21 -0
- quickgraphlib-0.1.0a8/QuickGraphLib/GraphItems/CMakeLists.txt +54 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/QuickGraphLib/GraphItems/Line.qml +1 -6
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/QuickGraphLib/ImageView.cpp +105 -52
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/QuickGraphLib/ImageView.hpp +19 -28
- quickgraphlib-0.1.0a8/QuickGraphLib/Plugin.cpp +23 -0
- quickgraphlib-0.1.0a8/QuickGraphLib/PreFabs/CMakeLists.txt +34 -0
- quickgraphlib-0.1.0a8/QuickGraphLib/PreFabs/ImageAxes.qml +193 -0
- quickgraphlib-0.1.0a8/QuickGraphLib/QuickGraphLib.hpp +6 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/QuickGraphLib/ZoomPanHandler.qml +2 -0
- quickgraphlib-0.1.0a8/QuickGraphLib/__init__.py +27 -0
- quickgraphlib-0.1.0a8/QuickGraphLib/_version.py +16 -0
- quickgraphlib-0.1.0a8/QuickGraphLib/bindings/Bindings.hpp +6 -0
- quickgraphlib-0.1.0a8/QuickGraphLib/bindings/Bindings.xml +29 -0
- quickgraphlib-0.1.0a8/QuickGraphLib/bindings/CMakeLists.txt +190 -0
- quickgraphlib-0.1.0a8/QuickGraphLib/bindings/ShibokenHelpers.cpp +97 -0
- quickgraphlib-0.1.0a8/QuickGraphLib/bindings/ShibokenHelpers.hpp +13 -0
- quickgraphlib-0.1.0a8/QuickGraphLib/bindings/glue/DataTypes.cpp +12 -0
- quickgraphlib-0.1.0a8/QuickGraphLib/bindings/pyigen.py +42 -0
- {quickgraphlib-0.1.0a6/quickgraphlib_helpers → quickgraphlib-0.1.0a8/QuickGraphLib}/contours.py +8 -9
- quickgraphlib-0.1.0a8/QuickGraphLib/doc/AxesGridLayout.drawio +49 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/QuickGraphLib/doc/index.qdoc +3 -1
- quickgraphlib-0.1.0a8/QuickGraphLib/doc/module-cpp.qdoc +40 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/QuickGraphLib/doc/python_helpers.qdoc +2 -2
- quickgraphlib-0.1.0a8/QuickGraphLib/helpers/Foreign.hpp +30 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/QuickGraphLib/helpers/Helpers.cpp +3 -2
- quickgraphlib-0.1.0a8/activate_venv.ps1 +1 -0
- quickgraphlib-0.1.0a8/ci/find_qt.py +10 -0
- quickgraphlib-0.1.0a8/ci/setup_qt.py +47 -0
- quickgraphlib-0.1.0a8/docs/build_docs.py +73 -0
- quickgraphlib-0.1.0a8/docs/config.qdocconf +49 -0
- quickgraphlib-0.1.0a8/docs/style.css +186 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/BuiltinColormaps.qml +0 -2
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/ColorMesh.qml +3 -13
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/Complex.qml +1 -0
- quickgraphlib-0.1.0a8/examples/Conway.png +0 -0
- quickgraphlib-0.1.0a8/examples/Conway.qdoc +16 -0
- quickgraphlib-0.1.0a8/examples/Conway.qml +178 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/DarkSinGraph.qml +4 -0
- quickgraphlib-0.1.0a8/examples/ExampleGallery.png +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/ImageAlignment.qml +1 -2
- quickgraphlib-0.1.0a8/examples/conway.py +243 -0
- quickgraphlib-0.1.0a8/examples/gallery.py +46 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/pyproject.toml +27 -9
- quickgraphlib-0.1.0a8/requirements.txt +47 -0
- quickgraphlib-0.1.0a8/setup.cfg +2 -0
- quickgraphlib-0.1.0a8/setup_venv.ps1 +4 -0
- quickgraphlib-0.1.0a6/MANIFEST.in +0 -4
- quickgraphlib-0.1.0a6/PKG-INFO +0 -78
- quickgraphlib-0.1.0a6/QuickGraphLib/CMakeLists.txt +0 -29
- quickgraphlib-0.1.0a6/QuickGraphLib/GraphItems/CMakeLists.txt +0 -27
- quickgraphlib-0.1.0a6/QuickGraphLib/PreFabs/CMakeLists.txt +0 -21
- quickgraphlib-0.1.0a6/QuickGraphLib/helpers/Foreign.hpp +0 -13
- quickgraphlib-0.1.0a6/QuickGraphLib.egg-info/SOURCES.txt +0 -131
- quickgraphlib-0.1.0a6/QuickGraphLib.egg-info/dependency_links.txt +0 -1
- quickgraphlib-0.1.0a6/QuickGraphLib.egg-info/requires.txt +0 -11
- quickgraphlib-0.1.0a6/QuickGraphLib.egg-info/top_level.txt +0 -2
- quickgraphlib-0.1.0a6/examples/ExampleGallery.png +0 -0
- quickgraphlib-0.1.0a6/quickgraphlib_helpers/__init__.py +0 -8
- quickgraphlib-0.1.0a6/setup.cfg +0 -7
- quickgraphlib-0.1.0a6/setup.py +0 -74
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/LICENCE +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/QuickGraphLib/ColorMaps.cpp +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/QuickGraphLib/ColorMaps.hpp +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/QuickGraphLib/GraphItems/AxHLine.qml +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/QuickGraphLib/GraphItems/AxHSpan.qml +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/QuickGraphLib/GraphItems/AxVLine.qml +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/QuickGraphLib/GraphItems/AxVSpan.qml +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/QuickGraphLib/GraphItems/BasicLegend.qml +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/QuickGraphLib/GraphItems/BasicLegendItem.qml +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/QuickGraphLib/GraphItems/ColorMesh.qml +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/QuickGraphLib/GraphItems/Contour.qml +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/QuickGraphLib/GraphItems/GraphItemDragHandler.qml +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/QuickGraphLib/GraphItems/Grid.qml +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/QuickGraphLib/GraphItems/Histogram.qml +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/QuickGraphLib/GraphItems/Marker.qml +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/QuickGraphLib/GraphItems/helpers/GridHelper.cpp +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/QuickGraphLib/GraphItems/helpers/GridHelper.hpp +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/QuickGraphLib/GraphItems/helpers/HistogramHelper.cpp +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/QuickGraphLib/GraphItems/helpers/HistogramHelper.hpp +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/QuickGraphLib/PreFabs/XYAxes.qml +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/QuickGraphLib/ScalingContainer.qml +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/QuickGraphLib/ShapeRepeater.qml +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/QuickGraphLib/TickLabel.qml +0 -0
- {quickgraphlib-0.1.0a6/quickgraphlib_helpers → quickgraphlib-0.1.0a8/QuickGraphLib}/consts.py +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/QuickGraphLib/doc/AxesGridLayout.svg +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/QuickGraphLib/doc/export.qdoc +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/QuickGraphLib/doc/graphitems.qdoc +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/QuickGraphLib/doc/graphstructure.qdoc +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/QuickGraphLib/doc/interaction.qdoc +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/QuickGraphLib/doc/module.qdoc +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/QuickGraphLib/doc/prefabs.qdoc +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/QuickGraphLib/helpers/AxisHelper.cpp +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/QuickGraphLib/helpers/AxisHelper.hpp +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/QuickGraphLib/helpers/Helpers.hpp +0 -0
- {quickgraphlib-0.1.0a6/quickgraphlib_helpers → quickgraphlib-0.1.0a8/QuickGraphLib}/py.typed +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/README.md +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/AllTheAxes.png +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/AllTheAxes.qdoc +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/AllTheAxes.qml +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/BasicHistogram.png +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/BasicHistogram.qdoc +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/BasicHistogram.qml +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/BasicSinGraph.png +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/BasicSinGraph.qdoc +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/BasicSinGraph.qml +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/BasicSinGraphNoPrefabs.png +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/BasicSinGraphNoPrefabs.qdoc +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/BasicSinGraphNoPrefabs.qml +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/BuiltinColormaps.png +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/BuiltinColormaps.qdoc +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/ColorMappedImages.png +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/ColorMappedImages.qdoc +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/ColorMappedImages.qml +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/ColorMesh.png +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/ColorMesh.qdoc +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/Complex.png +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/Complex.qdoc +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/Contours.png +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/Contours.qdoc +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/Contours.qml +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/DarkSinGraph.png +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/DarkSinGraph.qdoc +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/DraggableRegion.png +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/DraggableRegion.qdoc +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/DraggableRegion.qml +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/ExampleGallery.qml +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/ImageAlignment.png +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/ImageAlignment.qdoc +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/InvertedAxes.png +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/InvertedAxes.qdoc +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/InvertedAxes.qml +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/ReadoutLine.png +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/ReadoutLine.qdoc +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/ReadoutLine.qml +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/ScalingGraph.png +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/ScalingGraph.qdoc +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/ScalingGraph.qml +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/Scatter.png +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/Scatter.qdoc +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/Scatter.qml +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/SpansAndLines.png +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/SpansAndLines.qdoc +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/SpansAndLines.qml +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/Subgraphs.png +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/Subgraphs.qdoc +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/Subgraphs.qml +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/TwinX.png +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/TwinX.qdoc +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/TwinX.qml +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/ZoomableAsImage.png +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/ZoomableAsImage.qdoc +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/ZoomableAsImage.qml +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/ZoomableAxes.png +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/ZoomableAxes.qdoc +0 -0
- {quickgraphlib-0.1.0a6 → quickgraphlib-0.1.0a8}/examples/ZoomableAxes.qml +0 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
fail_fast: true
|
|
2
|
+
repos:
|
|
3
|
+
- repo: local
|
|
4
|
+
hooks:
|
|
5
|
+
- id: licence-present
|
|
6
|
+
name: licence-present
|
|
7
|
+
entry: SPDX-License-Identifier
|
|
8
|
+
language: pygrep
|
|
9
|
+
args: [--negate]
|
|
10
|
+
files: "((\\.(qml|py|css|qdoc|qdocconf|js|cpp|hpp))|qmldir|CMakeLists.txt)$"
|
|
11
|
+
- id: qdebug-present
|
|
12
|
+
name: qdebug-present
|
|
13
|
+
entry: qDebug
|
|
14
|
+
language: pygrep
|
|
15
|
+
files: "(\\.(cpp|hpp))$"
|
|
16
|
+
- id: black
|
|
17
|
+
name: black
|
|
18
|
+
entry: venv/Scripts/black.exe
|
|
19
|
+
language: system
|
|
20
|
+
types: [python]
|
|
21
|
+
- id: gersemi
|
|
22
|
+
name: gersemi
|
|
23
|
+
entry: venv/Scripts/gersemi.exe -i
|
|
24
|
+
language: system
|
|
25
|
+
files: "CMakeLists.txt"
|
|
26
|
+
- id: qmlformat
|
|
27
|
+
name: qmlformat
|
|
28
|
+
entry: venv/Scripts/pyside6-qmlformat.exe -i -n
|
|
29
|
+
files: "\\.qml$"
|
|
30
|
+
language: system
|
|
31
|
+
# - id: qmllint
|
|
32
|
+
# name: qmllint
|
|
33
|
+
# entry: venv/Scripts/pyside6-qmllint.exe
|
|
34
|
+
# files: "\\.qml$"
|
|
35
|
+
# language: system
|
|
36
|
+
- id: isort
|
|
37
|
+
name: isort
|
|
38
|
+
entry: venv/Scripts/isort.exe --settings-file pyproject.toml
|
|
39
|
+
language: system
|
|
40
|
+
types: [python]
|
|
41
|
+
# - id: pylint
|
|
42
|
+
# name: pylint
|
|
43
|
+
# entry: venv/Scripts/pylint.exe
|
|
44
|
+
# language: system
|
|
45
|
+
# types: [python]
|
|
46
|
+
# require_serial: true
|
|
47
|
+
- id: mypy
|
|
48
|
+
name: mypy
|
|
49
|
+
entry: venv/Scripts/mypy.exe
|
|
50
|
+
language: system
|
|
51
|
+
types: [python]
|
|
52
|
+
require_serial: true
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
cmake_minimum_required(VERSION 3.16)
|
|
5
5
|
set(CMAKE_OSX_ARCHITECTURES "arm64;x86_64" CACHE STRING "" FORCE)
|
|
6
6
|
|
|
7
|
-
project(
|
|
7
|
+
project(QuickGraphLib VERSION 1.0.0 LANGUAGES CXX)
|
|
8
8
|
|
|
9
9
|
set(CMAKE_CXX_STANDARD 17)
|
|
10
10
|
set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
@@ -12,11 +12,15 @@ set(CMAKE_CXX_STANDARD_REQUIRED ON)
|
|
|
12
12
|
if(MSVC)
|
|
13
13
|
add_compile_options(/W4)
|
|
14
14
|
else()
|
|
15
|
-
add_compile_options(-Wextra -Wpedantic -
|
|
15
|
+
add_compile_options(-Wextra -Wpedantic -fno-visibility-inlines-hidden)
|
|
16
16
|
endif()
|
|
17
17
|
|
|
18
18
|
if(NOT INSTALL_SUBPATH)
|
|
19
|
-
set(INSTALL_SUBPATH
|
|
19
|
+
set(INSTALL_SUBPATH
|
|
20
|
+
${CMAKE_INSTALL_LIBDIR}/qml
|
|
21
|
+
CACHE STRING
|
|
22
|
+
"Install subpath (defaults to lib/qml)"
|
|
23
|
+
)
|
|
20
24
|
endif()
|
|
21
25
|
|
|
22
26
|
find_package(Qt6 REQUIRED COMPONENTS Quick Svg)
|
|
@@ -1,78 +1,81 @@
|
|
|
1
|
-
Metadata-Version: 2.1
|
|
2
|
-
Name: QuickGraphLib
|
|
3
|
-
Version: 0.1.
|
|
4
|
-
Summary: A scientific graphing library for QtQuick
|
|
5
|
-
Author-
|
|
6
|
-
License: MIT License
|
|
7
|
-
|
|
8
|
-
Copyright (c) 2024 Refeyn Ltd and other QuickGraphLib contributors
|
|
9
|
-
|
|
10
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
-
in the Software without restriction, including without limitation the rights
|
|
13
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
-
furnished to do so, subject to the following conditions:
|
|
16
|
-
|
|
17
|
-
The above copyright notice and this permission notice shall be included in all
|
|
18
|
-
copies or substantial portions of the Software.
|
|
19
|
-
|
|
20
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
-
SOFTWARE.
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
Classifier:
|
|
32
|
-
Classifier:
|
|
33
|
-
Classifier:
|
|
34
|
-
Classifier:
|
|
35
|
-
Classifier:
|
|
36
|
-
Classifier:
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
Requires-Dist:
|
|
44
|
-
Requires-Dist:
|
|
45
|
-
|
|
46
|
-
Requires-Dist:
|
|
47
|
-
Requires-Dist:
|
|
48
|
-
Requires-Dist:
|
|
49
|
-
Requires-Dist:
|
|
50
|
-
Requires-Dist:
|
|
51
|
-
Requires-Dist:
|
|
52
|
-
Requires-Dist:
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
-
|
|
68
|
-
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
1
|
+
Metadata-Version: 2.1
|
|
2
|
+
Name: QuickGraphLib
|
|
3
|
+
Version: 0.1.0a8
|
|
4
|
+
Summary: A scientific graphing library for QtQuick
|
|
5
|
+
Author-Email: Matthew Joyce <matthew.joyce@refeyn.com>
|
|
6
|
+
License: MIT License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2024 Refeyn Ltd and other QuickGraphLib contributors
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
+
SOFTWARE.
|
|
27
|
+
Classifier: Development Status :: 3 - Alpha
|
|
28
|
+
Classifier: Environment :: X11 Applications :: Qt
|
|
29
|
+
Classifier: Intended Audience :: Science/Research
|
|
30
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
31
|
+
Classifier: Operating System :: OS Independent
|
|
32
|
+
Classifier: Programming Language :: Python
|
|
33
|
+
Classifier: Topic :: Multimedia :: Graphics :: Presentation
|
|
34
|
+
Classifier: Topic :: Scientific/Engineering :: Visualization
|
|
35
|
+
Classifier: Topic :: Software Development :: User Interfaces
|
|
36
|
+
Classifier: Typing :: Typed
|
|
37
|
+
Project-URL: Homepage, https://github.com/refeyn/QuickGraphLib
|
|
38
|
+
Project-URL: Issues, https://github.com/refeyn/QuickGraphLib/issues
|
|
39
|
+
Project-URL: Documentation, https://refeyn.github.io/QuickGraphLib
|
|
40
|
+
Project-URL: Source, https://github.com/refeyn/QuickGraphLib
|
|
41
|
+
Requires-Dist: PySide6
|
|
42
|
+
Requires-Dist: contourpy
|
|
43
|
+
Requires-Dist: black; extra == "analyse"
|
|
44
|
+
Requires-Dist: pylint; extra == "analyse"
|
|
45
|
+
Requires-Dist: mypy; extra == "analyse"
|
|
46
|
+
Requires-Dist: pre-commit; extra == "analyse"
|
|
47
|
+
Requires-Dist: lxml; extra == "analyse"
|
|
48
|
+
Requires-Dist: pytest; extra == "analyse"
|
|
49
|
+
Requires-Dist: pytest-cov; extra == "analyse"
|
|
50
|
+
Requires-Dist: scikit-build-core; extra == "analyse"
|
|
51
|
+
Requires-Dist: shiboken6_generator==6.5.3; extra == "analyse"
|
|
52
|
+
Requires-Dist: PySide6==6.5.3; extra == "analyse"
|
|
53
|
+
Requires-Dist: setuptools_scm; extra == "analyse"
|
|
54
|
+
Provides-Extra: analyse
|
|
55
|
+
Description-Content-Type: text/markdown
|
|
56
|
+
|
|
57
|
+
# QuickGraphLib
|
|
58
|
+
|
|
59
|
+
A scientific graphing library for [QtQuick](https://doc.qt.io/qt-6/qtquick-index.html) using Qt6.
|
|
60
|
+
|
|
61
|
+
Links:
|
|
62
|
+
- [Online documentation](https://refeyn.github.io/QuickGraphLib)
|
|
63
|
+
- [PyPI page](https://pypi.org/project/QuickGraphLib/)
|
|
64
|
+
|
|
65
|
+
Key advantages:
|
|
66
|
+
|
|
67
|
+
- Written in C++ and QML (with some optional Python helpers), so it can be used in both C++ and Python projects
|
|
68
|
+
- QtQuick's hardware-based rendering makes this library render very fast
|
|
69
|
+
- Support for line graphs, histograms, contour plots and more
|
|
70
|
+
- Interactivity supported natively though declarative bindings and QtQuick
|
|
71
|
+
- Support for PNG and SVG export
|
|
72
|
+
|
|
73
|
+
## Examples
|
|
74
|
+
|
|
75
|
+
The example gallery can be run using (provided the Python environment has [PySide6](https://pypi.org/project/PySide6/) and [contourpy](https://pypi.org/project/contourpy/) installed):
|
|
76
|
+
|
|
77
|
+
```bash
|
|
78
|
+
python examples\gallery.py
|
|
79
|
+
```
|
|
80
|
+
|
|
81
|
+
<p align="center"><img src="https://github.com/refeyn/QuickGraphLib/assets/103422031/56fdff62-ef77-4184-9f43-59a76b92d728" width="80%"></p>
|
|
@@ -16,12 +16,13 @@ Item {
|
|
|
16
16
|
id: root
|
|
17
17
|
|
|
18
18
|
/*!
|
|
19
|
-
Whether MSAA antialiasing is enabled.
|
|
19
|
+
Whether MSAA antialiasing is enabled. This can help with rendering when the target display has a
|
|
20
|
+
fractional scaling factor. It can also make rendering worse, especially with text.
|
|
20
21
|
*/
|
|
21
22
|
property alias antialiasingEnabled: root.layer.enabled
|
|
22
23
|
|
|
23
24
|
implicitHeight: 100
|
|
24
25
|
implicitWidth: 100
|
|
25
|
-
layer.enabled:
|
|
26
|
+
layer.enabled: false //
|
|
26
27
|
layer.samples: 2
|
|
27
28
|
}
|
|
@@ -65,7 +65,7 @@ Item {
|
|
|
65
65
|
*/
|
|
66
66
|
property bool showTickLabels: true
|
|
67
67
|
/*!
|
|
68
|
-
Spacing between the
|
|
68
|
+
Spacing between the axis label and the tick labels.
|
|
69
69
|
*/
|
|
70
70
|
property double spacing: 4
|
|
71
71
|
/*!
|
|
@@ -83,10 +83,10 @@ Item {
|
|
|
83
83
|
it is recommended that \l TickLabel or a subclass is used.
|
|
84
84
|
*/
|
|
85
85
|
property Component tickDelegate: TickLabel {
|
|
86
|
-
color: root.
|
|
86
|
+
color: root.tickLabelColor
|
|
87
87
|
decimalPoints: root.decimalPoints
|
|
88
88
|
direction: root.direction
|
|
89
|
-
font: root.
|
|
89
|
+
font: root.tickLabelFont
|
|
90
90
|
}
|
|
91
91
|
/*!
|
|
92
92
|
The color of the tick labels.
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: Copyright (c) 2024 Refeyn Ltd and other QuickGraphLib contributors
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
|
|
4
|
+
set(QGL_QML_FILES
|
|
5
|
+
AntialiasingContainer.qml
|
|
6
|
+
Axis.qml
|
|
7
|
+
GraphArea.qml
|
|
8
|
+
ScalingContainer.qml
|
|
9
|
+
ZoomPanHandler.qml
|
|
10
|
+
TickLabel.qml
|
|
11
|
+
ShapeRepeater.qml
|
|
12
|
+
)
|
|
13
|
+
|
|
14
|
+
add_library(QuickGraphLibPlugin SHARED Plugin.cpp)
|
|
15
|
+
target_link_libraries(QuickGraphLibPlugin PRIVATE Qt6::Gui)
|
|
16
|
+
qt_add_qml_module(QuickGraphLib
|
|
17
|
+
URI QuickGraphLib
|
|
18
|
+
SHARED
|
|
19
|
+
VERSION 1.0
|
|
20
|
+
QML_FILES ${QGL_QML_FILES}
|
|
21
|
+
PLUGIN_TARGET QuickGraphLibPlugin
|
|
22
|
+
NO_GENERATE_PLUGIN_SOURCE
|
|
23
|
+
NO_PLUGIN_OPTIONAL
|
|
24
|
+
DEPENDENCIES QtQuick
|
|
25
|
+
SOURCES
|
|
26
|
+
helpers/Helpers.cpp helpers/Helpers.hpp helpers/AxisHelper.hpp helpers/AxisHelper.cpp helpers/Foreign.hpp
|
|
27
|
+
ImageView.hpp ImageView.cpp ColorMaps.hpp ColorMaps.cpp DataTypes.hpp DataTypes.cpp bindings/Bindings.hpp QuickGraphLib.hpp
|
|
28
|
+
)
|
|
29
|
+
set_property(
|
|
30
|
+
TARGET QuickGraphLib
|
|
31
|
+
PROPERTY LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
32
|
+
)
|
|
33
|
+
set_property(
|
|
34
|
+
TARGET QuickGraphLib
|
|
35
|
+
PROPERTY RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
target_compile_definitions(
|
|
39
|
+
QuickGraphLib
|
|
40
|
+
PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>
|
|
41
|
+
)
|
|
42
|
+
target_link_libraries(QuickGraphLib PRIVATE Qt6::Quick Qt6::Svg)
|
|
43
|
+
target_include_directories(
|
|
44
|
+
QuickGraphLib
|
|
45
|
+
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/helpers
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
set(QGL_PYTHON_FILES
|
|
49
|
+
__init__.py
|
|
50
|
+
consts.py
|
|
51
|
+
contours.py
|
|
52
|
+
py.typed
|
|
53
|
+
_version.py
|
|
54
|
+
)
|
|
55
|
+
foreach(PYTHON_FILE ${QGL_PYTHON_FILES})
|
|
56
|
+
add_custom_command(
|
|
57
|
+
OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${PYTHON_FILE}
|
|
58
|
+
COMMAND
|
|
59
|
+
${CMAKE_COMMAND} -E copy ${CMAKE_CURRENT_SOURCE_DIR}/${PYTHON_FILE}
|
|
60
|
+
${CMAKE_CURRENT_BINARY_DIR}/${PYTHON_FILE}
|
|
61
|
+
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${PYTHON_FILE}
|
|
62
|
+
)
|
|
63
|
+
endforeach()
|
|
64
|
+
list(TRANSFORM QGL_PYTHON_FILES PREPEND "${CMAKE_CURRENT_BINARY_DIR}/")
|
|
65
|
+
add_custom_target(QuickGraphLibPythonFiles ALL DEPENDS ${QGL_PYTHON_FILES})
|
|
66
|
+
|
|
67
|
+
install(
|
|
68
|
+
TARGETS QuickGraphLib
|
|
69
|
+
RUNTIME DESTINATION ${INSTALL_SUBPATH}/QuickGraphLib
|
|
70
|
+
LIBRARY DESTINATION ${INSTALL_SUBPATH}/QuickGraphLib
|
|
71
|
+
)
|
|
72
|
+
install(
|
|
73
|
+
TARGETS QuickGraphLibPlugin
|
|
74
|
+
RUNTIME DESTINATION ${INSTALL_SUBPATH}/QuickGraphLib
|
|
75
|
+
LIBRARY DESTINATION ${INSTALL_SUBPATH}/QuickGraphLib
|
|
76
|
+
)
|
|
77
|
+
install(FILES ${QGL_QML_FILES} DESTINATION ${INSTALL_SUBPATH}/QuickGraphLib)
|
|
78
|
+
install(
|
|
79
|
+
FILES
|
|
80
|
+
${CMAKE_CURRENT_BINARY_DIR}/qmldir
|
|
81
|
+
${CMAKE_CURRENT_BINARY_DIR}/QuickGraphLib.qmltypes
|
|
82
|
+
DESTINATION ${INSTALL_SUBPATH}/QuickGraphLib
|
|
83
|
+
)
|
|
84
|
+
install(FILES ${QGL_PYTHON_FILES} DESTINATION ${INSTALL_SUBPATH}/QuickGraphLib)
|
|
85
|
+
|
|
86
|
+
add_subdirectory(PreFabs)
|
|
87
|
+
add_subdirectory(GraphItems)
|
|
88
|
+
add_subdirectory(bindings)
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Copyright (c) 2024 Refeyn Ltd and other QuickGraphLib contributors
|
|
2
|
+
// QuickGraphLib contributors SPDX-License-Identifier: MIT
|
|
3
|
+
|
|
4
|
+
#include "DataTypes.hpp"
|
|
5
|
+
|
|
6
|
+
#include <QMetaType>
|
|
7
|
+
#include <QVariant>
|
|
8
|
+
|
|
9
|
+
/*!
|
|
10
|
+
\class QGLPolygonF
|
|
11
|
+
\inmodule QuickGraphLib
|
|
12
|
+
\inheaderfile QuickGraphLib
|
|
13
|
+
|
|
14
|
+
\brief A subclass of QPolygonF with better QML compatibility.
|
|
15
|
+
|
|
16
|
+
\reentrant
|
|
17
|
+
|
|
18
|
+
\ingroup painting
|
|
19
|
+
\ingroup shared
|
|
20
|
+
|
|
21
|
+
The QGLPolygonF class is \l {Implicit Data Sharing}{implicitly shared}.
|
|
22
|
+
|
|
23
|
+
\section1 Additional Python functionality
|
|
24
|
+
|
|
25
|
+
There is an additional staticmethod \c {QGLPolygonF.fromNDArray} which will convert an Nx2 ndarray into a
|
|
26
|
+
\l QGLPolygonF efficiently.
|
|
27
|
+
|
|
28
|
+
\sa QPolygonF
|
|
29
|
+
*/
|
|
30
|
+
|
|
31
|
+
/*!
|
|
32
|
+
Returns the polygon as a QVariant
|
|
33
|
+
*/
|
|
34
|
+
QGLPolygonF::operator QVariant() const { return QVariant::fromValue(*this); }
|
|
35
|
+
|
|
36
|
+
/*!
|
|
37
|
+
\class QGLDoubleList
|
|
38
|
+
\inmodule QuickGraphLib
|
|
39
|
+
\inheaderfile QuickGraphLib
|
|
40
|
+
|
|
41
|
+
\brief A subclass of QList<qreal> with better QML compatibility.
|
|
42
|
+
|
|
43
|
+
\reentrant
|
|
44
|
+
|
|
45
|
+
\ingroup shared
|
|
46
|
+
|
|
47
|
+
The QGLDoubleList class is \l {Implicit Data Sharing}{implicitly shared}.
|
|
48
|
+
|
|
49
|
+
\section1 Additional Python functionality
|
|
50
|
+
|
|
51
|
+
There is an additional staticmethod \c {QGLDoubleList.fromNDArray} which will convert a 1D ndarray into a
|
|
52
|
+
\l QGLDoubleList efficiently.
|
|
53
|
+
|
|
54
|
+
\sa QList
|
|
55
|
+
*/
|
|
56
|
+
|
|
57
|
+
/*!
|
|
58
|
+
\fn QGLDoubleList::operator QVariant() const
|
|
59
|
+
Returns the list as a QVariant
|
|
60
|
+
*/
|
|
61
|
+
QGLDoubleList::operator QVariant() const { return QVariant::fromValue(*this); }
|
|
62
|
+
|
|
63
|
+
void registerConvertions() {
|
|
64
|
+
QMetaType::registerConverter<QGLPolygonF, QPolygonF>();
|
|
65
|
+
QMetaType::registerConverter<QPolygonF, QGLPolygonF>();
|
|
66
|
+
QMetaType::registerConverter<QGLDoubleList, QList<qreal>>();
|
|
67
|
+
QMetaType::registerConverter<QList<qreal>, QGLDoubleList>();
|
|
68
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: Copyright (c) 2024 Refeyn Ltd and other QuickGraphLib contributors
|
|
2
|
+
// SPDX-License-Identifier: MIT
|
|
3
|
+
|
|
4
|
+
#pragma once
|
|
5
|
+
|
|
6
|
+
#include <QList>
|
|
7
|
+
#include <QPolygonF>
|
|
8
|
+
|
|
9
|
+
class QGLPolygonF : public QPolygonF {
|
|
10
|
+
public:
|
|
11
|
+
using QPolygonF::QPolygonF;
|
|
12
|
+
QGLPolygonF() = default;
|
|
13
|
+
QGLPolygonF(const QList<QPointF> &v) : QPolygonF(v) {}
|
|
14
|
+
QGLPolygonF(const QPolygonF &v) : QPolygonF(v) {}
|
|
15
|
+
QGLPolygonF(QList<QPointF> &&v) noexcept : QPolygonF(std::move(v)) {}
|
|
16
|
+
QGLPolygonF(QPolygonF &&v) noexcept : QPolygonF(std::move(v)) {}
|
|
17
|
+
inline void swap(QGLPolygonF &other) { QPolygonF::swap(other); }
|
|
18
|
+
Q_DECL_EXPORT operator QVariant() const;
|
|
19
|
+
};
|
|
20
|
+
Q_DECLARE_SHARED(QGLPolygonF)
|
|
21
|
+
|
|
22
|
+
class QGLDoubleList : public QList<qreal> {
|
|
23
|
+
public:
|
|
24
|
+
using QList<qreal>::QList;
|
|
25
|
+
QGLDoubleList() = default;
|
|
26
|
+
QGLDoubleList(const QList<qreal> &v) : QList<qreal>(v) {}
|
|
27
|
+
QGLDoubleList(QList<qreal> &&v) noexcept : QList<qreal>(std::move(v)) {}
|
|
28
|
+
inline void swap(QGLDoubleList &other) { QList<qreal>::swap(other); }
|
|
29
|
+
Q_DECL_EXPORT operator QVariant() const;
|
|
30
|
+
};
|
|
31
|
+
Q_DECLARE_SHARED(QGLDoubleList)
|
|
32
|
+
|
|
33
|
+
Q_DECL_EXPORT void registerConvertions();
|
|
@@ -45,9 +45,16 @@ QQS.Shape {
|
|
|
45
45
|
required property rect viewRect
|
|
46
46
|
/*!
|
|
47
47
|
An additional transform that can be used to zoom/translate the graph area without affecting the original view rect.
|
|
48
|
+
|
|
49
|
+
\sa ZoomPanHandler::viewTransform, viewTransformFromRect
|
|
48
50
|
*/
|
|
49
51
|
property matrix4x4 viewTransform
|
|
50
52
|
|
|
53
|
+
/*!
|
|
54
|
+
Convert a view rect \a r into a base transform suitable for use with a ZoomPanHandler.
|
|
55
|
+
|
|
56
|
+
\sa ZoomPanHandler::baseTransform
|
|
57
|
+
*/
|
|
51
58
|
function baseTransformFromRect(r: rect): matrix4x4 {
|
|
52
59
|
let mat = Qt.matrix4x4();
|
|
53
60
|
mat.scale(viewRect.width / r.width, viewRect.height / r.height, 1);
|
|
@@ -55,6 +62,20 @@ QQS.Shape {
|
|
|
55
62
|
return mat;
|
|
56
63
|
}
|
|
57
64
|
|
|
65
|
+
/*!
|
|
66
|
+
Convert a base transform \a baseTransform into a view transform suitable for \l viewTransform.
|
|
67
|
+
*/
|
|
68
|
+
function viewTransformFromBaseTransform(baseTransform: matrix4x4): matrix4x4 {
|
|
69
|
+
return Qt.matrix4x4(baseTransform.m11, baseTransform.m12, baseTransform.m13, baseTransform.m14 * width, baseTransform.m21, baseTransform.m22, baseTransform.m23, baseTransform.m24 * height, baseTransform.m31, baseTransform.m32, baseTransform.m33, baseTransform.m34, baseTransform.m41, baseTransform.m42, baseTransform.m43, baseTransform.m44);
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
/*!
|
|
73
|
+
Convert a view rect \a r into a view transform suitable for \l viewTransform.
|
|
74
|
+
*/
|
|
75
|
+
function viewTransformFromRect(r: rect): matrix4x4 {
|
|
76
|
+
return viewTransformFromBaseTransform(baseTransformFromRect(r));
|
|
77
|
+
}
|
|
78
|
+
|
|
58
79
|
clip: true
|
|
59
80
|
implicitHeight: 100
|
|
60
81
|
implicitWidth: 100
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
# SPDX-FileCopyrightText: Copyright (c) 2024 Refeyn Ltd and other QuickGraphLib contributors
|
|
2
|
+
# SPDX-License-Identifier: MIT
|
|
3
|
+
|
|
4
|
+
set(QGL_GI_QML_FILES
|
|
5
|
+
AxHLine.qml
|
|
6
|
+
AxVLine.qml
|
|
7
|
+
BasicLegend.qml
|
|
8
|
+
GraphItemDragHandler.qml
|
|
9
|
+
Histogram.qml
|
|
10
|
+
Marker.qml
|
|
11
|
+
AxHSpan.qml
|
|
12
|
+
AxVSpan.qml
|
|
13
|
+
BasicLegendItem.qml
|
|
14
|
+
Contour.qml
|
|
15
|
+
Grid.qml
|
|
16
|
+
Line.qml
|
|
17
|
+
ColorMesh.qml
|
|
18
|
+
)
|
|
19
|
+
qt_add_qml_module(QuickGraphLibGraphItems
|
|
20
|
+
URI QuickGraphLib.GraphItems
|
|
21
|
+
SHARED
|
|
22
|
+
VERSION 1.0
|
|
23
|
+
QML_FILES ${QGL_GI_QML_FILES}
|
|
24
|
+
SOURCES helpers/HistogramHelper.cpp helpers/HistogramHelper.hpp helpers/GridHelper.hpp helpers/GridHelper.cpp
|
|
25
|
+
PLUGIN_TARGET QuickGraphLibGraphItems
|
|
26
|
+
DEPENDENCIES QtQuick QuickGraphLib
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
target_compile_definitions(
|
|
30
|
+
QuickGraphLibGraphItems
|
|
31
|
+
PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>
|
|
32
|
+
)
|
|
33
|
+
target_link_libraries(QuickGraphLibGraphItems PRIVATE Qt6::Quick)
|
|
34
|
+
target_include_directories(
|
|
35
|
+
QuickGraphLibGraphItems
|
|
36
|
+
PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/helpers
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
install(
|
|
40
|
+
TARGETS
|
|
41
|
+
QuickGraphLibGraphItems
|
|
42
|
+
DESTINATION
|
|
43
|
+
${INSTALL_SUBPATH}/QuickGraphLib/GraphItems
|
|
44
|
+
)
|
|
45
|
+
install(
|
|
46
|
+
FILES ${QGL_GI_QML_FILES}
|
|
47
|
+
DESTINATION ${INSTALL_SUBPATH}/QuickGraphLib/GraphItems
|
|
48
|
+
)
|
|
49
|
+
install(
|
|
50
|
+
FILES
|
|
51
|
+
${CMAKE_CURRENT_BINARY_DIR}/qmldir
|
|
52
|
+
${CMAKE_CURRENT_BINARY_DIR}/QuickGraphLibGraphItems.qmltypes
|
|
53
|
+
DESTINATION ${INSTALL_SUBPATH}/QuickGraphLib/GraphItems
|
|
54
|
+
)
|
|
@@ -35,11 +35,6 @@ QQS.ShapePath {
|
|
|
35
35
|
Must be assigned the data transform of the graph area this axis is paired to.
|
|
36
36
|
|
|
37
37
|
\sa GraphArea::dataTransform
|
|
38
|
-
|
|
39
|
-
\qmlproperty list<point> Line::path
|
|
40
|
-
\omit
|
|
41
|
-
QDoc seems to read list<x> as x, so override the type of path here.
|
|
42
|
-
\endomit
|
|
43
38
|
*/
|
|
44
39
|
|
|
45
40
|
required property matrix4x4 dataTransform
|
|
@@ -47,7 +42,7 @@ QQS.ShapePath {
|
|
|
47
42
|
/*!
|
|
48
43
|
Points to graph. Each point is a \l point (containing x and y coordinates) in the data space.
|
|
49
44
|
*/
|
|
50
|
-
required property
|
|
45
|
+
required property var path
|
|
51
46
|
|
|
52
47
|
capStyle: QQS.ShapePath.RoundCap
|
|
53
48
|
fillColor: "transparent"
|