source: src/gui/mapwindow.cpp @ 06570e9

qt5
Last change on this file since 06570e9 was ce75316, checked in by pavelpa <pavelpa@…>, 12 years ago

compilation error "linux" fix

  • caused by previous commit
  • Property mode set to 100644
File size: 825 bytes
Line 
1#include "mapwindow.h"
2
3MapWindow::MapWindow(const QPixmap &aImage, const QString &aName, QWidget *aParent)
4    : QDialog(aParent)
5{
6    setupUi(this);
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));
12#else
13    map->setPixmap(aImage);
14#endif
15    setMouseTracking(true); // to receive mouse events
16    setWindowTitle(aName);
17}
18
19// it is enough to handle mouseReleaseEvent, instead of
20// getting/creating mouseClikEvent, since the whole window
21// is occupied by only-one widget/label (image/map)
22void MapWindow::mouseReleaseEvent(QMouseEvent *event)
23{
24    Q_UNUSED(event);
25    close();
26}
27
Note: See TracBrowser for help on using the repository browser.