QGIS/python/core/auto_generated/qgsmargins.sip.in

168 lines
3.8 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
2017-12-15 10:36:55 -04:00
Constructs a margins object with all margins set to 0.
2017-05-14 09:48:41 +02:00
%End
QgsMargins( double left, double top, double right, double bottom );
2017-05-14 09:48:41 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Constructs margins with the given ``left``, ``top``, ``right``, ``bottom``
.. seealso:: :py:func:`setLeft`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`setRight`
2017-12-15 10:36:55 -04:00
.. seealso:: :py:func:`setTop`
2017-12-15 10:36:55 -04:00
.. 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
2017-12-15 10:36:55 -04:00
Returns \c true if all margins are is 0; otherwise returns false.
2017-05-14 09:48:41 +02:00
%End
double left() const;
2017-05-14 09:48:41 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the left margin.
.. seealso:: :py:func:`setLeft`
2017-05-14 09:48:41 +02:00
%End
double top() const;
2017-05-14 09:48:41 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the top margin.
.. seealso:: :py:func:`setTop`
2017-05-14 09:48:41 +02:00
%End
double right() const;
2017-05-14 09:48:41 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the right margin.
.. seealso:: :py:func:`setRight`
2017-05-14 09:48:41 +02:00
%End
double bottom() const;
2017-05-14 09:48:41 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the bottom margin.
.. seealso:: :py:func:`setBottom`
2017-05-14 09:48:41 +02:00
%End
void setLeft( double left );
2017-05-14 09:48:41 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Sets the left margin to ``left``.
.. 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
2017-12-15 10:36:55 -04:00
Sets the top margin to ``top``.
.. 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
2017-12-15 10:36:55 -04:00
Sets the right margin to ``right``.
.. 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
2017-12-15 10:36:55 -04:00
Sets the bottom margin to ``bottom``.
.. 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
QgsMargins &operator-=( const QgsMargins &margins );
2017-05-14 09:48:41 +02:00
QgsMargins &operator+=( double addend );
2017-05-14 09:48:41 +02:00
QgsMargins &operator-=( double subtrahend );
2017-05-14 09:48:41 +02:00
QgsMargins &operator*=( double factor );
2017-05-14 09:48:41 +02:00
QgsMargins &operator/=( double divisor );
QString toString() const;
2017-05-14 09:48:41 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns the margins encoded to a string.
.. seealso:: :py:func:`fromString`
2017-05-14 09:48:41 +02:00
%End
static QgsMargins fromString( const QString &string );
2017-05-14 09:48:41 +02:00
%Docstring
2017-12-15 10:36:55 -04:00
Returns a QgsMargins object decoded from a string, or a null QgsMargins
if the string could not be interpreted as margins.
.. seealso:: :py:func:`toString`
2017-05-14 09:48:41 +02:00
%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 *
************************************************************************/