Qt 4.8
|
The QMargins class defines the four margins of a rectangle. More...
#include <qmargins.h>
Public Functions | |
int | bottom () const |
Returns the bottom margin. More... | |
bool | isNull () const |
Returns true if all margins are is 0; otherwise returns false. More... | |
int | left () const |
Returns the left margin. More... | |
QMargins () | |
Constructs a margins object with all margins set to 0. More... | |
QMargins (int left, int top, int right, int bottom) | |
Constructs margins with the given left, top, right, bottom. More... | |
int | right () const |
Returns the right margin. More... | |
void | setBottom (int bottom) |
Sets the bottom margin to bottom. More... | |
void | setLeft (int left) |
Sets the left margin to left. More... | |
void | setRight (int right) |
Sets the right margin to right. More... | |
void | setTop (int top) |
Sets the Top margin to Top. More... | |
int | top () const |
Returns the top margin. More... | |
Properties | |
int | m_bottom |
int | m_left |
int | m_right |
int | m_top |
Friends | |
bool | operator!= (const QMargins &, const QMargins &) |
Returns true if m1 and m2 are different; otherwise returns false. More... | |
bool | operator== (const QMargins &, const QMargins &) |
Returns true if m1 and m2 are equal; otherwise returns false. More... | |
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.
Definition at line 53 of file qmargins.h.
|
inline |
Constructs a margins object with all margins set to 0.
Definition at line 87 of file qmargins.h.
|
inline |
Constructs margins with the given left, top, right, bottom.
Definition at line 90 of file qmargins.h.
|
inline |
Returns the bottom margin.
Definition at line 105 of file qmargins.h.
Referenced by operator<<(), qDrawBorderPixmap(), QLayout::setContentsMargins(), QWidget::setContentsMargins(), QLineEdit::setTextMargins(), and QAbstractScrollArea::setViewportMargins().
|
inline |
Returns true if all margins are is 0; otherwise returns false.
Definition at line 93 of file qmargins.h.
|
inline |
Returns the left margin.
Definition at line 96 of file qmargins.h.
Referenced by operator<<(), qDrawBorderPixmap(), QLayout::setContentsMargins(), QWidget::setContentsMargins(), QLineEdit::setTextMargins(), and QAbstractScrollArea::setViewportMargins().
|
inline |
Returns the right margin.
Definition at line 102 of file qmargins.h.
Referenced by operator<<(), qDrawBorderPixmap(), QLayout::setContentsMargins(), QWidget::setContentsMargins(), QLineEdit::setTextMargins(), and QAbstractScrollArea::setViewportMargins().
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Returns the top margin.
Definition at line 99 of file qmargins.h.
Referenced by operator<<(), qDrawBorderPixmap(), QLayout::setContentsMargins(), QWidget::setContentsMargins(), QLineEdit::setTextMargins(), and QAbstractScrollArea::setViewportMargins().
Returns true if m1 and m2 are different; otherwise returns false.
Definition at line 130 of file qmargins.h.
Returns true if m1 and m2 are equal; otherwise returns false.
Definition at line 121 of file qmargins.h.
|
private |
Definition at line 75 of file qmargins.h.
Referenced by bottom(), isNull(), operator!=(), operator==(), QMargins(), and setBottom().
|
private |
Definition at line 72 of file qmargins.h.
Referenced by isNull(), left(), operator!=(), operator==(), QMargins(), and setLeft().
|
private |
Definition at line 74 of file qmargins.h.
Referenced by isNull(), operator!=(), operator==(), QMargins(), right(), and setRight().
|
private |
Definition at line 73 of file qmargins.h.
Referenced by isNull(), operator!=(), operator==(), QMargins(), setTop(), and top().