コード例 #1
0
ファイル: qgeorectangle.cpp プロジェクト: kobolabs/qtlocation
/*!
    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()));
}
コード例 #2
0
/*
    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;
}