QuickGraphLib 0.1.0a20__cp310-abi3-win_amd64.whl

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.
Files changed (100) hide show
  1. QuickGraphLib/AntialiasingContainer.qml +37 -0
  2. QuickGraphLib/Axis.qml +264 -0
  3. QuickGraphLib/CMakeLists.txt +117 -0
  4. QuickGraphLib/ColorMaps.cpp +632 -0
  5. QuickGraphLib/ColorMaps.hpp +22 -0
  6. QuickGraphLib/DataTypes.cpp +68 -0
  7. QuickGraphLib/DataTypes.hpp +35 -0
  8. QuickGraphLib/Global.hpp +12 -0
  9. QuickGraphLib/GraphArea.qml +97 -0
  10. QuickGraphLib/GraphItems/AxHLine.qml +47 -0
  11. QuickGraphLib/GraphItems/AxHSpan.qml +61 -0
  12. QuickGraphLib/GraphItems/AxVLine.qml +47 -0
  13. QuickGraphLib/GraphItems/AxVSpan.qml +61 -0
  14. QuickGraphLib/GraphItems/BarHorizontal.qml +51 -0
  15. QuickGraphLib/GraphItems/BarVertical.qml +51 -0
  16. QuickGraphLib/GraphItems/BaseHandles.qml +76 -0
  17. QuickGraphLib/GraphItems/BasicLegend.qml +39 -0
  18. QuickGraphLib/GraphItems/BasicLegendItem.qml +81 -0
  19. QuickGraphLib/GraphItems/BoxPlotHorizontal.qml +82 -0
  20. QuickGraphLib/GraphItems/BoxPlotVertical.qml +82 -0
  21. QuickGraphLib/GraphItems/CMakeLists.txt +68 -0
  22. QuickGraphLib/GraphItems/ColorMesh.qml +39 -0
  23. QuickGraphLib/GraphItems/Contour.qml +42 -0
  24. QuickGraphLib/GraphItems/Ellipse.qml +59 -0
  25. QuickGraphLib/GraphItems/EllipseHandles.qml +340 -0
  26. QuickGraphLib/GraphItems/GraphHandle.qml +166 -0
  27. QuickGraphLib/GraphItems/GraphItemDragHandler.qml +50 -0
  28. QuickGraphLib/GraphItems/Grid.qml +57 -0
  29. QuickGraphLib/GraphItems/Histogram.qml +56 -0
  30. QuickGraphLib/GraphItems/Line.qml +44 -0
  31. QuickGraphLib/GraphItems/LineSegment.qml +44 -0
  32. QuickGraphLib/GraphItems/LineSegmentHandles.qml +252 -0
  33. QuickGraphLib/GraphItems/Marker.qml +38 -0
  34. QuickGraphLib/GraphItems/Polygon.qml +48 -0
  35. QuickGraphLib/GraphItems/PolygonHandles.qml +171 -0
  36. QuickGraphLib/GraphItems/Polyline.qml +41 -0
  37. QuickGraphLib/GraphItems/PolylineHandles.qml +170 -0
  38. QuickGraphLib/GraphItems/QuickGraphLibGraphItems.dll +0 -0
  39. QuickGraphLib/GraphItems/QuickGraphLibGraphItems.qmltypes +149 -0
  40. QuickGraphLib/GraphItems/Rectangle.qml +64 -0
  41. QuickGraphLib/GraphItems/RectangleHandles.qml +316 -0
  42. QuickGraphLib/GraphItems/helpers/GridHelper.cpp +26 -0
  43. QuickGraphLib/GraphItems/helpers/GridHelper.hpp +61 -0
  44. QuickGraphLib/GraphItems/helpers/HistogramHelper.cpp +45 -0
  45. QuickGraphLib/GraphItems/helpers/HistogramHelper.hpp +62 -0
  46. QuickGraphLib/GraphItems/qmldir +38 -0
  47. QuickGraphLib/ImageView.cpp +557 -0
  48. QuickGraphLib/ImageView.hpp +140 -0
  49. QuickGraphLib/Plugin.cpp +23 -0
  50. QuickGraphLib/PreFabs/CMakeLists.txt +32 -0
  51. QuickGraphLib/PreFabs/ImageAxes.qml +201 -0
  52. QuickGraphLib/PreFabs/QuickGraphLibPreFabs.dll +0 -0
  53. QuickGraphLib/PreFabs/QuickGraphLibPreFabs.qmltypes +8 -0
  54. QuickGraphLib/PreFabs/XYAxes.qml +195 -0
  55. QuickGraphLib/PreFabs/qmldir +10 -0
  56. QuickGraphLib/QuickGraphLib.dll +0 -0
  57. QuickGraphLib/QuickGraphLib.hpp +7 -0
  58. QuickGraphLib/QuickGraphLib.qmltypes +1103 -0
  59. QuickGraphLib/QuickGraphLibPlugin.dll +0 -0
  60. QuickGraphLib/ScalingContainer.qml +48 -0
  61. QuickGraphLib/ShapeRepeater.qml +43 -0
  62. QuickGraphLib/TickLabel.qml +65 -0
  63. QuickGraphLib/ZoomPanHandler.qml +110 -0
  64. QuickGraphLib/_QuickGraphLib.pyd +0 -0
  65. QuickGraphLib/_QuickGraphLib.pyi +162 -0
  66. QuickGraphLib/__init__.py +31 -0
  67. QuickGraphLib/_version.py +24 -0
  68. QuickGraphLib/bindings/Bindings.hpp +7 -0
  69. QuickGraphLib/bindings/Bindings.xml +35 -0
  70. QuickGraphLib/bindings/CMakeLists.txt +75 -0
  71. QuickGraphLib/bindings/ShibokenHelpers.cpp +97 -0
  72. QuickGraphLib/bindings/ShibokenHelpers.hpp +13 -0
  73. QuickGraphLib/bindings/glue/DataTypes.cpp +12 -0
  74. QuickGraphLib/bindings/pyigen.py +44 -0
  75. QuickGraphLib/consts.py +6 -0
  76. QuickGraphLib/contours.py +85 -0
  77. QuickGraphLib/doc/AxesGridLayout.drawio +49 -0
  78. QuickGraphLib/doc/AxesGridLayout.svg +3 -0
  79. QuickGraphLib/doc/export.qdoc +49 -0
  80. QuickGraphLib/doc/graphitems.qdoc +21 -0
  81. QuickGraphLib/doc/graphstructure.qdoc +221 -0
  82. QuickGraphLib/doc/index.qdoc +59 -0
  83. QuickGraphLib/doc/interaction.qdoc +43 -0
  84. QuickGraphLib/doc/module-cpp.qdoc +40 -0
  85. QuickGraphLib/doc/module.qdoc +29 -0
  86. QuickGraphLib/doc/prefabs.qdoc +21 -0
  87. QuickGraphLib/doc/python_helpers.qdoc +48 -0
  88. QuickGraphLib/helpers/AxisHelper.cpp +152 -0
  89. QuickGraphLib/helpers/AxisHelper.hpp +111 -0
  90. QuickGraphLib/helpers/Foreign.hpp +30 -0
  91. QuickGraphLib/helpers/Helpers.cpp +991 -0
  92. QuickGraphLib/helpers/Helpers.hpp +42 -0
  93. QuickGraphLib/helpers/ShapeRepeaterHelper.cpp +72 -0
  94. QuickGraphLib/helpers/ShapeRepeaterHelper.hpp +17 -0
  95. QuickGraphLib/py.typed +0 -0
  96. QuickGraphLib/qmldir +15 -0
  97. quickgraphlib-0.1.0a20.dist-info/METADATA +91 -0
  98. quickgraphlib-0.1.0a20.dist-info/RECORD +100 -0
  99. quickgraphlib-0.1.0a20.dist-info/WHEEL +5 -0
  100. quickgraphlib-0.1.0a20.dist-info/licenses/LICENCE +21 -0
@@ -0,0 +1,37 @@
1
+ // SPDX-FileCopyrightText: Copyright (c) 2024 Refeyn Ltd and other QuickGraphLib contributors
2
+ // SPDX-License-Identifier: MIT
3
+
4
+ import QtQuick
5
+
6
+ @Deprecated {
7
+ reason: "Due to the new Qt 6.7 Curve renderer, this is no longer needed for antialiasing"
8
+ }
9
+
10
+ /*!
11
+ \qmltype AntialiasingContainer
12
+ \inqmlmodule QuickGraphLib
13
+ \inherits Item
14
+ \brief Enables antialiasing for it's contents.
15
+
16
+ This item turns on \l {Multisample Antialiasing}. This helps with rendering in some cases.
17
+
18
+ \deprecated [0.1.0a10] Due to the new Qt 6.7 Curve renderer, this is no longer needed for antialiasing.
19
+ Replace with \l Item or remove completely
20
+ */
21
+
22
+ Item {
23
+ id: root
24
+
25
+ /*!
26
+ Whether MSAA antialiasing is enabled. This can help with rendering when the target display has a
27
+ fractional scaling factor. It can also make rendering worse, especially with text.
28
+
29
+ \default false
30
+ */
31
+ property alias antialiasingEnabled: root.layer.enabled
32
+
33
+ implicitHeight: 100
34
+ implicitWidth: 100
35
+ layer.enabled: false
36
+ layer.samples: 2
37
+ }
QuickGraphLib/Axis.qml ADDED
@@ -0,0 +1,264 @@
1
+ // SPDX-FileCopyrightText: Copyright (c) 2024 Refeyn Ltd and other QuickGraphLib contributors
2
+ // SPDX-License-Identifier: MIT
3
+
4
+ pragma ComponentBehavior: Bound
5
+ import QtQuick
6
+ import QtQuick.Shapes as QQS
7
+ import QuickGraphLib as QuickGraphLib
8
+
9
+ /*!
10
+ \qmltype Axis
11
+ \inqmlmodule QuickGraphLib
12
+ \inherits Item
13
+ \brief Displays an Axis.
14
+
15
+ \sa {Basic sin graph (without prefabs)}, {Graph with all four axes}
16
+
17
+ \section2 Antialiasing
18
+
19
+ By default, the axis sets \l {preferredRendererType} to \c {Shape.CurveRenderer}.
20
+ This turns on high-quality antialiasing, which results in better looking axes on HiDPI systems.
21
+ However, if you know your application will only be viewed on LoDPI systems, the axes will look
22
+ slightly better without antialiasing. In addition, antialiasing may require more GPU performance,
23
+ so switching this back to \c {Shape.GeometryRenderer} may help on low-power systems. See
24
+ \l {Shape::rendererType} for more details.
25
+ */
26
+
27
+ Item {
28
+ id: root
29
+
30
+ enum Direction {
31
+ Left,
32
+ Right,
33
+ Top,
34
+ Bottom
35
+ }
36
+
37
+ /*!
38
+ Must be assigned the data transform of the graph area this axis is paired to.
39
+
40
+ \sa GraphArea::dataTransform
41
+ */
42
+ property alias dataTransform: helper.dataTransform
43
+ /*!
44
+ Number of decimal points the ticks should show.
45
+
46
+ \sa TickLabel::decimalPoints
47
+
48
+ \default 2
49
+ */
50
+ property int decimalPoints: 2
51
+ /*!
52
+ The side of the graph the Axis is on. It can take one of the following values:
53
+
54
+ \value Axis.Direction.Left Axis to the left of the GraphArea
55
+ \value Axis.Direction.Right Axis to the right of the GraphArea
56
+ \value Axis.Direction.Top Axis above of the GraphArea
57
+ \value Axis.Direction.Bottom Axis below of the GraphArea
58
+
59
+ \default Axis.Direction.Left
60
+ */
61
+ property alias direction: helper.direction
62
+ /*!
63
+ The label text for this axis. Alias of \c labelItem.text.
64
+ */
65
+ property alias label: labelText.text
66
+ /*!
67
+ The color of the label. Alias of \c labelItem.color.
68
+ */
69
+ property alias labelColor: labelText.color
70
+ /*!
71
+ The font of the label. Alias of \c labelItem.font.
72
+ */
73
+ property alias labelFont: labelText.font
74
+ /*!
75
+ The axis label (a \l Text).
76
+ */
77
+ property alias labelItem: labelText
78
+ /*!
79
+ The preferred renderer type for rendering the spine and ticks.
80
+
81
+ \sa Shape::preferredRendererType
82
+
83
+ \default Shape.CurveRenderer
84
+ */
85
+ property alias preferredRendererType: shape.preferredRendererType
86
+ /*!
87
+ Whether to show a label for each tick.
88
+
89
+ \default true
90
+ */
91
+ property bool showTickLabels: true
92
+ /*!
93
+ Spacing between the axis label and the tick labels.
94
+
95
+ \default 4
96
+ */
97
+ property double spacing: 4
98
+ /*!
99
+ Color of the axis spine and ticks.
100
+
101
+ \default "black"
102
+ */
103
+ property alias strokeColor: myPath.strokeColor
104
+ /*!
105
+ Width of the axis spine and ticks.
106
+
107
+ \default 1
108
+ */
109
+ property alias strokeWidth: myPath.strokeWidth
110
+ /*!
111
+ The component used for rendering tick labels. If overridden,
112
+ the \c color, \c decimalPoints, \c direction, and \c font properties
113
+ of the component should be set explicitly. To get proper positioning,
114
+ it is recommended that \l TickLabel or a subclass is used.
115
+ */
116
+ property Component tickDelegate: TickLabel {
117
+ color: root.tickLabelColor
118
+ decimalPoints: root.decimalPoints
119
+ direction: root.direction
120
+ font: root.tickLabelFont
121
+ }
122
+ /*!
123
+ The color of the tick labels.
124
+
125
+ \default labelColor
126
+ */
127
+ property color tickLabelColor: labelColor
128
+ /*!
129
+ The font of the tick labels.
130
+
131
+ \default labelFont
132
+ */
133
+ property font tickLabelFont: labelFont
134
+ /*!
135
+ The length of each tick.
136
+
137
+ \default 10
138
+ */
139
+ property alias tickLength: helper.tickLength
140
+ /*!
141
+ The position of each tick. This should be a list of doubles in data coordinates.
142
+
143
+ \sa Helpers::range, Helpers::linspace, Grid::xTicks, Grid::yTicks
144
+ */
145
+ property alias ticks: helper.ticks
146
+
147
+ implicitHeight: {
148
+ switch (root.direction) {
149
+ case Axis.Direction.Left:
150
+ case Axis.Direction.Right:
151
+ return 100;
152
+ case Axis.Direction.Top:
153
+ case Axis.Direction.Bottom:
154
+ let height = 0;
155
+ if (ticks.length > 0) {
156
+ // Can't use childrenRect due to the binding loop it causes
157
+ height += root.tickLength + Math.max(0, ...tickLabelsContainer.children.map(x => x.height));
158
+ }
159
+ if (label !== "") {
160
+ height += labelText.height + root.spacing;
161
+ }
162
+ return height;
163
+ }
164
+ }
165
+ implicitWidth: {
166
+ switch (root.direction) {
167
+ case Axis.Direction.Left:
168
+ case Axis.Direction.Right:
169
+ let width = 0;
170
+ if (ticks.length > 0) {
171
+ // Can't use childrenRect due to the binding loop it causes
172
+ width += root.tickLength + Math.max(0, ...tickLabelsContainer.children.map(x => x.width));
173
+ }
174
+ if (label !== "") {
175
+ width += labelText.height + root.spacing;
176
+ }
177
+ return width;
178
+ case Axis.Direction.Top:
179
+ case Axis.Direction.Bottom:
180
+ return 100;
181
+ }
182
+ }
183
+ z: 1
184
+
185
+ QuickGraphLib.AxisHelper {
186
+ id: helper
187
+
188
+ height: root.height
189
+ tickLength: 10
190
+ width: root.width
191
+ }
192
+ QQS.Shape {
193
+ id: shape
194
+
195
+ anchors.fill: parent
196
+ preferredRendererType: QQS.Shape.CurveRenderer
197
+
198
+ QQS.ShapePath {
199
+ id: myPath
200
+
201
+ pathHints: QQS.ShapePath.PathLinear
202
+ strokeColor: "black"
203
+ strokeWidth: 1
204
+
205
+ PathPolyline {
206
+ path: helper.path
207
+ }
208
+ }
209
+ }
210
+ Item {
211
+ id: tickLabelsContainer
212
+
213
+ Repeater {
214
+ delegate: root.tickDelegate
215
+ model: root.showTickLabels ? helper.tickModel : null
216
+ }
217
+ }
218
+ Text {
219
+ id: labelText
220
+
221
+ x: {
222
+ switch (root.direction) {
223
+ case Axis.Direction.Left:
224
+ return height / 2;
225
+ case Axis.Direction.Right:
226
+ return root.width - height / 2;
227
+ case Axis.Direction.Top:
228
+ case Axis.Direction.Bottom:
229
+ return root.width / 2;
230
+ }
231
+ }
232
+ y: {
233
+ switch (root.direction) {
234
+ case Axis.Direction.Left:
235
+ case Axis.Direction.Right:
236
+ return root.height / 2;
237
+ case Axis.Direction.Top:
238
+ return height / 2;
239
+ case Axis.Direction.Bottom:
240
+ return root.height - height / 2;
241
+ }
242
+ }
243
+
244
+ transform: [
245
+ Translate {
246
+ x: -labelText.width / 2
247
+ y: -labelText.height / 2
248
+ },
249
+ Rotation {
250
+ angle: {
251
+ switch (root.direction) {
252
+ case Axis.Direction.Left:
253
+ return -90;
254
+ case Axis.Direction.Right:
255
+ return 90;
256
+ case Axis.Direction.Top:
257
+ case Axis.Direction.Bottom:
258
+ return 0;
259
+ }
260
+ }
261
+ }
262
+ ]
263
+ }
264
+ }
@@ -0,0 +1,117 @@
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
+ set(QGL_SOURCES
15
+ helpers/Helpers.cpp
16
+ helpers/Helpers.hpp
17
+ helpers/AxisHelper.hpp
18
+ helpers/AxisHelper.cpp
19
+ helpers/Foreign.hpp
20
+ helpers/ShapeRepeaterHelper.hpp
21
+ helpers/ShapeRepeaterHelper.cpp
22
+ ImageView.hpp
23
+ ImageView.cpp
24
+ ColorMaps.hpp
25
+ ColorMaps.cpp
26
+ DataTypes.hpp
27
+ DataTypes.cpp
28
+ QuickGraphLib.hpp
29
+ Global.hpp
30
+ )
31
+
32
+ if(ENABLE_PYTHON)
33
+ list(APPEND QGL_SOURCES bindings/Bindings.hpp)
34
+ endif()
35
+
36
+ add_library(QuickGraphLibPlugin SHARED Plugin.cpp)
37
+ target_link_libraries(QuickGraphLibPlugin PRIVATE Qt6::Gui)
38
+ qt_add_qml_module(QuickGraphLib
39
+ URI QuickGraphLib
40
+ SHARED
41
+ VERSION 1.0
42
+ QML_FILES ${QGL_QML_FILES}
43
+ PLUGIN_TARGET QuickGraphLibPlugin
44
+ NO_GENERATE_PLUGIN_SOURCE
45
+ NO_PLUGIN_OPTIONAL
46
+ DEPENDENCIES QtQuick
47
+ SOURCES ${QGL_SOURCES}
48
+ )
49
+ set_property(
50
+ TARGET QuickGraphLib
51
+ PROPERTY LIBRARY_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
52
+ )
53
+ set_property(
54
+ TARGET QuickGraphLib
55
+ PROPERTY RUNTIME_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
56
+ )
57
+ target_compile_definitions(QuickGraphLib PRIVATE QGL_LIBRARY)
58
+
59
+ target_compile_definitions(
60
+ QuickGraphLib
61
+ PRIVATE $<$<OR:$<CONFIG:Debug>,$<CONFIG:RelWithDebInfo>>:QT_QML_DEBUG>
62
+ )
63
+ target_link_libraries(QuickGraphLib PRIVATE Qt6::Quick Qt6::Svg)
64
+ target_include_directories(
65
+ QuickGraphLib
66
+ PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/helpers
67
+ )
68
+
69
+ install(
70
+ TARGETS QuickGraphLib
71
+ RUNTIME DESTINATION ${INSTALL_SUBPATH}/QuickGraphLib
72
+ LIBRARY DESTINATION ${INSTALL_SUBPATH}/QuickGraphLib
73
+ )
74
+ install(
75
+ TARGETS QuickGraphLibPlugin
76
+ RUNTIME DESTINATION ${INSTALL_SUBPATH}/QuickGraphLib
77
+ LIBRARY DESTINATION ${INSTALL_SUBPATH}/QuickGraphLib
78
+ )
79
+ install(FILES ${QGL_QML_FILES} DESTINATION ${INSTALL_SUBPATH}/QuickGraphLib)
80
+ install(
81
+ FILES
82
+ ${CMAKE_CURRENT_BINARY_DIR}/qmldir
83
+ ${CMAKE_CURRENT_BINARY_DIR}/QuickGraphLib.qmltypes
84
+ DESTINATION ${INSTALL_SUBPATH}/QuickGraphLib
85
+ )
86
+
87
+ add_subdirectory(PreFabs)
88
+ add_subdirectory(GraphItems)
89
+
90
+ if(ENABLE_PYTHON)
91
+ set(QGL_PYTHON_FILES
92
+ __init__.py
93
+ consts.py
94
+ contours.py
95
+ py.typed
96
+ _version.py
97
+ )
98
+ foreach(PYTHON_FILE ${QGL_PYTHON_FILES})
99
+ add_custom_command(
100
+ OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${PYTHON_FILE}
101
+ COMMAND
102
+ ${CMAKE_COMMAND} -E copy
103
+ ${CMAKE_CURRENT_SOURCE_DIR}/${PYTHON_FILE}
104
+ ${CMAKE_CURRENT_BINARY_DIR}/${PYTHON_FILE}
105
+ DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/${PYTHON_FILE}
106
+ )
107
+ endforeach()
108
+ list(TRANSFORM QGL_PYTHON_FILES PREPEND "${CMAKE_CURRENT_BINARY_DIR}/")
109
+ add_custom_target(QuickGraphLibPythonFiles ALL DEPENDS ${QGL_PYTHON_FILES})
110
+
111
+ install(
112
+ FILES ${QGL_PYTHON_FILES}
113
+ DESTINATION ${INSTALL_SUBPATH}/QuickGraphLib
114
+ )
115
+
116
+ add_subdirectory(bindings)
117
+ endif()