Subgroup: Layout
Class: QgsLayoutViewRubberBand¶
-
class
qgis.gui.
QgsLayoutViewRubberBand
¶ Bases:
PyQt5.QtCore.QObject
QgsLayoutViewRubberBand is an abstract base class for temporary rubber band items in various shapes, for use within QgsLayoutView widgets.
New in version 3.0: Methods
blockSignals
brush
Returns the brush used for drawing the rubber band. childEvent
children
connectNotify
create
Creates a new instance of the QgsLayoutViewRubberBand subclass. customEvent
deleteLater
disconnect
disconnectNotify
dumpObjectInfo
dumpObjectTree
dynamicPropertyNames
event
eventFilter
findChild
findChild(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> QObject findChildren
findChildren(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] finish
Called when a rubber band use has finished and the rubber band is no longer required. inherits
installEventFilter
isSignalConnected
isWidgetType
isWindowType
killTimer
layout
Returns the layout associated with the rubber band. metaObject
moveToThread
objectName
parent
pen
Returns the pen used for drawing the rubber band. property
pyqtConfigure
Each keyword argument is either the name of a Qt property or a Qt signal. receivers
removeEventFilter
sender
senderSignalIndex
setBrush
Sets the brush
used for drawing the rubber band.setObjectName
setParent
setPen
Sets the pen
used for drawing the rubber band.setProperty
signalsBlocked
start
Called when a rubber band should be created at the specified starting position
(in layout coordinate space).startTimer
thread
timerEvent
tr
update
Called when a rubber band should be updated to reflect a temporary ending position
(in layout coordinate space).updateRect
Calculates an updated bounding box rectangle from a original start
position and newposition
.view
Returns the view associated with the rubber band. Attributes
destroyed
destroyed(self, QObject = None) [signal] objectNameChanged
objectNameChanged(self, str) [signal] sizeChanged
Emitted when the size of the rubber band is changed. staticMetaObject
-
brush
(self) → QBrush¶ Returns the brush used for drawing the rubber band.
See also
See also
-
childEvent
()¶
-
connectNotify
()¶
-
create
(self, view: QgsLayoutView) → QgsLayoutViewRubberBand¶ Creates a new instance of the QgsLayoutViewRubberBand subclass.
-
customEvent
()¶
-
disconnectNotify
()¶
-
finish
(self, position: Union[QPointF, QPoint] = QPointF(), modifiers: Union[Qt.KeyboardModifiers, Qt.KeyboardModifier] = 0) → QRectF¶ Called when a rubber band use has finished and the rubber band is no longer required. Returns the final bounding box of the rubber band.
-
isSignalConnected
()¶
-
pen
(self) → QPen¶ Returns the pen used for drawing the rubber band.
See also
See also
-
receivers
()¶
-
sender
()¶
-
senderSignalIndex
()¶
-
setBrush
(self, brush: Union[QBrush, QColor, Qt.GlobalColor, QGradient])¶ Sets the
brush
used for drawing the rubber band.See also
See also
-
setPen
(self, pen: Union[QPen, QColor, Qt.GlobalColor, QGradient])¶ Sets the
pen
used for drawing the rubber band.See also
See also
-
sizeChanged
¶ Emitted when the size of the rubber band is changed. The
size
argument gives a translated string describing the new rubber band size, with a format which differs per subclass (e.g. rectangles may describe a size using width and height, while circles may describe a size by radius). [signal]
-
start
(self, position: Union[QPointF, QPoint], modifiers: Union[Qt.KeyboardModifiers, Qt.KeyboardModifier])¶ Called when a rubber band should be created at the specified starting
position
(in layout coordinate space).
-
timerEvent
()¶
-
update
(self, position: Union[QPointF, QPoint], modifiers: Union[Qt.KeyboardModifiers, Qt.KeyboardModifier])¶ Called when a rubber band should be updated to reflect a temporary ending
position
(in layout coordinate space).
-
updateRect
(self, start: Union[QPointF, QPoint], position: Union[QPointF, QPoint], constrainSquare: bool, fromCenter: bool) → QRectF¶ Calculates an updated bounding box rectangle from a original
start
position and newposition
. IfconstrainSquare
is true then the bounding box will be forced to a square shape. IffromCenter
is true then the originalstart
position will form the center point of the returned rectangle.
-