QGIS/python/gui/auto_generated/qgsratiolockbutton.sip.in

105 lines
3.0 KiB
Plaintext
Raw Normal View History

/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsratiolockbutton.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsRatioLockButton : QToolButton
{
%Docstring
2017-12-15 10:36:55 -04:00
A cross platform button subclass used to represent a locked / unlocked ratio state.
.. versionadded:: 3.0
%End
%TypeHeaderCode
#include "qgsratiolockbutton.h"
%End
public:
QgsRatioLockButton( QWidget *parent /TransferThis/ = 0 );
%Docstring
2017-12-15 10:36:55 -04:00
Construct a new ratio lock button.
Use ``parent`` to attach a parent QWidget to the button.
%End
void setLocked( bool locked );
%Docstring
2017-12-15 10:36:55 -04:00
Sets whether the button state is locked.
2017-12-15 21:36:08 -04:00
2017-12-15 10:36:55 -04:00
:param locked: locked state
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`locked`
%End
bool locked() const;
%Docstring
2017-12-15 10:36:55 -04:00
Returns whether the button state is locked.
:return: true if the button state is locked.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setLocked`
%End
void setWidthSpinBox( QDoubleSpinBox *widget );
%Docstring
2017-12-15 10:36:55 -04:00
Registers a spin box ``widget`` as the linked "width" spin box.
2017-12-15 10:36:55 -04:00
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.
.. seealso:: :py:func:`setHeightSpinBox`
%End
void setHeightSpinBox( QDoubleSpinBox *widget );
%Docstring
2017-12-15 10:36:55 -04:00
Registers a spin box ``widget`` as the linked "height" spin box.
2017-12-15 10:36:55 -04:00
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.
.. seealso:: :py:func:`setWidthSpinBox`
%End
void resetRatio();
%Docstring
2017-12-15 10:36:55 -04:00
Resets the current width/height ratio, taking the width and height
from the current values of the width and height spin boxes.
%End
signals:
void lockChanged( bool locked );
%Docstring
2017-12-15 10:36:55 -04:00
Emitted whenever the lock state changes.
%End
protected:
virtual void changeEvent( QEvent *e );
virtual void showEvent( QShowEvent *e );
virtual void resizeEvent( QResizeEvent *event );
};
/************************************************************************
* This file has been generated automatically from *
* *
* src/gui/qgsratiolockbutton.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/