Logo Search packages:      
Sourcecode: qt4-x11 version File versions

bool QRectF::contains ( const QRectF rectangle  )  const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. Returns true if the given rectangle is inside this rectangle; otherwise returns false.

Definition at line 1818 of file qrect.cpp.

References h, isNull(), normalized(), w, xp, and yp.

    if (isNull() || r.isNull())
        return false;
    QRectF r1 = normalized();
    QRectF r2 = r.normalized();
    return r2.xp >= r1.xp && r2.xp + r2.w <= r1.xp + r1.w
        && r2.yp >= r1.yp && r2.yp + r2.h <= r1.yp + r1.h;

Generated by  Doxygen 1.6.0   Back to index