Class: QgsLayoutRuler¶
-
class
qgis.gui.
QgsLayoutRuler
(parent: QWidget = None, orientation: Qt.Orientation = Qt.Horizontal)¶ Bases:
PyQt5.QtWidgets.QWidget
Constructor for QgsLayoutRuler, with the specified
parent
widget andorientation
.A custom ruler widget for use with QgsLayoutView, displaying the current zoom and position of the visible layout and for interacting with guides in a layout.
New in version 3.0: Enums
Methods
Returns the current layout view associated with the ruler.
Returns the ruler size (either the height of a horizontal ruler or the width of a vertical rule).
Sets a context
menu
to show when right clicking occurs on the ruler.Updates the
position
of the marker showing the current mouse position within the view.Sets the current layout
view
to synchronize the ruler with.Sets the current scene
transform
.Signals
Emitted when mouse cursor coordinates change [signal]
Attributes
-
actionEvent
()¶
-
changeEvent
()¶
-
childEvent
()¶
-
closeEvent
()¶
-
connectNotify
()¶
-
contextMenuEvent
()¶
-
create
()¶
-
cursorPosChanged
¶ Emitted when mouse cursor coordinates change [signal]
-
customEvent
()¶
-
destroy
()¶
-
disconnectNotify
()¶
-
dragEnterEvent
()¶
-
dragLeaveEvent
()¶
-
dragMoveEvent
()¶
-
dropEvent
()¶
-
enterEvent
()¶
-
event
()¶
-
focusInEvent
()¶
-
focusNextChild
()¶
-
focusNextPrevChild
()¶
-
focusOutEvent
()¶
-
focusPreviousChild
()¶
-
hideEvent
()¶
-
initPainter
()¶
-
inputMethodEvent
()¶
-
isSignalConnected
()¶
-
keyPressEvent
()¶
-
keyReleaseEvent
()¶
-
layoutView
(self) → QgsLayoutView¶ Returns the current layout view associated with the ruler.
See also
-
leaveEvent
()¶
-
metric
()¶
-
minimumSizeHint
(self) → QSize¶
-
mouseDoubleClickEvent
()¶
-
mouseMoveEvent
(self, event: QMouseEvent)¶
-
mousePressEvent
(self, event: QMouseEvent)¶
-
mouseReleaseEvent
(self, event: QMouseEvent)¶
-
moveEvent
()¶
-
nativeEvent
()¶
-
paintEvent
(self, event: QPaintEvent)¶
-
receivers
()¶
-
resizeEvent
()¶
-
rulerSize
(self) → int¶ Returns the ruler size (either the height of a horizontal ruler or the width of a vertical rule).
-
sender
()¶
-
senderSignalIndex
()¶
-
setContextMenu
(self, menu: QMenu)¶ Sets a context
menu
to show when right clicking occurs on the ruler. Ownership ofmenu
is unchanged.
-
setCursorPosition
(self, position: Union[QPointF, QPoint])¶ Updates the
position
of the marker showing the current mouse position within the view.position
is in layout coordinates.
-
setLayoutView
(self, view: QgsLayoutView)¶ Sets the current layout
view
to synchronize the ruler with.See also
-
setSceneTransform
(self, transform: QTransform)¶ Sets the current scene
transform
. This is usually the transform set for a view showing the associated scene, in order to synchronize the view’s display of the scene with the rulers.
-
showEvent
()¶
-
tabletEvent
()¶
-
timerEvent
()¶
-
updateMicroFocus
()¶
-
wheelEvent
()¶
-