QMargins Class Reference

QMargins Class Reference

#include <qmargins.h>

Class Description

Definition at line 53 of file qmargins.h.

Public Member Functions

 QMargins ()
 
 QMargins (int left, int top, int right, int bottom)
 
bool isNull () const
 
int left () const
 
int top () const
 
int right () const
 
int bottom () const
 
void setLeft (int left)
 
void setTop (int top)
 
void setRight (int right)
 
void setBottom (int bottom)
 

Friends

bool operator== (const QMargins &, const QMargins &)
 
bool operator!= (const QMargins &, const QMargins &)
 

Constructor & Destructor Documentation

QMargins ( )
inline

Definition at line 87 of file qmargins.h.

88 { m_top = m_bottom = m_left = m_right = 0; }
QMargins ( int  left,
int  top,
int  right,
int  bottom 
)
inline

Definition at line 90 of file qmargins.h.

91  : m_left(aleft), m_top(atop), m_right(aright), m_bottom(abottom) {}

Member Function Documentation

bool isNull ( ) const
inline

Definition at line 93 of file qmargins.h.

94 { return m_left==0 && m_top==0 && m_right==0 && m_bottom==0; }
int left ( ) const
inline

Definition at line 96 of file qmargins.h.

97 { return m_left; }
int top ( ) const
inline

Definition at line 99 of file qmargins.h.

100 { return m_top; }
int right ( ) const
inline

Definition at line 102 of file qmargins.h.

103 { return m_right; }
int bottom ( ) const
inline

Definition at line 105 of file qmargins.h.

106 { return m_bottom; }
void setLeft ( int  left)
inline

Definition at line 109 of file qmargins.h.

110 { m_left = aleft; }
void setTop ( int  top)
inline

Definition at line 112 of file qmargins.h.

113 { m_top = atop; }
void setRight ( int  right)
inline

Definition at line 115 of file qmargins.h.

116 { m_right = aright; }
void setBottom ( int  bottom)
inline

Definition at line 118 of file qmargins.h.

119 { m_bottom = abottom; }

Friends And Related Function Documentation

bool operator== ( const QMargins m1,
const QMargins m2 
)
friend

Definition at line 121 of file qmargins.h.

122 {
123  return
124  m1.m_left == m2.m_left &&
125  m1.m_top == m2.m_top &&
126  m1.m_right == m2.m_right &&
127  m1.m_bottom == m2.m_bottom;
128 }
bool operator!= ( const QMargins m1,
const QMargins m2 
)
friend

Definition at line 130 of file qmargins.h.

131 {
132  return
133  m1.m_left != m2.m_left ||
134  m1.m_top != m2.m_top ||
135  m1.m_right != m2.m_right ||
136  m1.m_bottom != m2.m_bottom;
137 }

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