void UIYabause::resizeEvent( QResizeEvent* event ) { if (event->oldSize().width() != event->size().width()) fixAspectRatio(event->size().width()); QMainWindow::resizeEvent( event ); }
void Map::set_height(unsigned height) { if (height >= MIN_MAPSIZE && height <= MAX_MAPSIZE) { height_=height; fixAspectRatio(); } }
void Map::set_width(unsigned width) { if (width >= MIN_MAPSIZE && width <= MAX_MAPSIZE) { width_=width; fixAspectRatio(); } }
void Map::zoom(double factor) { coord2d center = currentExtent_.center(); double w = factor * currentExtent_.width(); double h = factor * currentExtent_.height(); currentExtent_ = Envelope<double>(center.x - 0.5 * w, center.y - 0.5 * h, center.x + 0.5 * w, center.y + 0.5 * h); fixAspectRatio(); }
void Map::resize(unsigned width,unsigned height) { if (width >= MIN_MAPSIZE && width <= MAX_MAPSIZE && height >= MIN_MAPSIZE && height <= MAX_MAPSIZE) { width_=width; height_=height; fixAspectRatio(); } }
int Frontend::qt_metacall(QMetaObject::Call _c, int _id, void **_a) { _id = QMainWindow::qt_metacall(_c, _id, _a); if (_id < 0) return _id; if (_c == QMetaObject::InvokeMetaMethod) { switch (_id) { case 0: fixAspectRatio((*reinterpret_cast< bool(*)>(_a[1]))); break; case 1: enableCropSize((*reinterpret_cast< bool(*)>(_a[1]))); break; default: ; } _id -= 2; } return _id; }
void Map::zoom_to_box(box2d<double> const& box) { current_extent_=box; fixAspectRatio(); }
void Map::zoomToBox(const Envelope<double> &box) { currentExtent_=box; fixAspectRatio(); }