Skip to content

Commit

Permalink
Unsipify QgsMargins
Browse files Browse the repository at this point in the history
  • Loading branch information
m-kuhn committed May 15, 2017
1 parent 7ac276e commit d4edbc0
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 21 deletions.
1 change: 1 addition & 0 deletions python/auto_sip.blacklist
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ core/qgsexception.sip
core/qgis.sip
core/qgsexpressioncontext.sip
core/qgsfeaturerequest.sip
core/qgsmargins.sip
core/qgsoptionalexpression.sip
core/qgspaintenginehack.sip
core/qgspainting.sip
Expand Down
107 changes: 88 additions & 19 deletions python/core/qgsmargins.sip
Original file line number Diff line number Diff line change
@@ -1,15 +1,3 @@
/************************************************************************
* 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
{

Expand Down Expand Up @@ -149,10 +137,91 @@ class QgsMargins
};


/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsmargins.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
bool operator==( const QgsMargins &lhs, const QgsMargins &rhs );
%Docstring
Returns \c true if ``lhs`` and ``rhs`` are equal; otherwise returns \c false.
:rtype: bool
%End

bool operator!=( const QgsMargins &lhs, const QgsMargins &rhs );
%Docstring
Returns \c true if ``lhs`` and ``rhs`` are different; otherwise returns \c false.
:rtype: bool
%End

QgsMargins operator+( const QgsMargins &m1, const QgsMargins &m2 );
%Docstring
Returns a QgsMargins object that is the sum of the given margins, ``m1``
and ``m2``; each component is added separately.
:rtype: QgsMargins
%End

QgsMargins operator-( const QgsMargins &m1, const QgsMargins &m2 );
%Docstring
Returns a QgsMargins object that is formed by subtracting ``m2`` from
``m1``; each component is subtracted separately.
:rtype: QgsMargins
%End

QgsMargins operator+( const QgsMargins &lhs, double rhs );
%Docstring
Returns a QgsMargins object that is formed by adding ``rhs`` to ``lhs``.
:rtype: QgsMargins
%End

QgsMargins operator+( double lhs, const QgsMargins &rhs );
%Docstring
Returns a QgsMargins object that is formed by adding ``lhs`` to ``rhs``.
:rtype: QgsMargins
%End

QgsMargins operator-( const QgsMargins &lhs, double rhs );
%Docstring
Returns a QgsMargins object that is formed by subtracting ``rhs`` from ``lhs``.
:rtype: QgsMargins
%End

QgsMargins operator*( const QgsMargins &margins, double factor );
%Docstring
Returns a QgsMargins object that is formed by multiplying each component
of the given ``margins`` by ``factor``.
:rtype: QgsMargins
%End

QgsMargins operator*( double factor, const QgsMargins &margins );
%Docstring
Returns a QgsMargins object that is formed by multiplying each component
of the given ``margins`` by ``factor``.
:rtype: QgsMargins
%End

QgsMargins operator/( const QgsMargins &margins, double divisor );
%Docstring
Returns a QgsMargins object that is formed by dividing the components of
the given ``margins`` by the given ``divisor``.
:rtype: QgsMargins
%End

QgsMargins &QgsMargins::operator+=( const QgsMargins &margins );

QgsMargins &QgsMargins::operator-=( const QgsMargins &margins );

QgsMargins &QgsMargins::operator+=( double addend );

QgsMargins &QgsMargins::operator-=( double subtrahend );

QgsMargins &QgsMargins::operator*=( double factor );

QgsMargins &QgsMargins::operator/=( double divisor );

QgsMargins operator+( const QgsMargins &margins );
%Docstring
Returns a QgsMargins object that is formed from all components of ``margins``.
:rtype: QgsMargins
%End

QgsMargins operator-( const QgsMargins &margins );
%Docstring
Returns a QgsMargins object that is formed by negating all components of ``margins``.
:rtype: QgsMargins
%End
2 changes: 0 additions & 2 deletions src/core/qgsmargins.h
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,6 @@ class CORE_EXPORT QgsMargins
double mBottom = 0.0;
};

#ifndef SIP_RUN

/**
* Returns \c true if \a lhs and \a rhs are equal; otherwise returns \c false.
Expand Down Expand Up @@ -321,6 +320,5 @@ inline QgsMargins operator-( const QgsMargins &margins )
}

Q_DECLARE_TYPEINFO( QgsMargins, Q_MOVABLE_TYPE );
#endif

#endif // QGSMARGINS_H

0 comments on commit d4edbc0

Please sign in to comment.