diff options
author | Friedemann Kleint <[email protected]> | 2022-08-18 15:44:52 +0200 |
---|---|---|
committer | Friedemann Kleint <[email protected]> | 2022-08-24 12:58:38 +0200 |
commit | ebfaceedf7413ce70e6ae411c821e6c3e68aa37f (patch) | |
tree | 823dfbe6faa238345f18f1af2ab92e4d620dcd84 /examples/datavisualization/surface_model_numpy/surfacegraph.py | |
parent | 5c37a8c9ffea848f4115e3b89f50bddc4ea4a6de (diff) |
Examples: Add some missing slot decorators
As unearthed by the warnings added by the logging category.
As a drive-by, fix some imports.
Pick-to: 6.3 6.2
Task-number: PYSIDE-2033
Change-Id: I3812c705b60eb7be744c3532fcfb0e4024763885
Reviewed-by: Christian Tismer <[email protected]>
Diffstat (limited to 'examples/datavisualization/surface_model_numpy/surfacegraph.py')
-rw-r--r-- | examples/datavisualization/surface_model_numpy/surfacegraph.py | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/examples/datavisualization/surface_model_numpy/surfacegraph.py b/examples/datavisualization/surface_model_numpy/surfacegraph.py index 126d50cbd..c0c1acecf 100644 --- a/examples/datavisualization/surface_model_numpy/surfacegraph.py +++ b/examples/datavisualization/surface_model_numpy/surfacegraph.py @@ -113,6 +113,7 @@ class SurfaceGraph(QObject): self.m_stepX = 0.0 self.m_stepZ = 0.0 + @Slot(bool) def enable_sqrt_sin_model(self, enable): if enable: self.m_sqrtSinSeries.setDrawMode(QSurface3DSeries.DrawSurfaceAndWireframe) @@ -144,6 +145,7 @@ class SurfaceGraph(QObject): self.m_axisMaxSliderZ.setMaximum(SAMPLE_COUNT_Z - 1) self.m_axisMaxSliderZ.setValue(SAMPLE_COUNT_Z - 1) + @Slot(bool) def enable_height_map_model(self, enable): if enable: self.m_heightMapSeries.setDrawMode(QSurface3DSeries.DrawSurface) @@ -178,6 +180,7 @@ class SurfaceGraph(QObject): self.m_axisMaxSliderZ.setMaximum(map_grid_count_z - 1) self.m_axisMaxSliderZ.setValue(map_grid_count_z - 1) + @Slot(int) def adjust_xmin(self, minimum): min_x = self.m_stepX * float(minimum) + self.m_rangeMinX @@ -189,6 +192,7 @@ class SurfaceGraph(QObject): self.set_axis_xrange(min_x, max_x) + @Slot(int) def adjust_xmax(self, maximum): max_x = self.m_stepX * float(maximum) + self.m_rangeMinX @@ -200,6 +204,7 @@ class SurfaceGraph(QObject): self.set_axis_xrange(min_x, max_x) + @Slot(int) def adjust_zmin(self, minimum): min_z = self.m_stepZ * float(minimum) + self.m_rangeMinZ @@ -211,6 +216,7 @@ class SurfaceGraph(QObject): self.set_axis_zrange(min_z, max_z) + @Slot(int) def adjust_zmax(self, maximum): max_x = self.m_stepZ * float(maximum) + self.m_rangeMinZ @@ -228,10 +234,11 @@ class SurfaceGraph(QObject): def set_axis_zrange(self, minimum, maximum): self.m_graph.axisZ().setRange(minimum, maximum) - @Slot() + @Slot(int) def change_theme(self, theme): self.m_graph.activeTheme().setType(Q3DTheme.Theme(theme)) + @Slot() def set_black_to_yellow_gradient(self): gr = QLinearGradient() gr.setColorAt(0.0, Qt.black) @@ -243,6 +250,7 @@ class SurfaceGraph(QObject): series.setBaseGradient(gr) series.setColorStyle(Q3DTheme.ColorStyleRangeGradient) + @Slot() def set_green_to_red_gradient(self): gr = QLinearGradient() gr.setColorAt(0.0, Qt.darkGreen) @@ -254,17 +262,21 @@ class SurfaceGraph(QObject): series.setBaseGradient(gr) series.setColorStyle(Q3DTheme.ColorStyleRangeGradient) + @Slot() def toggle_mode_none(self): self.m_graph.setSelectionMode(QAbstract3DGraph.SelectionNone) + @Slot() def toggle_mode_item(self): self.m_graph.setSelectionMode(QAbstract3DGraph.SelectionItem) + @Slot() def toggle_mode_slice_row(self): self.m_graph.setSelectionMode( QAbstract3DGraph.SelectionItemAndRow | QAbstract3DGraph.SelectionSlice ) + @Slot() def toggle_mode_slice_column(self): self.m_graph.setSelectionMode( QAbstract3DGraph.SelectionItemAndColumn | QAbstract3DGraph.SelectionSlice |