66 void setHeight(
int h);
72 QSize expandedTo(
const QSize &)
const;
73 QSize boundedTo(
const QSize &)
const;
79 QSize &operator-=(
const QSize &);
80 QSize &operator*=(qreal
c);
81 QSize &operator/=(qreal c);
83 friend inline bool operator==(
const QSize &,
const QSize &);
84 friend inline bool operator!=(
const QSize &,
const QSize &);
85 friend inline const QSize
operator+(
const QSize &,
const QSize &);
86 friend inline const QSize
operator-(
const QSize &,
const QSize &);
87 friend inline const QSize
operator*(
const QSize &, qreal);
88 friend inline const QSize
operator*(qreal,
const QSize &);
89 friend inline const QSize
operator/(
const QSize &, qreal);
101 #ifndef QT_NO_DATASTREAM
118 {
return wd==0 && ht==0; }
121 {
return wd<1 || ht<1; }
124 {
return wd>=0 && ht>=0; }
148 { wd+=s.wd; ht+=s.ht;
return *
this; }
151 { wd-=s.wd; ht-=s.ht;
return *
this; }
154 { wd = qRound(wd*c); ht = qRound(ht*c);
return *
this; }
157 {
return s1.wd == s2.wd && s1.ht == s2.ht; }
160 {
return s1.wd != s2.wd || s1.ht != s2.ht; }
163 {
return QSize(s1.wd+s2.wd, s1.ht+s2.ht); }
166 {
return QSize(s1.wd-s2.wd, s1.ht-s2.ht); }
169 {
return QSize(qRound(s.wd*c), qRound(s.ht*c)); }
172 {
return QSize(qRound(s.wd*c), qRound(s.ht*c)); }
176 Q_ASSERT(!qFuzzyIsNull(c));
177 wd = qRound(wd/c); ht = qRound(ht/c);
183 Q_ASSERT(!qFuzzyIsNull(c));
184 return QSize(qRound(s.wd/c), qRound(s.ht/c));
189 return QSize(qMax(wd,otherSize.wd), qMax(ht,otherSize.ht));
194 return QSize(qMin(wd,otherSize.wd), qMin(ht,otherSize.ht));
197 #ifndef QT_NO_DEBUG_STREAM
210 bool isEmpty()
const;
211 bool isValid()
const;
215 void setWidth(qreal w);
216 void setHeight(qreal h);
231 QSizeF &operator/=(qreal c);
241 inline QSize toSize()
const;
254 #ifndef QT_NO_DATASTREAM
276 {
return qIsNull(wd) && qIsNull(ht); }
279 {
return wd <= 0. || ht <= 0.; }
282 {
return wd >= 0. && ht >= 0.; }
306 { wd += s.wd; ht += s.ht;
return *
this; }
309 { wd -= s.wd; ht -= s.ht;
return *
this; }
312 { wd *=
c; ht *=
c;
return *
this; }
321 {
return QSizeF(s1.wd+s2.wd, s1.ht+s2.ht); }
324 {
return QSizeF(s1.wd-s2.wd, s1.ht-s2.ht); }
327 {
return QSizeF(s.wd*c, s.ht*c); }
330 {
return QSizeF(s.wd*c, s.ht*c); }
334 Q_ASSERT(!qFuzzyIsNull(c));
335 wd = wd/
c; ht = ht/
c;
341 Q_ASSERT(!qFuzzyIsNull(c));
342 return QSizeF(s.wd/c, s.ht/c);
347 return QSizeF(qMax(wd,otherSize.wd), qMax(ht,otherSize.ht));
352 return QSizeF(qMin(wd,otherSize.wd), qMin(ht,otherSize.ht));
357 return QSize(qRound(wd), qRound(ht));
360 #ifndef QT_NO_DEBUG_STREAM
QSizeF boundedTo(const QSizeF &) const
const QSize operator/(const QSize &s, qreal c)
QSizeF & operator*=(qreal c)
QByteArray & operator+=(QByteArray &a, const QStringBuilder< A, B > &b)
QSizeF & operator-=(const QSizeF &)
QSize & operator+=(const QSize &)
QSizeF & operator/=(qreal c)
QSizeF expandedTo(const QSizeF &) const
QSize & operator-=(const QSize &)
bool operator!=(const QSize &s1, const QSize &s2)
#define QT_BEGIN_NAMESPACE
QSize & operator/=(qreal c)
QSize boundedTo(const QSize &) const
GLenum GLsizei GLsizei height
QSizeF & operator+=(const QSizeF &)
QSize & operator*=(qreal c)
const QSize operator-(const QSize &s1, const QSize &s2)
Q_DECLARE_TYPEINFO(QSize, Q_MOVABLE_TYPE)
int int int int int int h
bool operator==(const QSize &s1, const QSize &s2)
Q_CORE_EXPORT QDataStream & operator>>(QDataStream &, QSize &)
bool qFuzzyCompare(const QMatrix &m1, const QMatrix &m2)
void scale(int w, int h, Qt::AspectRatioMode mode)
QSize expandedTo(const QSize &) const
GLubyte GLubyte GLubyte GLubyte w
const QSize operator+(const QSize &s1, const QSize &s2)
const QSize operator*(const QSize &s, qreal c)
GLenum GLenum GLenum GLenum GLenum scale
Q_CORE_EXPORT QDataStream & operator<<(QDataStream &, const QSize &)
void scale(qreal w, qreal h, Qt::AspectRatioMode mode)
GLsizei GLboolean transpose