void LayerManager::setViewAndZoomIn(const QList<QPointF> coordinates) { while (containsAll(coordinates)) { setMiddle(coordinates); zoomIn(); } if (!containsAll(coordinates)) { zoomOut(); } mapcontrol->update(); }
// Overrides. virtual Type::boolean equals(javolution::lang::Object const& obj) const { javolution::util::Collection<E> that = Type::dynamic_handle_cast<javolution::util::Collection_API<E> >(obj); if (that == Type::Null) return false; if (this->size() != that->size()) return false; Type::boolean thisIsList = dynamic_cast<const List_API<E>* >(this) != 0; Type::boolean thatIsList = Type::dynamic_handle_cast<List_API<E> >(that) != 0; if (thisIsList && thatIsList) { // They should have the same order. javolution::util::Iterator<E> i = this->iterator(); javolution::util::Iterator<E> j = that->iterator(); while (i->hasNext()) { E thisElement = i->next(); E thatElement = j->next(); if (thisElement == Type::Null) { if (thatElement != Type::Null) return false; } else { if (!thisElement->equals(thatElement)) return false; } } return true; } else if (!thisIsList && !thatIsList) { // None is a list. return containsAll(javolution::util::Collection<E>(that)); // We know they have same size. } else { // One of the collection is a list but not the other. return false; } }