QGIS/python/core/qgsmargins.sip

190 lines
4.7 KiB
Plaintext
Raw Normal View History

/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsmargins.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
class QgsMargins
{
2017-05-14 09:48:41 +02:00
%TypeHeaderCode
2017-05-14 09:48:41 +02:00
#include "qgsmargins.h"
%End
public:
QgsMargins();
2017-05-14 09:48:41 +02:00
%Docstring
Constructs a margins object with all margins set to 0.
%End
QgsMargins( double left, double top, double right, double bottom );
2017-05-14 09:48:41 +02:00
%Docstring
Constructs margins with the given ``left``, ``top``, ``right``, ``bottom``
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setLeft()`
.. seealso:: :py:func:`setRight()`
.. seealso:: :py:func:`setTop()`
.. seealso:: :py:func:`setBottom()`
2017-05-14 09:48:41 +02:00
%End
bool isNull() const;
2017-05-14 09:48:41 +02:00
%Docstring
Returns \c true if all margins are is 0; otherwise returns false.
:rtype: bool
%End
double left() const;
2017-05-14 09:48:41 +02:00
%Docstring
Returns the left margin.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setLeft()`
2017-05-14 09:48:41 +02:00
:rtype: float
%End
double top() const;
2017-05-14 09:48:41 +02:00
%Docstring
Returns the top margin.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setTop()`
2017-05-14 09:48:41 +02:00
:rtype: float
%End
double right() const;
2017-05-14 09:48:41 +02:00
%Docstring
Returns the right margin.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setRight()`
2017-05-14 09:48:41 +02:00
:rtype: float
%End
double bottom() const;
2017-05-14 09:48:41 +02:00
%Docstring
Returns the bottom margin.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`setBottom()`
2017-05-14 09:48:41 +02:00
:rtype: float
%End
void setLeft( double left );
2017-05-14 09:48:41 +02:00
%Docstring
Sets the left margin to ``left``.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`left()`
2017-05-14 09:48:41 +02:00
%End
void setTop( double top );
2017-05-14 09:48:41 +02:00
%Docstring
Sets the top margin to ``top``.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`top()`
2017-05-14 09:48:41 +02:00
%End
void setRight( double right );
2017-05-14 09:48:41 +02:00
%Docstring
Sets the right margin to ``right``.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`right()`
2017-05-14 09:48:41 +02:00
%End
void setBottom( double bottom );
2017-05-14 09:48:41 +02:00
%Docstring
Sets the bottom margin to ``bottom``.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`bottom()`
2017-05-14 09:48:41 +02:00
%End
QgsMargins &operator+=( const QgsMargins &margins );
2017-05-14 09:48:41 +02:00
%Docstring
Add each component of ``margins`` to the respective component of this object
and returns a reference to it.
:rtype: QgsMargins
%End
QgsMargins &operator-=( const QgsMargins &margins );
2017-05-14 09:48:41 +02:00
%Docstring
Subtract each component of ``margins`` from the respective component of this object
and returns a reference to it.
:rtype: QgsMargins
%End
QgsMargins &operator+=( double addend );
2017-05-14 09:48:41 +02:00
%Docstring
Adds the ``addend`` to each component of this object and returns a reference to it.
:rtype: QgsMargins
%End
QgsMargins &operator-=( double subtrahend );
2017-05-14 09:48:41 +02:00
%Docstring
Subtracts the ``subtrahend`` from each component of this object
and returns a reference to it.
:rtype: QgsMargins
%End
QgsMargins &operator*=( double factor );
2017-05-14 09:48:41 +02:00
%Docstring
Multiplies each component of this object by ``factor``
and returns a reference to it.
:rtype: QgsMargins
%End
QgsMargins &operator/=( double divisor );
2017-05-14 09:48:41 +02:00
%Docstring
Multiplies each component of this object by ``factor``
and returns a reference to it.
:rtype: QgsMargins
%End
QString toString() const;
2017-05-14 09:48:41 +02:00
%Docstring
Returns the margins encoded to a string.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`fromString()`
2017-05-14 09:48:41 +02:00
:rtype: str
%End
static QgsMargins fromString( const QString &string );
2017-05-14 09:48:41 +02:00
%Docstring
Returns a QgsMargins object decoded from a string, or a null QgsMargins
if the string could not be interpreted as margins.
2017-12-05 20:04:14 -04:00
.. seealso:: :py:func:`toString()`
2017-05-14 09:48:41 +02:00
:rtype: QgsMargins
%End
};
2017-05-14 19:51:16 +02:00
bool operator==( const QgsMargins &lhs, const QgsMargins &rhs );
2017-05-14 19:51:16 +02:00
bool operator!=( const QgsMargins &lhs, const QgsMargins &rhs );
2017-05-14 19:51:16 +02:00
QgsMargins operator+( const QgsMargins &m1, const QgsMargins &m2 );
2017-05-14 19:51:16 +02:00
QgsMargins operator-( const QgsMargins &m1, const QgsMargins &m2 );
2017-05-14 19:51:16 +02:00
QgsMargins operator+( const QgsMargins &lhs, double rhs );
2017-05-14 19:51:16 +02:00
QgsMargins operator+( double lhs, const QgsMargins &rhs );
2017-05-14 19:51:16 +02:00
QgsMargins operator-( const QgsMargins &lhs, double rhs );
2017-05-14 19:51:16 +02:00
QgsMargins operator*( const QgsMargins &margins, double factor );
2017-05-14 19:51:16 +02:00
QgsMargins operator*( double factor, const QgsMargins &margins );
2017-05-14 19:51:16 +02:00
QgsMargins operator/( const QgsMargins &margins, double divisor );
2017-05-14 19:51:16 +02:00
QgsMargins operator+( const QgsMargins &margins );
2017-05-14 19:51:16 +02:00
QgsMargins operator-( const QgsMargins &margins );
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsmargins.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/