Documents > BPS V2 C++ API
BpsMargins Class Reference

This class is used to store margins top, right, bottom and left. More...

#include <bpsmargins.h>

List of all members.

Public Member Functions

qreal bottom () const
 BpsMargins ()
 The default constructor creates an invalid margins object (all values = -1.0).
 BpsMargins (const BpsMargins &aMargins)
 The copy constructor.
 BpsMargins (qreal aValue)
 Convenience constructor where the margin values are provided.
 BpsMargins (qreal aTopBottom, qreal aLeftRight)
 Convenience constructor where the margin values are provided.
 BpsMargins (qreal aTop, qreal aRight, qreal aBottom, qreal aLeft)
 Convenience constructor where the margin values are provided.
bool isNull () const
bool isValid () const
qreal left () const
 operator QVariant () const
BpsMarginsoperator*= (qreal aFactor)
 Multiply all margin values by a factor.
BpsMarginsoperator/= (qreal aDivisor)
 Divide all margin values by a divisor.
qreal & rbottom ()
qreal right () const
qreal & rleft ()
qreal & rright ()
qreal & rtop ()
void setBottom (qreal aValue)
 Set the bottom margin value.
void setLeft (qreal aValue)
 Set the left margin value.
void setRight (qreal aValue)
 Set the right margin value.
void setTop (qreal aValue)
 Set the top margin value.
qreal top () const

Detailed Description

This class is used to store margins top, right, bottom and left.


Constructor & Destructor Documentation

BpsMargins::BpsMargins ( const BpsMargins aMargins) [inline]

The copy constructor.

Parameters:
[in]aMarginsThe original margins to clone.
BpsMargins::BpsMargins ( qreal  aValue) [inline]

Convenience constructor where the margin values are provided.

Parameters:
[in]aValueThe default for all 4 margins.
BpsMargins::BpsMargins ( qreal  aTopBottom,
qreal  aLeftRight 
) [inline]

Convenience constructor where the margin values are provided.

Parameters:
[in]aTopBottomThe top and bottom margin values.
[in]aLeftRightThe left and right margin values.
BpsMargins::BpsMargins ( qreal  aTop,
qreal  aRight,
qreal  aBottom,
qreal  aLeft 
) [inline]

Convenience constructor where the margin values are provided.

Parameters:
[in]aTopThe top margin value.
[in]aRightThe right margin value.
[in]aBottomThe bottom margin value.
[in]aLeftThe left margin value.

Member Function Documentation

qreal BpsMargins::bottom ( ) const [inline]
Returns:
The bottom margin value.
bool BpsMargins::isNull ( ) const [inline]
Returns:
True when all margins are = 0.0
bool BpsMargins::isValid ( ) const [inline]
Returns:
True when all margins are >= 0.0
qreal BpsMargins::left ( ) const [inline]
Returns:
The left margin value.
BpsMargins::operator QVariant ( ) const [inline]
Returns:
The margins as QVariant.
BpsMargins & BpsMargins::operator*= ( qreal  aFactor) [inline]

Multiply all margin values by a factor.

Parameters:
[in]aFactorThe factor to multiply by.
Returns:
Reference of the margins object.
BpsMargins & BpsMargins::operator/= ( qreal  aDivisor) [inline]

Divide all margin values by a divisor.

Parameters:
[in]aDivisorThe value to divide by.
Returns:
Reference of the margins object.
qreal & BpsMargins::rbottom ( ) [inline]
Returns:
The bottom margin value as reference.
qreal BpsMargins::right ( ) const [inline]
Returns:
The right margin value.
qreal & BpsMargins::rleft ( ) [inline]
Returns:
The left margin value as reference.
qreal & BpsMargins::rright ( ) [inline]
Returns:
The right margin value as reference.
qreal & BpsMargins::rtop ( ) [inline]
Returns:
The top margin value as reference.
void BpsMargins::setBottom ( qreal  aValue) [inline]

Set the bottom margin value.

Parameters:
[in]aValueThe new value to set.
void BpsMargins::setLeft ( qreal  aValue) [inline]

Set the left margin value.

Parameters:
[in]aValueThe new value to set.
void BpsMargins::setRight ( qreal  aValue) [inline]

Set the right margin value.

Parameters:
[in]aValueThe new value to set.
void BpsMargins::setTop ( qreal  aValue) [inline]

Set the top margin value.

Parameters:
[in]aValueThe new value to set.
qreal BpsMargins::top ( ) const [inline]
Returns:
The top margin value.

The documentation for this class was generated from the following file: