示例#1
0
/*!
    Returns whether the geo rectangle \a rectangle is contained within this
    geo rectangle.
*/
bool QGeoRectangle::contains(const QGeoRectangle &rectangle) const
{
    Q_D(const QGeoRectangle);

    return (d->contains(rectangle.topLeft())
            && d->contains(rectangle.topRight())
            && d->contains(rectangle.bottomLeft())
            && d->contains(rectangle.bottomRight()));
}
/*
    This property holds the bottom left coordinate of this georectangle.
*/
void GeoRectangleValueType::setBottomLeft(const QGeoCoordinate &coordinate)
{
    QGeoRectangle r = v;

    if (r.bottomLeft() == coordinate)
        return;

    r.setBottomLeft(coordinate);
    v = r;
}