[Marble-commits] KDE/kdeedu/marble/src/lib
Torsten Rahn
tackat at kde.org
Mon Dec 27 21:47:55 CET 2010
SVN commit 1209659 by rahn:
- More visual polish for the Map Creation Wizard
- Ensure that the preview for the Static Url case fits the available
space.
M +3 -1 MapWizard.cpp
M +145 -22 MapWizard.ui
--- trunk/KDE/kdeedu/marble/src/lib/MapWizard.cpp #1209658:1209659
@@ -490,9 +490,11 @@
{
QPixmap levelZero;
levelZero.loadFromData( d->levelZero );
+ if ( !d->levelZero.isNull() ) {
+ levelZero = levelZero.scaled( d->uiWidget.labelStaticUrlTest->size(), Qt::KeepAspectRatio, Qt::SmoothTransformation );
d->uiWidget.labelStaticUrlTest->setPixmap( levelZero );
- d->uiWidget.labelStaticUrlTest->resize( levelZero.width(), levelZero.height() );
}
+ }
suggestPreviewImage();
}
--- trunk/KDE/kdeedu/marble/src/lib/MapWizard.ui #1209658:1209659
@@ -116,7 +116,7 @@
</property>
</widget>
</item>
- <item row="0" column="1">
+ <item row="0" column="1" colspan="2">
<widget class="QComboBox" name="comboBoxWmsServer">
<item>
<property name="text">
@@ -156,7 +156,7 @@
</property>
</widget>
</item>
- <item row="2" column="1">
+ <item row="2" column="1" colspan="2">
<widget class="QComboBox" name="comboBoxWmsMap"/>
</item>
</layout>
@@ -175,8 +175,7 @@
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Worldmap Bitmap</span></p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; font-weight:600;"></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Please choose the location of a world map that is stored in a single image file (JPG, PNG, etc.). It needs to be provided in <a href="http://en.wikipedia.org/wiki/Equirectangular_projection"><span style=" text-decoration: underline; color:#0057ae;">Equirectangular projection</span></a>, so the shape should look like this (size ratio: 2:1):</p>
-<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><img src=":/data/svg/worldmap.svg" width="150" /></p>
-<p style="-qt-paragraph-type:empty; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p></body></html></string>
+<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><img src=":/data/svg/worldmap.svg" width="150" /></p></body></html></string>
</property>
<property name="wordWrap">
<bool>true</bool>
@@ -184,6 +183,22 @@
</widget>
</item>
<item>
+ <spacer name="verticalSpacer_8">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>5</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="labelSource">
@@ -233,8 +248,7 @@
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
-<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Optionally you can provide a file that displays a map key:</p>
-<p style="-qt-paragraph-type:empty; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p></body></html></string>
+<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Optionally you can provide a file that displays a map key:</p></body></html></string>
</property>
<property name="wordWrap">
<bool>true</bool>
@@ -242,6 +256,22 @@
</widget>
</item>
<item>
+ <spacer name="verticalSpacer_7">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>5</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QLabel" name="labelLegend">
@@ -290,8 +320,7 @@
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><span style=" font-weight:600;">Static server URL</span></p>
-<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Please enter the Url of a server that provides map data. Use {x}, {y} and {zoomLevel} for the tile positions. Then press the &quot;Test the Server&quot; button to display a sample tile.</p>
-<p style="-qt-paragraph-type:empty; margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p></body></html></string>
+<p style=" margin-top:12px; margin-bottom:12px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Please enter the Url of a server that provides map data. Use {x}, {y} and {zoomLevel} for the tile positions. Then press the &quot;Test the Server&quot; button to display a sample tile.</p></body></html></string>
</property>
<property name="wordWrap">
<bool>true</bool>
@@ -299,7 +328,23 @@
</widget>
</item>
<item>
- <layout class="QGridLayout" name="gridLayout">
+ <spacer name="verticalSpacer_6">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>5</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <layout class="QFormLayout" name="formLayout_4">
<item row="0" column="0">
<widget class="QLabel" name="labelStaticUrlServer">
<property name="text">
@@ -307,7 +352,7 @@
</property>
</widget>
</item>
- <item row="0" column="1" colspan="2">
+ <item row="0" column="1">
<widget class="QLineEdit" name="lineEditStaticUrlServer">
<property name="toolTip">
<string>Url of the server that provides map tiles. An example would be: http://tile.openstreetmap.org/{zoomLevel}/{y}/{x}.png</string>
@@ -324,18 +369,96 @@
</property>
</widget>
</item>
- <item row="1" column="1" colspan="2">
+ <item row="1" column="1">
+ <layout class="QHBoxLayout" name="horizontalLayout_6">
+ <item>
<widget class="QComboBox" name="comboBoxStaticUrlFormat">
<property name="toolTip">
<string>Image format of the tiles.</string>
</property>
</widget>
</item>
+ <item>
+ <spacer name="horizontalSpacer_4">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>40</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
</layout>
</item>
+ </layout>
+ </item>
<item>
+ <spacer name="verticalSpacer_5">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>5</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
+ <widget class="QLabel" name="label_8">
+ <property name="text">
+ <string>Preview:</string>
+ </property>
+ </widget>
+ </item>
+ <item>
<layout class="QHBoxLayout" name="horizontalLayout_4">
<item>
+ <widget class="QLabel" name="labelStaticUrlTest">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Fixed" vsizetype="Fixed">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="minimumSize">
+ <size>
+ <width>92</width>
+ <height>92</height>
+ </size>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ <property name="alignment">
+ <set>Qt::AlignCenter</set>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="horizontalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>5</width>
+ <height>20</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ <item>
<widget class="QPushButton" name="pushButtonStaticUrlTest">
<property name="text">
<string>Test the Server</string>
@@ -358,20 +481,20 @@
</layout>
</item>
<item>
- <widget class="QLabel" name="labelStaticUrlTest">
- <property name="minimumSize">
+ <spacer name="verticalSpacer_4">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeType">
+ <enum>QSizePolicy::Fixed</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
<size>
- <width>128</width>
- <height>128</height>
+ <width>20</width>
+ <height>5</height>
</size>
</property>
- <property name="text">
- <string/>
- </property>
- <property name="alignment">
- <set>Qt::AlignCenter</set>
- </property>
- </widget>
+ </spacer>
</item>
<item>
<widget class="QLabel" name="label_5">
More information about the Marble-commits
mailing list