map is displayed in FullScreen mode
authorpavelpa <pavelpa@localhost>
Thu, 21 Jan 2010 08:49:21 +0000 (08:49 +0000)
committerpavelpa <pavelpa@localhost>
Thu, 21 Jan 2010 08:49:21 +0000 (08:49 +0000)
src/gui/mapwindow.cpp
src/gui/mapwindow.ui

index 939989b..2e3efa3 100644 (file)
@@ -4,9 +4,16 @@ MapWindow::MapWindow(const QPixmap &aImage, const QString &aName, QWidget *aPare
     : QDialog(aParent)
 {
     setupUi(this);
+#ifdef MAEMO
+    showFullScreen();
+    //map->setScaledContents(true);
+    //map->setPixmap(aImage.scaled(QSize(800,480),Qt::KeepAspectRatioByExpanding,Qt::SmoothTransformation));
+    map->setPixmap(aImage.scaled(QSize(640,480),Qt::KeepAspectRatioByExpanding,Qt::SmoothTransformation));
+#else
+    map->setPixmap(aImage,Qt::KeepAspectRatioByExpanding,Qt::SmoothTransformation);
+#endif
     setMouseTracking(true); // to receive mouse events
     setWindowTitle(aName);
-    map->setPixmap(aImage);
 }
 
 // it is enough to handle mouseReleaseEvent, instead of
index 38e5f3d..36bac1b 100644 (file)
@@ -9,12 +9,24 @@
     <height>179</height>
    </rect>
   </property>
+  <property name="sizePolicy" >
+   <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
+    <horstretch>0</horstretch>
+    <verstretch>0</verstretch>
+   </sizepolicy>
+  </property>
   <property name="windowTitle" >
    <string>Dialog</string>
   </property>
   <layout class="QGridLayout" name="gridLayout" >
    <item row="0" column="0" >
     <widget class="QLabel" name="map" >
+     <property name="sizePolicy" >
+      <sizepolicy vsizetype="Expanding" hsizetype="Expanding" >
+       <horstretch>0</horstretch>
+       <verstretch>0</verstretch>
+      </sizepolicy>
+     </property>
      <property name="text" >
       <string>Map goes here</string>
      </property>
@@ -24,8 +36,6 @@
     </widget>
    </item>
   </layout>
-  <zorder>map</zorder>
-  <zorder>toolButton</zorder>
  </widget>
  <resources/>
  <connections/>