Class: QgsMargins¶
- class qgis.core.QgsMargins¶
Bases:
sip.wrapper
Constructs a margins object with all margins set to 0.
QgsMargins(left: float, top: float, right: float, bottom: float) Constructs margins with the given
left
,top
,right
,bottom
See also
See also
See also
See also
QgsMargins(
QgsMargins
)Methods
Returns the bottom margin.
Returns a
QgsMargins
object decoded from a string, or a null QgsMargins if the string could not be interpreted as margins.Returns c
True
if all margins are is 0; otherwise returnsFalse
.Returns the left margin.
Returns the right margin.
Sets the bottom margin to
bottom
.Sets the left margin to
left
.Sets the right margin to
right
.Sets the top margin to
top
.Returns the margins encoded to a string.
Returns the top margin.
- bottom(self) float ¶
Returns the bottom margin.
See also
- Return type:
float
- fromString(string: str) QgsMargins ¶
Returns a
QgsMargins
object decoded from a string, or a null QgsMargins if the string could not be interpreted as margins.See also
- Parameters:
string (str)
- Return type:
- isNull(self) bool ¶
Returns c
True
if all margins are is 0; otherwise returnsFalse
.- Return type:
bool
- right(self) float ¶
Returns the right margin.
See also
- Return type:
float
- setBottom(self, bottom: float)¶
Sets the bottom margin to
bottom
.See also
- Parameters:
bottom (float)
- setRight(self, right: float)¶
Sets the right margin to
right
.See also
- Parameters:
right (float)
- toString(self) str ¶
Returns the margins encoded to a string.
See also
- Return type:
str