The QMargins class defines the four margins of a rectangle. More...
Header: | #include <QMargins> |
qmake: | QT += core |
Since: | Qt 4.6 |
QMargins() | |
QMargins(int left, int top, int right, int bottom) | |
int | bottom() const |
bool | isNull() const |
int | left() const |
int | right() const |
void | setBottom(int bottom) |
void | setLeft(int left) |
void | setRight(int right) |
void | setTop(int Top) |
int | top() const |
QMargins & | operator*=(int factor) |
QMargins & | operator*=(qreal factor) |
QMargins & | operator+=(const QMargins &margins) |
QMargins & | operator+=(int addend) |
QMargins & | operator-=(const QMargins &margins) |
QMargins & | operator-=(int subtrahend) |
QMargins & | operator/=(int divisor) |
QMargins & | operator/=(qreal divisor) |
bool | operator!=(const QMargins &m1, const QMargins &m2) |
QMargins | operator*(const QMargins &margins, int factor) |
QMargins | operator*(int factor, const QMargins &margins) |
QMargins | operator*(const QMargins &margins, qreal factor) |
QMargins | operator*(qreal factor, const QMargins &margins) |
QMargins | operator+(const QMargins &m1, const QMargins &m2) |
QMargins | operator+(const QMargins &lhs, int rhs) |
QMargins | operator+(int lhs, const QMargins &rhs) |
QMargins | operator+(const QMargins &margins) |
QMargins | operator-(const QMargins &m1, const QMargins &m2) |
QMargins | operator-(const QMargins &lhs, int rhs) |
QMargins | operator-(const QMargins &margins) |
QMargins | operator/(const QMargins &margins, int divisor) |
QMargins | operator/(const QMargins &margins, qreal divisor) |
QDataStream & | operator<<(QDataStream &stream, const QMargins &m) |
bool | operator==(const QMargins &m1, const QMargins &m2) |
QDataStream & | operator>>(QDataStream &stream, QMargins &m) |
The QMargins class defines the four margins of a rectangle.
QMargin defines a set of four margins; left, top, right and bottom, that describe the size of the borders surrounding a rectangle.
The isNull() function returns true
only if all margins are set to zero.
QMargin objects can be streamed as well as compared.
Constructs a margins object with all margins set to 0.
See also isNull().
Constructs margins with the given left, top, right, bottom
See also setLeft(), setRight(), setTop(), and setBottom().
Returns the bottom margin.
See also setBottom().
Returns true
if all margins are is 0; otherwise returns false.
Returns the left margin.
See also setLeft().
Returns the right margin.
See also setRight().
Sets the bottom margin to bottom.
See also bottom().
Sets the left margin to left.
See also left().
Sets the right margin to right.
See also right().
Sets the Top margin to Top.
See also top().
Returns the top margin.
See also setTop().
Multiplies each component of this object by factor and returns a reference to it.
This function was introduced in Qt 5.1.
See also operator/=().
This is an overloaded function.
Multiplies each component of this object by factor and returns a reference to it.
This function was introduced in Qt 5.1.
See also operator/=().
Add each component of margins to the respective component of this object and returns a reference to it.
This function was introduced in Qt 5.1.
See also operator-=().
This is an overloaded function.
Adds the addend to each component of this object and returns a reference to it.
See also operator-=().
Subtract each component of margins from the respective component of this object and returns a reference to it.
This function was introduced in Qt 5.1.
See also operator+=().
This is an overloaded function.
Subtracts the subtrahend from each component of this object and returns a reference to it.
See also operator+=().
Divides each component of this object by divisor and returns a reference to it.
This function was introduced in Qt 5.1.
See also operator*=().
This is an overloaded function.
This function was introduced in Qt 5.1.
See also operator*=().
Returns true
if m1 and m2 are different; otherwise returns false
.
Returns a QMargins object that is formed by multiplying each component of the given margins by factor.
This function was introduced in Qt 5.1.
See also QMargins::operator*=() and QMargins::operator/=().
This is an overloaded function.
Returns a QMargins object that is formed by multiplying each component of the given margins by factor.
This function was introduced in Qt 5.1.
See also QMargins::operator*=() and QMargins::operator/=().
This is an overloaded function.
Returns a QMargins object that is formed by multiplying each component of the given margins by factor.
This function was introduced in Qt 5.1.
See also QMargins::operator*=() and QMargins::operator/=().
This is an overloaded function.
Returns a QMargins object that is formed by multiplying each component of the given margins by factor.
This function was introduced in Qt 5.1.
See also QMargins::operator*=() and QMargins::operator/=().
Returns a QMargins object that is the sum of the given margins, m1 and m2; each component is added separately.
This function was introduced in Qt 5.1.
See also QMargins::operator+=() and QMargins::operator-=().
Returns a QMargins object that is formed by adding rhs to lhs.
This function was introduced in Qt 5.3.
See also QMargins::operator+=() and QMargins::operator-=().
Returns a QMargins object that is formed by adding lhs to rhs.
This function was introduced in Qt 5.3.
See also QMargins::operator+=() and QMargins::operator-=().
Returns a QMargin object that is formed from all components of margins.
This function was introduced in Qt 5.3.
Returns a QMargins object that is formed by subtracting m2 from m1; each component is subtracted separately.
This function was introduced in Qt 5.1.
See also QMargins::operator+=() and QMargins::operator-=().
Returns a QMargins object that is formed by subtracting rhs from lhs.
This function was introduced in Qt 5.3.
See also QMargins::operator+=() and QMargins::operator-=().
Returns a QMargin object that is formed by negating all components of margins.
This function was introduced in Qt 5.1.
Returns a QMargins object that is formed by dividing the components of the given margins by the given divisor.
This function was introduced in Qt 5.1.
See also QMargins::operator*=() and QMargins::operator/=().
This is an overloaded function.
Returns a QMargins object that is formed by dividing the components of the given margins by the given divisor.
This function was introduced in Qt 5.1.
See also QMargins::operator*=() and QMargins::operator/=().
Writes margin m to the given stream and returns a reference to the stream.
See also Serializing Qt Data Types.
Returns true
if m1 and m2 are equal; otherwise returns false
.
Reads a margin from the given stream into margin m and returns a reference to the stream.
See also Serializing Qt Data Types.