This class is used to store margins top, right, bottom and left.
More...
#include <bpsmargins.h>
This class is used to store margins top, right, bottom and left.
◆ BpsMargins() [1/4]
BpsMargins::BpsMargins |
( |
const BpsMargins & |
aMargins | ) |
|
The copy constructor.
- Parameters
-
aMargins | The original margins to clone. |
◆ BpsMargins() [2/4]
BpsMargins::BpsMargins |
( |
qreal |
aValue | ) |
|
Convenience constructor where the margin values are provided.
- Parameters
-
aValue | The default for all 4 margins. |
◆ BpsMargins() [3/4]
BpsMargins::BpsMargins |
( |
qreal |
aTopBottom, |
|
|
qreal |
aLeftRight |
|
) |
| |
Convenience constructor where the margin values are provided.
- Parameters
-
aTopBottom | The top and bottom margin values. |
aLeftRight | The left and right margin values. |
◆ BpsMargins() [4/4]
BpsMargins::BpsMargins |
( |
qreal |
aTop, |
|
|
qreal |
aRight, |
|
|
qreal |
aBottom, |
|
|
qreal |
aLeft |
|
) |
| |
Convenience constructor where the margin values are provided.
- Parameters
-
aTop | The top margin value. |
aRight | The right margin value. |
aBottom | The bottom margin value. |
aLeft | The left margin value. |
◆ bottom()
qreal BpsMargins::bottom |
( |
| ) |
const |
|
inline |
- Returns
- The bottom margin value.
◆ isNull()
bool BpsMargins::isNull |
( |
| ) |
const |
|
inline |
- Returns
- True when all margins are = 0.0
◆ isValid()
bool BpsMargins::isValid |
( |
| ) |
const |
|
inline |
- Returns
- True when all margins are >= 0.0
◆ left()
qreal BpsMargins::left |
( |
| ) |
const |
|
inline |
- Returns
- The left margin value.
◆ metaType()
static int BpsMargins::metaType |
( |
| ) |
|
|
static |
◆ operator QVariant()
◆ operator*=()
BpsMargins & BpsMargins::operator*= |
( |
qreal |
aFactor | ) |
|
|
inline |
Multiply all margin values by a factor.
- Parameters
-
aFactor | The factor to multiply by. |
- Returns
- Reference of the margins object.
◆ operator/=()
BpsMargins & BpsMargins::operator/= |
( |
qreal |
aDivisor | ) |
|
|
inline |
Divide all margin values by a divisor.
- Parameters
-
aDivisor | The value to divide by. |
- Returns
- Reference of the margins object.
◆ rbottom()
qreal & BpsMargins::rbottom |
( |
| ) |
|
|
inline |
- Returns
- The bottom margin value as reference.
◆ right()
qreal BpsMargins::right |
( |
| ) |
const |
|
inline |
- Returns
- The right margin value.
◆ rleft()
qreal & BpsMargins::rleft |
( |
| ) |
|
|
inline |
- Returns
- The left margin value as reference.
◆ rright()
qreal & BpsMargins::rright |
( |
| ) |
|
|
inline |
- Returns
- The right margin value as reference.
◆ rtop()
qreal & BpsMargins::rtop |
( |
| ) |
|
|
inline |
- Returns
- The top margin value as reference.
◆ setBottom()
void BpsMargins::setBottom |
( |
qreal |
aValue | ) |
|
|
inline |
Set the bottom margin value.
- Parameters
-
aValue | The new value to set. |
◆ setLeft()
void BpsMargins::setLeft |
( |
qreal |
aValue | ) |
|
|
inline |
Set the left margin value.
- Parameters
-
aValue | The new value to set. |
◆ setRight()
void BpsMargins::setRight |
( |
qreal |
aValue | ) |
|
|
inline |
Set the right margin value.
- Parameters
-
aValue | The new value to set. |
◆ setTop()
void BpsMargins::setTop |
( |
qreal |
aValue | ) |
|
|
inline |
Set the top margin value.
- Parameters
-
aValue | The new value to set. |
◆ top()
qreal BpsMargins::top |
( |
| ) |
const |
|
inline |
- Returns
- The top margin value.
◆ toString()
QString BpsMargins::toString |
( |
| ) |
const |
- Returns
- String representation of the value as "BpsMargins(top, right, bottom, left)".
◆ operator!=()
Compare two margin objects.
- Parameters
-
aFirst | The first object. |
aSecond | The second object. |
- Returns
- True if both are not equal.
◆ operator*() [1/2]
Multiply a margin object by a qreal.
- Parameters
-
aMargins | The margin object. |
aFactor | The multiply factor. |
- Returns
- New margin object with the result.
◆ operator*() [2/2]
Multiply a qreal with a margin object.
- Parameters
-
aFactor | The multiply factor. |
aMargins | The margin object. |
- Returns
- New margin object with the result.
◆ operator/()
Divide a margin object by a qreal.
- Parameters
-
aMargins | The margin object. |
aDivisor | The divisor. |
- Returns
- New margin object with the result.
◆ operator==()
Compare two margin objects.
- Parameters
-
aFirst | The first object. |
aSecond | The second object. |
- Returns
- True if both are equal.
The documentation for this class was generated from the following file: