Exemple #1
0
void UIYabause::resizeEvent( QResizeEvent* event )
{
	if (event->oldSize().width() != event->size().width())
		fixAspectRatio(event->size().width());

	QMainWindow::resizeEvent( event );
}
Exemple #2
0
void Map::set_height(unsigned height)
{
    if (height >= MIN_MAPSIZE && height <= MAX_MAPSIZE)
    {
        height_=height;
        fixAspectRatio();
    }
}
Exemple #3
0
void Map::set_width(unsigned width)
{
    if (width >= MIN_MAPSIZE && width <= MAX_MAPSIZE)
    {
        width_=width;
        fixAspectRatio();
    }
}
Exemple #4
0
    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();
    }
Exemple #5
0
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();
    }
}
Exemple #6
0
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;
}
Exemple #7
0
void Map::zoom_to_box(box2d<double> const& box)
{
    current_extent_=box;
    fixAspectRatio();
}
Exemple #8
0
 void Map::zoomToBox(const Envelope<double> &box)
 {
     currentExtent_=box;
     fixAspectRatio();
 }