spinetoolbox.widgets.shrinking_scene
¶
A QGraphicsScene that can shrink sometimes.
author: |
|
---|---|
date: | 18.10.2019 |
Module Contents¶
-
class
spinetoolbox.widgets.shrinking_scene.
ShrinkingScene
(horizontal_shrinking_threshold, vertical_shrinking_threshold, parent)[source]¶ Bases:
PySide2.QtWidgets.QGraphicsScene
A QGraphicsScene class that can shrinks its scene rectangle.
Shrinking can be triggered by shrink_if_needed(). It is controlled by two threshold values which control how far the items need to be from the scene rectangle’s edges to trigger the shrinking.
Parameters: - horizontal_shrinking_threshold (float) – horizontal threshold before the scene is shrank
- vertical_shrinking_threshold (float) – vertical threshold before the scene is shrank
- parent (QObject) – a parent