#include <qgslayoutruler.h>
|
void | setCursorPosition (QPointF position) |
| Updates the position of the marker showing the current mouse position within the view. More...
|
|
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.
- Since
- QGIS 3.0
Definition at line 38 of file qgslayoutruler.h.
◆ QgsLayoutRuler()
QgsLayoutRuler::QgsLayoutRuler |
( |
QWidget * |
parent = nullptr , |
|
|
Qt::Orientation |
orientation = Qt::Horizontal |
|
) |
| |
|
explicit |
◆ cursorPosChanged
void QgsLayoutRuler::cursorPosChanged |
( |
QPointF |
| ) |
|
|
signal |
Emitted when mouse cursor coordinates change.
◆ layoutView()
◆ minimumSizeHint()
QSize QgsLayoutRuler::minimumSizeHint |
( |
| ) |
const |
|
override |
◆ mouseMoveEvent()
void QgsLayoutRuler::mouseMoveEvent |
( |
QMouseEvent * |
event | ) |
|
|
overrideprotected |
◆ mousePressEvent()
void QgsLayoutRuler::mousePressEvent |
( |
QMouseEvent * |
event | ) |
|
|
overrideprotected |
◆ mouseReleaseEvent()
void QgsLayoutRuler::mouseReleaseEvent |
( |
QMouseEvent * |
event | ) |
|
|
overrideprotected |
◆ paintEvent()
void QgsLayoutRuler::paintEvent |
( |
QPaintEvent * |
event | ) |
|
|
overrideprotected |
◆ rulerSize()
int QgsLayoutRuler::rulerSize |
( |
| ) |
const |
|
inline |
Returns the ruler size (either the height of a horizontal ruler or the width of a vertical rule).
Definition at line 74 of file qgslayoutruler.h.
◆ setContextMenu()
void QgsLayoutRuler::setContextMenu |
( |
QMenu * |
menu | ) |
|
Sets a context menu to show when right clicking occurs on the ruler.
Ownership of menu is unchanged.
Definition at line 575 of file qgslayoutruler.cpp.
◆ setCursorPosition
void QgsLayoutRuler::setCursorPosition |
( |
QPointF |
position | ) |
|
|
slot |
Updates the position of the marker showing the current mouse position within the view.
position is in layout coordinates.
Definition at line 580 of file qgslayoutruler.cpp.
◆ setLayoutView()
◆ setSceneTransform()
void QgsLayoutRuler::setSceneTransform |
( |
const QTransform & |
transform | ) |
|
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.
Definition at line 563 of file qgslayoutruler.cpp.
The documentation for this class was generated from the following files: