mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-27 00:33:48 -05:00
When set, these spin boxes will automatically be updated when their accompanying spin box changes value so that the ratio is maintained.
95 lines
2.9 KiB
Plaintext
95 lines
2.9 KiB
Plaintext
/************************************************************************
|
|
* 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
|
|
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
|
|
Construct a new ratio lock button.
|
|
Use ``parent`` to attach a parent QWidget to the button.
|
|
%End
|
|
|
|
void setLocked( const bool locked );
|
|
%Docstring
|
|
Sets whether the button state is locked.
|
|
\param locked locked state
|
|
.. seealso:: locked
|
|
%End
|
|
|
|
bool locked() const;
|
|
%Docstring
|
|
Returns whether the button state is locked.
|
|
:return: true if the button state is locked.
|
|
.. seealso:: setLocked
|
|
:rtype: bool
|
|
%End
|
|
|
|
void setWidthSpinBox( QDoubleSpinBox *widget );
|
|
%Docstring
|
|
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.
|
|
|
|
.. seealso:: setHeightSpinBox()
|
|
%End
|
|
|
|
void setHeightSpinBox( QDoubleSpinBox *widget );
|
|
%Docstring
|
|
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.
|
|
|
|
.. seealso:: setWidthSpinBox()
|
|
%End
|
|
|
|
signals:
|
|
|
|
void lockChanged( const bool locked );
|
|
%Docstring
|
|
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 *
|
|
************************************************************************/
|