Class: QgsRatioLockButton¶
-
class
qgis.gui.
QgsRatioLockButton
(parent: QWidget = None)¶ Bases:
PyQt5.QtWidgets.QToolButton
Construct a new ratio lock button. Use
parent
to attach a parent QWidget to the button.A cross platform button subclass used to represent a locked / unlocked ratio state.
New in version 3.0: Enums
Methods
Returns whether the button state is locked.
Resets the current width/height ratio, taking the width and height from the current values of the width and height spin boxes.
Registers a spin box
widget
as the linked “height” spin box.Sets whether the button state is locked.
Registers a spin box
widget
as the linked “width” spin box.Signals
Emitted whenever the lock state changes.
Attributes
-
actionEvent
()¶
-
changeEvent
(self, e: QEvent)¶
-
checkStateSet
()¶
-
childEvent
()¶
-
closeEvent
()¶
-
connectNotify
()¶
-
contextMenuEvent
()¶
-
create
()¶
-
customEvent
()¶
-
destroy
()¶
-
disconnectNotify
()¶
-
dragEnterEvent
()¶
-
dragLeaveEvent
()¶
-
dragMoveEvent
()¶
-
dropEvent
()¶
-
enterEvent
()¶
-
event
()¶
-
focusInEvent
()¶
-
focusNextChild
()¶
-
focusNextPrevChild
()¶
-
focusOutEvent
()¶
-
focusPreviousChild
()¶
-
hideEvent
()¶
-
hitButton
()¶
-
initPainter
()¶
-
initStyleOption
()¶
-
inputMethodEvent
()¶
-
isSignalConnected
()¶
-
keyPressEvent
()¶
-
keyReleaseEvent
()¶
-
leaveEvent
()¶
-
lockChanged
¶ Emitted whenever the lock state changes. [signal]
-
locked
(self) → bool¶ Returns whether the button state is locked.
- Returns
true if the button state is locked.
See also
-
metric
()¶
-
mouseDoubleClickEvent
()¶
-
mouseMoveEvent
()¶
-
mousePressEvent
()¶
-
mouseReleaseEvent
()¶
-
moveEvent
()¶
-
nativeEvent
()¶
-
nextCheckState
()¶
-
paintEvent
()¶
-
receivers
()¶
-
resetRatio
(self)¶ Resets the current width/height ratio, taking the width and height from the current values of the width and height spin boxes.
-
resizeEvent
(self, event: QResizeEvent)¶
-
sender
()¶
-
senderSignalIndex
()¶
-
setHeightSpinBox
(self, widget: QDoubleSpinBox)¶ Registers a spin box
widget
as the linked “height” spin box.If both a width and height spin box are linked to the button, they will automatically have their values updates when if the other spin box value is changed. I.e. changing the width spin box will automatically update the height spin box to a value which keeps the same locked ratio.
See also
-
setLocked
(self, locked: bool)¶ Sets whether the button state is locked.
- Parameters
locked – locked state
See also
-
setWidthSpinBox
(self, widget: QDoubleSpinBox)¶ Registers a spin box
widget
as the linked “width” spin box.If both a width and height spin box are linked to the button, they will automatically have their values updates when if the other spin box value is changed. I.e. changing the width spin box will automatically update the height spin box to a value which keeps the same locked ratio.
See also
-
showEvent
(self, e: QShowEvent)¶
-
tabletEvent
()¶
-
timerEvent
()¶
-
updateMicroFocus
()¶
-
wheelEvent
()¶
-