source: src/gui/mapwindow.cpp @ 2104023

qt5
Last change on this file since 2104023 was 927eac4, checked in by pavelpa <pavelpa@…>, 12 years ago

N810 changes: maximized 'map' dialog

  • Property mode set to 100644
File size: 964 bytes
RevLine 
[59c6cfe]1#include "mapwindow.h"
2
[9afc0ee]3MapWindow::MapWindow(const QPixmap &aImage, const QString &aName, QWidget *aParent)
[59c6cfe]4    : QDialog(aParent)
5{
6    setupUi(this);
[be9c036]7#ifdef MAEMO
8    showFullScreen();
9    //map->setScaledContents(true);
10    //map->setPixmap(aImage.scaled(QSize(800,480),Qt::KeepAspectRatioByExpanding,Qt::SmoothTransformation));
11    map->setPixmap(aImage.scaled(QSize(640,480),Qt::KeepAspectRatioByExpanding,Qt::SmoothTransformation));
[927eac4]12#elif N810
13    showMaximized();
14    map->setPixmap(aImage.scaled(QSize(400,300),Qt::KeepAspectRatioByExpanding,Qt::SmoothTransformation));
[be9c036]15#else
[ce75316]16    map->setPixmap(aImage);
[be9c036]17#endif
[59c6cfe]18    setMouseTracking(true); // to receive mouse events
[9afc0ee]19    setWindowTitle(aName);
[59c6cfe]20}
21
[02c1e09]22// it is enough to handle mouseReleaseEvent, instead of
23// getting/creating mouseClikEvent, since the whole window
24// is occupied by only-one widget/label (image/map)
25void MapWindow::mouseReleaseEvent(QMouseEvent *event)
[59c6cfe]26{
[02c1e09]27    Q_UNUSED(event);
[59c6cfe]28    close();
29}
30
Note: See TracBrowser for help on using the repository browser.