New Easter eggs which might actually be useful... (#7714)

Three new easter eggs:

world : Add a world map to your canvas - it is the same world map as used by the CRS chooser

contributors : Adds the contributors json (used to be in docs, now moved to resources/data)to the map canvas so you can quickly see the locations of QGIS developers in QGIS

hackfests : Adds qgis_hackfests.json (in resources/data) to the canvas so you can quickly see the locations of all historical QGIS hackfests. Note the attribute table has other interesting data too.
This commit is contained in:
Tim Sutton 2018-08-27 10:44:37 +03:00 committed by GitHub
parent 0ad341a017
commit 9710c185d3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 799 additions and 1 deletions

View File

@ -0,0 +1,345 @@
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis minScale="1e+8" readOnly="0" version="3.3.0-Master" simplifyDrawingTol="1" simplifyDrawingHints="0" simplifyLocal="1" simplifyMaxScale="1" maxScale="0" labelsEnabled="0" hasScaleBasedVisibilityFlag="0" simplifyAlgorithm="0">
<renderer-v2 type="singleSymbol" forceraster="0" symbollevels="0" enableorderby="0">
<symbols>
<symbol clip_to_extent="1" name="0" type="marker" alpha="1">
<layer pass="0" locked="0" class="SimpleMarker" enabled="1">
<prop v="0" k="angle"/>
<prop v="55,126,184,255" k="color"/>
<prop v="1" k="horizontal_anchor_point"/>
<prop v="bevel" k="joinstyle"/>
<prop v="circle" k="name"/>
<prop v="0,0" k="offset"/>
<prop v="3x:0,0,0,0,0,0" k="offset_map_unit_scale"/>
<prop v="MM" k="offset_unit"/>
<prop v="35,35,35,255" k="outline_color"/>
<prop v="no" k="outline_style"/>
<prop v="0" k="outline_width"/>
<prop v="3x:0,0,0,0,0,0" k="outline_width_map_unit_scale"/>
<prop v="MM" k="outline_width_unit"/>
<prop v="diameter" k="scale_method"/>
<prop v="10" k="size"/>
<prop v="3x:0,0,0,0,0,0" k="size_map_unit_scale"/>
<prop v="MM" k="size_unit"/>
<prop v="1" k="vertical_anchor_point"/>
<data_defined_properties>
<Option type="Map">
<Option name="name" type="QString" value=""/>
<Option name="properties" type="Map">
<Option name="size" type="Map">
<Option name="active" type="bool" value="false"/>
<Option name="type" type="int" value="1"/>
<Option name="val" type="QString" value=""/>
</Option>
</Option>
<Option name="type" type="QString" value="collection"/>
</Option>
</data_defined_properties>
</layer>
<layer pass="0" locked="0" class="SimpleMarker" enabled="1">
<prop v="0" k="angle"/>
<prop v="255,149,0,255" k="color"/>
<prop v="1" k="horizontal_anchor_point"/>
<prop v="bevel" k="joinstyle"/>
<prop v="circle" k="name"/>
<prop v="0,0" k="offset"/>
<prop v="3x:0,0,0,0,0,0" k="offset_map_unit_scale"/>
<prop v="MM" k="offset_unit"/>
<prop v="35,35,35,255" k="outline_color"/>
<prop v="no" k="outline_style"/>
<prop v="0" k="outline_width"/>
<prop v="3x:0,0,0,0,0,0" k="outline_width_map_unit_scale"/>
<prop v="MM" k="outline_width_unit"/>
<prop v="diameter" k="scale_method"/>
<prop v="8" k="size"/>
<prop v="3x:0,0,0,0,0,0" k="size_map_unit_scale"/>
<prop v="MM" k="size_unit"/>
<prop v="1" k="vertical_anchor_point"/>
<data_defined_properties>
<Option type="Map">
<Option name="name" type="QString" value=""/>
<Option name="properties" type="Map">
<Option name="fillColor" type="Map">
<Option name="active" type="bool" value="true"/>
<Option name="expression" type="QString" value="ramp_color('Viridis', 60 / second(now()))"/>
<Option name="type" type="int" value="3"/>
</Option>
<Option name="size" type="Map">
<Option name="active" type="bool" value="false"/>
<Option name="type" type="int" value="1"/>
<Option name="val" type="QString" value=""/>
</Option>
</Option>
<Option name="type" type="QString" value="collection"/>
</Option>
</data_defined_properties>
</layer>
<layer pass="0" locked="0" class="SimpleMarker" enabled="1">
<prop v="0" k="angle"/>
<prop v="255,0,0,255" k="color"/>
<prop v="1" k="horizontal_anchor_point"/>
<prop v="bevel" k="joinstyle"/>
<prop v="cross" k="name"/>
<prop v="0,0" k="offset"/>
<prop v="3x:0,0,0,0,0,0" k="offset_map_unit_scale"/>
<prop v="MM" k="offset_unit"/>
<prop v="55,126,184,255" k="outline_color"/>
<prop v="solid" k="outline_style"/>
<prop v="2" k="outline_width"/>
<prop v="3x:0,0,0,0,0,0" k="outline_width_map_unit_scale"/>
<prop v="MM" k="outline_width_unit"/>
<prop v="diameter" k="scale_method"/>
<prop v="5" k="size"/>
<prop v="3x:0,0,0,0,0,0" k="size_map_unit_scale"/>
<prop v="MM" k="size_unit"/>
<prop v="1" k="vertical_anchor_point"/>
<data_defined_properties>
<Option type="Map">
<Option name="name" type="QString" value=""/>
<Option name="properties" type="Map">
<Option name="angle" type="Map">
<Option name="active" type="bool" value="true"/>
<Option name="expression" type="QString" value="second(now()) * 6"/>
<Option name="type" type="int" value="3"/>
</Option>
</Option>
<Option name="type" type="QString" value="collection"/>
</Option>
</data_defined_properties>
</layer>
</symbol>
</symbols>
<rotation/>
<sizescale/>
<effect type="effectStack" enabled="1">
<effect type="dropShadow">
<prop v="13" k="blend_mode"/>
<prop v="3" k="blur_level"/>
<prop v="124,124,124,255" k="color"/>
<prop v="2" k="draw_mode"/>
<prop v="1" k="enabled"/>
<prop v="135" k="offset_angle"/>
<prop v="2" k="offset_distance"/>
<prop v="MM" k="offset_unit"/>
<prop v="3x:0,0,0,0,0,0" k="offset_unit_scale"/>
<prop v="1" k="opacity"/>
</effect>
<effect type="outerGlow">
<prop v="0" k="blend_mode"/>
<prop v="3" k="blur_level"/>
<prop v="0,0,255,255" k="color1"/>
<prop v="0,255,0,255" k="color2"/>
<prop v="0" k="color_type"/>
<prop v="0" k="discrete"/>
<prop v="2" k="draw_mode"/>
<prop v="0" k="enabled"/>
<prop v="0.5" k="opacity"/>
<prop v="gradient" k="rampType"/>
<prop v="255,255,255,255" k="single_color"/>
<prop v="2" k="spread"/>
<prop v="MM" k="spread_unit"/>
<prop v="3x:0,0,0,0,0,0" k="spread_unit_scale"/>
</effect>
<effect type="drawSource">
<prop v="0" k="blend_mode"/>
<prop v="2" k="draw_mode"/>
<prop v="1" k="enabled"/>
<prop v="1" k="opacity"/>
</effect>
<effect type="innerShadow">
<prop v="13" k="blend_mode"/>
<prop v="10" k="blur_level"/>
<prop v="0,0,0,255" k="color"/>
<prop v="2" k="draw_mode"/>
<prop v="0" k="enabled"/>
<prop v="135" k="offset_angle"/>
<prop v="2" k="offset_distance"/>
<prop v="MM" k="offset_unit"/>
<prop v="3x:0,0,0,0,0,0" k="offset_unit_scale"/>
<prop v="1" k="opacity"/>
</effect>
<effect type="innerGlow">
<prop v="0" k="blend_mode"/>
<prop v="3" k="blur_level"/>
<prop v="0,0,255,255" k="color1"/>
<prop v="0,255,0,255" k="color2"/>
<prop v="0" k="color_type"/>
<prop v="0" k="discrete"/>
<prop v="2" k="draw_mode"/>
<prop v="0" k="enabled"/>
<prop v="0.5" k="opacity"/>
<prop v="gradient" k="rampType"/>
<prop v="255,255,255,255" k="single_color"/>
<prop v="2" k="spread"/>
<prop v="MM" k="spread_unit"/>
<prop v="3x:0,0,0,0,0,0" k="spread_unit_scale"/>
</effect>
</effect>
</renderer-v2>
<customproperties>
<property key="embeddedWidgets/count" value="0"/>
<property key="variableNames"/>
<property key="variableValues"/>
</customproperties>
<blendMode>0</blendMode>
<featureBlendMode>0</featureBlendMode>
<layerOpacity>1</layerOpacity>
<SingleCategoryDiagramRenderer diagramType="Histogram" attributeLegend="1">
<DiagramCategory rotationOffset="270" lineSizeType="MM" diagramOrientation="Up" penAlpha="255" sizeScale="3x:0,0,0,0,0,0" lineSizeScale="3x:0,0,0,0,0,0" scaleDependency="Area" maxScaleDenominator="1e+8" penWidth="0" width="15" backgroundAlpha="255" enabled="0" scaleBasedVisibility="0" sizeType="MM" minScaleDenominator="0" labelPlacementMethod="XHeight" barWidth="5" minimumSize="0" height="15" penColor="#000000" opacity="1" backgroundColor="#ffffff">
<fontProperties description=".SF NS Text,13,-1,5,50,0,0,0,0,0" style=""/>
<attribute color="#000000" label="" field=""/>
</DiagramCategory>
</SingleCategoryDiagramRenderer>
<DiagramLayerSettings zIndex="0" dist="0" showAll="1" linePlacementFlags="18" placement="0" obstacle="0" priority="0">
<properties>
<Option type="Map">
<Option name="name" type="QString" value=""/>
<Option name="properties"/>
<Option name="type" type="QString" value="collection"/>
</Option>
</properties>
</DiagramLayerSettings>
<fieldConfiguration>
<field name="Name">
<editWidget type="TextEdit">
<config>
<Option/>
</config>
</editWidget>
</field>
<field name="Committer">
<editWidget type="TextEdit">
<config>
<Option/>
</config>
</editWidget>
</field>
<field name="First Commit Message">
<editWidget type="TextEdit">
<config>
<Option/>
</config>
</editWidget>
</field>
<field name="First Commit Date">
<editWidget type="TextEdit">
<config>
<Option/>
</config>
</editWidget>
</field>
<field name="GIT Nickname">
<editWidget type="TextEdit">
<config>
<Option/>
</config>
</editWidget>
</field>
</fieldConfiguration>
<geometryOptions geometryPrecision="0" removeDuplicateNodes="0"/>
<aliases>
<alias name="" field="Name" index="0"/>
<alias name="" field="Committer" index="1"/>
<alias name="" field="First Commit Message" index="2"/>
<alias name="" field="First Commit Date" index="3"/>
<alias name="" field="GIT Nickname" index="4"/>
</aliases>
<excludeAttributesWMS/>
<excludeAttributesWFS/>
<defaults>
<default expression="" field="Name" applyOnUpdate="0"/>
<default expression="" field="Committer" applyOnUpdate="0"/>
<default expression="" field="First Commit Message" applyOnUpdate="0"/>
<default expression="" field="First Commit Date" applyOnUpdate="0"/>
<default expression="" field="GIT Nickname" applyOnUpdate="0"/>
</defaults>
<constraints>
<constraint notnull_strength="0" field="Name" unique_strength="0" constraints="0" exp_strength="0"/>
<constraint notnull_strength="0" field="Committer" unique_strength="0" constraints="0" exp_strength="0"/>
<constraint notnull_strength="0" field="First Commit Message" unique_strength="0" constraints="0" exp_strength="0"/>
<constraint notnull_strength="0" field="First Commit Date" unique_strength="0" constraints="0" exp_strength="0"/>
<constraint notnull_strength="0" field="GIT Nickname" unique_strength="0" constraints="0" exp_strength="0"/>
</constraints>
<constraintExpressions>
<constraint field="Name" desc="" exp=""/>
<constraint field="Committer" desc="" exp=""/>
<constraint field="First Commit Message" desc="" exp=""/>
<constraint field="First Commit Date" desc="" exp=""/>
<constraint field="GIT Nickname" desc="" exp=""/>
</constraintExpressions>
<attributeactions>
<defaultAction key="Canvas" value="{00000000-0000-0000-0000-000000000000}"/>
</attributeactions>
<attributetableconfig sortExpression="" sortOrder="0" actionWidgetStyle="dropDown">
<columns>
<column type="actions" width="-1" hidden="1"/>
<column name="Name" type="field" width="-1" hidden="0"/>
<column name="Committer" type="field" width="-1" hidden="0"/>
<column name="First Commit Message" type="field" width="-1" hidden="0"/>
<column name="First Commit Date" type="field" width="-1" hidden="0"/>
<column name="GIT Nickname" type="field" width="-1" hidden="0"/>
</columns>
</attributetableconfig>
<editform tolerant="1"></editform>
<editforminit/>
<editforminitcodesource>0</editforminitcodesource>
<editforminitfilepath></editforminitfilepath>
<editforminitcode><![CDATA[# -*- coding: utf-8 -*-
"""
QGIS forms can have a Python function that is called when the form is
opened.
Use this function to add extra logic to your forms.
Enter the name of the function in the "Python Init function"
field.
An example follows:
"""
from qgis.PyQt.QtWidgets import QWidget
def my_form_open(dialog, layer, feature):
geom = feature.geometry()
control = dialog.findChild(QWidget, "MyLineEdit")
]]></editforminitcode>
<featformsuppress>0</featformsuppress>
<editorlayout>generatedlayout</editorlayout>
<editable>
<field editable="1" name="Committer"/>
<field editable="1" name="First Commit Date"/>
<field editable="1" name="First Commit Message"/>
<field editable="1" name="GIT Nickname"/>
<field editable="1" name="Name"/>
<field editable="1" name="date_nice"/>
<field editable="1" name="day_int"/>
<field editable="1" name="hackfest_number"/>
<field editable="1" name="month"/>
<field editable="1" name="month_int"/>
<field editable="1" name="notes"/>
<field editable="1" name="place"/>
<field editable="1" name="year"/>
</editable>
<labelOnTop>
<field labelOnTop="0" name="Committer"/>
<field labelOnTop="0" name="First Commit Date"/>
<field labelOnTop="0" name="First Commit Message"/>
<field labelOnTop="0" name="GIT Nickname"/>
<field labelOnTop="0" name="Name"/>
<field labelOnTop="0" name="date_nice"/>
<field labelOnTop="0" name="day_int"/>
<field labelOnTop="0" name="hackfest_number"/>
<field labelOnTop="0" name="month"/>
<field labelOnTop="0" name="month_int"/>
<field labelOnTop="0" name="notes"/>
<field labelOnTop="0" name="place"/>
<field labelOnTop="0" name="year"/>
</labelOnTop>
<widgets/>
<conditionalstyles>
<rowstyles/>
<fieldstyles/>
</conditionalstyles>
<expressionfields/>
<previewExpression>year</previewExpression>
<mapTip></mapTip>
<layerGeometryType>0</layerGeometryType>
</qgis>

View File

@ -0,0 +1,27 @@
{
"type": "FeatureCollection",
"name": "qgis-hackfests",
"features": [
{ "type": "Feature", "properties": { "year": 2005, "month": "?", "hackfest_number": "0", "place": "Karslruhe", "notes": "Unofficialfirst hackfest at Linuxtag", "month_int": 1, "day_int": 1, "date_nice": "2005-1-1" }, "geometry": { "type": "Point", "coordinates": [ 8.403854370117188, 49.014230118337892 ] } },
{ "type": "Feature", "properties": { "year": 2009, "month": "March", "hackfest_number": "1", "place": "Hannover", "notes": "Held just before FOSSGIS", "month_int": 3, "day_int": 1, "date_nice": "2009-3-1" }, "geometry": { "type": "Point", "coordinates": [ 9.738006591796875, 52.374551201517249 ] } },
{ "type": "Feature", "properties": { "year": 2009, "month": "November", "hackfest_number": "2", "place": "Wien", "notes": "Werner's girlfriend Verena made awesome cake", "month_int": 11, "day_int": 1, "date_nice": "2009-11-1" }, "geometry": { "type": "Point", "coordinates": [ 16.403961181640625, 48.230619167874089 ] } },
{ "type": "Feature", "properties": { "year": 2010, "month": "March", "hackfest_number": "3", "place": "Pisa", "notes": "Jürgen really liked the food and there were wild boar seen on the way home from dinner", "month_int": 3, "day_int": 1, "date_nice": "2010-3-1" }, "geometry": { "type": "Point", "coordinates": [ 10.340194702148438, 43.736375427948587 ] } },
{ "type": "Feature", "properties": { "year": 2010, "month": "November", "hackfest_number": "4", "place": "Wrocław", "notes": "First proposal about having a certification programme. Made awesom human Q splashcreen picture.", "month_int": 11, "day_int": 1, "date_nice": "2010-11-1" }, "geometry": { "type": "Point", "coordinates": [ 17.034988403320312, 51.108695514831865 ] } },
{ "type": "Feature", "properties": { "year": 2011, "month": "April", "hackfest_number": "5", "place": "Lisboa", "notes": "Everyone in the hackfest got lost trying to find the venue. Five left handed geeks landed up at the same table!", "month_int": 4, "day_int": 1, "date_nice": "2011-4-1" }, "geometry": { "type": "Point", "coordinates": [ -9.139251708984375, 38.713861234137816 ] } },
{ "type": "Feature", "properties": { "year": 2011, "month": "November", "hackfest_number": "6", "place": "Zürich", "notes": "First 'working' version of QGIS for Android made", "month_int": 11, "day_int": 1, "date_nice": "2011-11-1" }, "geometry": { "type": "Point", "coordinates": [ 8.507494926452637, 47.408399290981784 ] } },
{ "type": "Feature", "properties": { "year": 2012, "month": "April", "hackfest_number": "7", "place": "Lyon", "notes": "Tim stayed up till 4am hacking then nearly missed his flight!", "month_int": 4, "day_int": 1, "date_nice": "2012-4-1" }, "geometry": { "type": "Point", "coordinates": [ 4.831924438476562, 45.758062221258413 ] } },
{ "type": "Feature", "properties": { "year": 2012, "month": "October", "hackfest_number": "8", "place": "Essen", "notes": "First hackfest in Essen, first hackfest for Matthias, Geometry v2 was introduced.", "month_int": 10, "day_int": 1, "date_nice": "2012-10-1" }, "geometry": { "type": "Point", "coordinates": [ 7.012367248535156, 51.458285490618081 ] } },
{ "type": "Feature", "properties": { "year": 2013, "month": "April", "hackfest_number": "9", "place": "Valmeira", "notes": "Lots of socialising on the lovely walk to and from the hackfest venue each day", "month_int": 4, "day_int": 1, "date_nice": "2013-4-1" }, "geometry": { "type": "Point", "coordinates": [ 25.42236328125, 57.539508928327038 ] } },
{ "type": "Feature", "properties": { "year": 2013, "month": "September", "hackfest_number": "10", "place": "Brighton", "notes": "New QGIS website theme was introduced. We launched QGIS 2.0 at FOSS4G after the hackfest! Get mapping get mapping!", "month_int": 9, "day_int": 1, "date_nice": "2013-9-1" }, "geometry": { "type": "Point", "coordinates": [ -0.133552551269531, 50.826107880542104 ] } },
{ "type": "Feature", "properties": { "year": 2014, "month": "April", "hackfest_number": "11", "place": "Wien", "notes": "Combined OSGEO and QGIS Hackfest. 140GB of data used.", "month_int": 4, "day_int": 1, "date_nice": "2014-4-1" }, "geometry": { "type": "Point", "coordinates": [ 16.370315551757812, 48.248454577306291 ] } },
{ "type": "Feature", "properties": { "year": 2014, "month": "October", "hackfest_number": "12", "place": "Essen", "notes": "Second Linux Hotel hackfest! We introduced plans for QGIS LTR Releases.", "month_int": 10, "day_int": 1, "date_nice": "2014-10-1" }, "geometry": { "type": "Point", "coordinates": [ 7.012195587158203, 51.458285490618081 ] } },
{ "type": "Feature", "properties": { "year": 2015, "month": "May", "hackfest_number": "13", "place": "Nødebo", "notes": "First QGIS User Conference. We had supper in a tipi! Forest parkour was the outside activity of choice.", "month_int": 5, "day_int": 1, "date_nice": "2015-5-1" }, "geometry": { "type": "Point", "coordinates": [ 12.345521450042723, 55.989587335710141 ] } },
{ "type": "Feature", "properties": { "year": 2015, "month": "November", "hackfest_number": "14", "place": "Las Palmas", "notes": "Matthias and Marco were surfing at lunch break everyday....and not writing code during that time.", "month_int": 11, "day_int": 1, "date_nice": "2015-11-1" }, "geometry": { "type": "Point", "coordinates": [ -15.423431396484375, 28.143448752478196 ] } },
{ "type": "Feature", "properties": { "year": 2016, "month": "May", "hackfest_number": "15", "place": "Girona", "notes": "Second user conference.First time we got to meet Nyall. Underwater drones!", "month_int": 5, "day_int": 1, "date_nice": "2016-5-1" }, "geometry": { "type": "Point", "coordinates": [ 2.818336486816406, 41.980166115460626 ] } },
{ "type": "Feature", "properties": { "year": 2016, "month": "August", "hackfest_number": "16", "place": "Bonn", "notes": "There were rumours of inappropriate placing of QGIS stickers on eagle statues.", "month_int": 8, "day_int": 1, "date_nice": "2016-8-1" }, "geometry": { "type": "Point", "coordinates": [ 7.101287841796875, 50.737106987418166 ] } },
{ "type": "Feature", "properties": { "year": 2017, "month": "April", "hackfest_number": "17", "place": "Essen", "notes": "Third Linux Hotel hackfest! QGIS Fun Run with old Tim and old trains. Sip hacking. PyQt docs concept introduced.", "month_int": 4, "day_int": 1, "date_nice": "2017-4-1" }, "geometry": { "type": "Point", "coordinates": [ 7.012195587158203, 51.458285490618081 ] } },
{ "type": "Feature", "properties": { "year": 2017, "month": "August", "hackfest_number": "18", "place": "Nødebo", "notes": "Third QGIS User Conference. Family hackfest with running and swimming. Marcelle sang in the palace! Dave and Mario's first hackfest.", "month_int": 8, "day_int": 1, "date_nice": "2017-8-1" }, "geometry": { "type": "Point", "coordinates": [ 12.345521450042723, 55.989587335710141 ] } },
{ "type": "Feature", "properties": { "year": 2018, "month": "February", "hackfest_number": "19", "place": "Funchal", "notes": "Rock on fish and bananas. We decided to move the bug tracker to GitLab.", "month_int": 2, "day_int": 1, "date_nice": "2018-2-1" }, "geometry": { "type": "Point", "coordinates": [ -16.905298233032223, 32.648481245624623 ] } },
{ "type": "Feature", "properties": { "year": 2018, "month": "August", "hackfest_number": "20", "place": "Zanzibar", "notes": "Maru Maru hotel in Stone Town. First African hackfest, first non-european hackfest.", "month_int": 8, "day_int": 1, "date_nice": "2018-8-1" }, "geometry": { "type": "Point", "coordinates": [ 39.189611077308655, -6.161726243417726 ] } }
]
}

View File

@ -0,0 +1,363 @@
<!DOCTYPE qgis PUBLIC 'http://mrcc.com/qgis.dtd' 'SYSTEM'>
<qgis minScale="1e+8" readOnly="0" version="3.3.0-Master" simplifyDrawingTol="1" simplifyDrawingHints="0" simplifyLocal="1" simplifyMaxScale="1" maxScale="0" labelsEnabled="0" hasScaleBasedVisibilityFlag="0" simplifyAlgorithm="0">
<renderer-v2 type="singleSymbol" forceraster="0" symbollevels="0" enableorderby="0">
<symbols>
<symbol clip_to_extent="1" name="0" type="marker" alpha="1">
<layer pass="0" locked="0" class="SimpleMarker" enabled="1">
<prop v="0" k="angle"/>
<prop v="222,12,61,255" k="color"/>
<prop v="1" k="horizontal_anchor_point"/>
<prop v="bevel" k="joinstyle"/>
<prop v="circle" k="name"/>
<prop v="0,0" k="offset"/>
<prop v="3x:0,0,0,0,0,0" k="offset_map_unit_scale"/>
<prop v="MM" k="offset_unit"/>
<prop v="35,35,35,255" k="outline_color"/>
<prop v="no" k="outline_style"/>
<prop v="0" k="outline_width"/>
<prop v="3x:0,0,0,0,0,0" k="outline_width_map_unit_scale"/>
<prop v="MM" k="outline_width_unit"/>
<prop v="diameter" k="scale_method"/>
<prop v="10" k="size"/>
<prop v="3x:0,0,0,0,0,0" k="size_map_unit_scale"/>
<prop v="MM" k="size_unit"/>
<prop v="1" k="vertical_anchor_point"/>
<data_defined_properties>
<Option type="Map">
<Option name="name" type="QString" value=""/>
<Option name="properties" type="Map">
<Option name="size" type="Map">
<Option name="active" type="bool" value="false"/>
<Option name="type" type="int" value="1"/>
<Option name="val" type="QString" value=""/>
</Option>
</Option>
<Option name="type" type="QString" value="collection"/>
</Option>
</data_defined_properties>
</layer>
<layer pass="0" locked="0" class="SimpleMarker" enabled="1">
<prop v="0" k="angle"/>
<prop v="255,149,0,255" k="color"/>
<prop v="1" k="horizontal_anchor_point"/>
<prop v="bevel" k="joinstyle"/>
<prop v="circle" k="name"/>
<prop v="0,0" k="offset"/>
<prop v="3x:0,0,0,0,0,0" k="offset_map_unit_scale"/>
<prop v="MM" k="offset_unit"/>
<prop v="35,35,35,255" k="outline_color"/>
<prop v="no" k="outline_style"/>
<prop v="0" k="outline_width"/>
<prop v="3x:0,0,0,0,0,0" k="outline_width_map_unit_scale"/>
<prop v="MM" k="outline_width_unit"/>
<prop v="diameter" k="scale_method"/>
<prop v="8" k="size"/>
<prop v="3x:0,0,0,0,0,0" k="size_map_unit_scale"/>
<prop v="MM" k="size_unit"/>
<prop v="1" k="vertical_anchor_point"/>
<data_defined_properties>
<Option type="Map">
<Option name="name" type="QString" value=""/>
<Option name="properties" type="Map">
<Option name="fillColor" type="Map">
<Option name="active" type="bool" value="true"/>
<Option name="expression" type="QString" value="ramp_color('Viridis', 60 / second(now()))"/>
<Option name="type" type="int" value="3"/>
</Option>
<Option name="size" type="Map">
<Option name="active" type="bool" value="false"/>
<Option name="type" type="int" value="1"/>
<Option name="val" type="QString" value=""/>
</Option>
</Option>
<Option name="type" type="QString" value="collection"/>
</Option>
</data_defined_properties>
</layer>
<layer pass="0" locked="0" class="SimpleMarker" enabled="1">
<prop v="0" k="angle"/>
<prop v="255,0,0,255" k="color"/>
<prop v="1" k="horizontal_anchor_point"/>
<prop v="bevel" k="joinstyle"/>
<prop v="cross" k="name"/>
<prop v="0,0" k="offset"/>
<prop v="3x:0,0,0,0,0,0" k="offset_map_unit_scale"/>
<prop v="MM" k="offset_unit"/>
<prop v="222,12,61,255" k="outline_color"/>
<prop v="solid" k="outline_style"/>
<prop v="2" k="outline_width"/>
<prop v="3x:0,0,0,0,0,0" k="outline_width_map_unit_scale"/>
<prop v="MM" k="outline_width_unit"/>
<prop v="diameter" k="scale_method"/>
<prop v="5" k="size"/>
<prop v="3x:0,0,0,0,0,0" k="size_map_unit_scale"/>
<prop v="MM" k="size_unit"/>
<prop v="1" k="vertical_anchor_point"/>
<data_defined_properties>
<Option type="Map">
<Option name="name" type="QString" value=""/>
<Option name="properties" type="Map">
<Option name="angle" type="Map">
<Option name="active" type="bool" value="true"/>
<Option name="expression" type="QString" value="second(now()) * 6"/>
<Option name="type" type="int" value="3"/>
</Option>
</Option>
<Option name="type" type="QString" value="collection"/>
</Option>
</data_defined_properties>
</layer>
</symbol>
</symbols>
<rotation/>
<sizescale/>
<effect type="effectStack" enabled="1">
<effect type="dropShadow">
<prop v="13" k="blend_mode"/>
<prop v="3" k="blur_level"/>
<prop v="124,124,124,255" k="color"/>
<prop v="2" k="draw_mode"/>
<prop v="1" k="enabled"/>
<prop v="135" k="offset_angle"/>
<prop v="2" k="offset_distance"/>
<prop v="MM" k="offset_unit"/>
<prop v="3x:0,0,0,0,0,0" k="offset_unit_scale"/>
<prop v="1" k="opacity"/>
</effect>
<effect type="outerGlow">
<prop v="0" k="blend_mode"/>
<prop v="3" k="blur_level"/>
<prop v="0" k="color_type"/>
<prop v="2" k="draw_mode"/>
<prop v="0" k="enabled"/>
<prop v="0.5" k="opacity"/>
<prop v="255,255,255,255" k="single_color"/>
<prop v="2" k="spread"/>
<prop v="MM" k="spread_unit"/>
<prop v="3x:0,0,0,0,0,0" k="spread_unit_scale"/>
</effect>
<effect type="drawSource">
<prop v="0" k="blend_mode"/>
<prop v="2" k="draw_mode"/>
<prop v="1" k="enabled"/>
<prop v="1" k="opacity"/>
</effect>
<effect type="innerShadow">
<prop v="13" k="blend_mode"/>
<prop v="10" k="blur_level"/>
<prop v="0,0,0,255" k="color"/>
<prop v="2" k="draw_mode"/>
<prop v="0" k="enabled"/>
<prop v="135" k="offset_angle"/>
<prop v="2" k="offset_distance"/>
<prop v="MM" k="offset_unit"/>
<prop v="3x:0,0,0,0,0,0" k="offset_unit_scale"/>
<prop v="1" k="opacity"/>
</effect>
<effect type="innerGlow">
<prop v="0" k="blend_mode"/>
<prop v="3" k="blur_level"/>
<prop v="0" k="color_type"/>
<prop v="2" k="draw_mode"/>
<prop v="0" k="enabled"/>
<prop v="0.5" k="opacity"/>
<prop v="255,255,255,255" k="single_color"/>
<prop v="2" k="spread"/>
<prop v="MM" k="spread_unit"/>
<prop v="3x:0,0,0,0,0,0" k="spread_unit_scale"/>
</effect>
</effect>
</renderer-v2>
<customproperties>
<property key="embeddedWidgets/count" value="0"/>
<property key="variableNames"/>
<property key="variableValues"/>
</customproperties>
<blendMode>0</blendMode>
<featureBlendMode>0</featureBlendMode>
<layerOpacity>1</layerOpacity>
<SingleCategoryDiagramRenderer diagramType="Histogram" attributeLegend="1">
<DiagramCategory rotationOffset="270" lineSizeType="MM" diagramOrientation="Up" penAlpha="255" sizeScale="3x:0,0,0,0,0,0" lineSizeScale="3x:0,0,0,0,0,0" scaleDependency="Area" maxScaleDenominator="1e+8" penWidth="0" width="15" backgroundAlpha="255" enabled="0" scaleBasedVisibility="0" sizeType="MM" minScaleDenominator="0" labelPlacementMethod="XHeight" barWidth="5" minimumSize="0" height="15" penColor="#000000" opacity="1" backgroundColor="#ffffff">
<fontProperties description=".SF NS Text,13,-1,5,50,0,0,0,0,0" style=""/>
<attribute color="#000000" label="" field=""/>
</DiagramCategory>
</SingleCategoryDiagramRenderer>
<DiagramLayerSettings zIndex="0" dist="0" showAll="1" linePlacementFlags="18" placement="0" obstacle="0" priority="0">
<properties>
<Option type="Map">
<Option name="name" type="QString" value=""/>
<Option name="properties"/>
<Option name="type" type="QString" value="collection"/>
</Option>
</properties>
</DiagramLayerSettings>
<fieldConfiguration>
<field name="year">
<editWidget type="Range">
<config>
<Option/>
</config>
</editWidget>
</field>
<field name="month">
<editWidget type="TextEdit">
<config>
<Option/>
</config>
</editWidget>
</field>
<field name="hackfest_number">
<editWidget type="TextEdit">
<config>
<Option/>
</config>
</editWidget>
</field>
<field name="place">
<editWidget type="TextEdit">
<config>
<Option/>
</config>
</editWidget>
</field>
<field name="notes">
<editWidget type="TextEdit">
<config>
<Option/>
</config>
</editWidget>
</field>
<field name="month_int">
<editWidget type="Range">
<config>
<Option/>
</config>
</editWidget>
</field>
<field name="day_int">
<editWidget type="Range">
<config>
<Option/>
</config>
</editWidget>
</field>
<field name="date_nice">
<editWidget type="DateTime">
<config>
<Option/>
</config>
</editWidget>
</field>
</fieldConfiguration>
<geometryOptions geometryPrecision="0" removeDuplicateNodes="0"/>
<aliases>
<alias name="" field="year" index="0"/>
<alias name="" field="month" index="1"/>
<alias name="" field="hackfest_number" index="2"/>
<alias name="" field="place" index="3"/>
<alias name="" field="notes" index="4"/>
<alias name="" field="month_int" index="5"/>
<alias name="" field="day_int" index="6"/>
<alias name="" field="date_nice" index="7"/>
</aliases>
<excludeAttributesWMS/>
<excludeAttributesWFS/>
<defaults>
<default expression="" field="year" applyOnUpdate="0"/>
<default expression="" field="month" applyOnUpdate="0"/>
<default expression="" field="hackfest_number" applyOnUpdate="0"/>
<default expression="" field="place" applyOnUpdate="0"/>
<default expression="" field="notes" applyOnUpdate="0"/>
<default expression="" field="month_int" applyOnUpdate="0"/>
<default expression="" field="day_int" applyOnUpdate="0"/>
<default expression="" field="date_nice" applyOnUpdate="0"/>
</defaults>
<constraints>
<constraint notnull_strength="0" field="year" unique_strength="0" constraints="0" exp_strength="0"/>
<constraint notnull_strength="0" field="month" unique_strength="0" constraints="0" exp_strength="0"/>
<constraint notnull_strength="0" field="hackfest_number" unique_strength="0" constraints="0" exp_strength="0"/>
<constraint notnull_strength="0" field="place" unique_strength="0" constraints="0" exp_strength="0"/>
<constraint notnull_strength="0" field="notes" unique_strength="0" constraints="0" exp_strength="0"/>
<constraint notnull_strength="0" field="month_int" unique_strength="0" constraints="0" exp_strength="0"/>
<constraint notnull_strength="0" field="day_int" unique_strength="0" constraints="0" exp_strength="0"/>
<constraint notnull_strength="0" field="date_nice" unique_strength="0" constraints="0" exp_strength="0"/>
</constraints>
<constraintExpressions>
<constraint field="year" desc="" exp=""/>
<constraint field="month" desc="" exp=""/>
<constraint field="hackfest_number" desc="" exp=""/>
<constraint field="place" desc="" exp=""/>
<constraint field="notes" desc="" exp=""/>
<constraint field="month_int" desc="" exp=""/>
<constraint field="day_int" desc="" exp=""/>
<constraint field="date_nice" desc="" exp=""/>
</constraintExpressions>
<attributeactions>
<defaultAction key="Canvas" value="{00000000-0000-0000-0000-000000000000}"/>
</attributeactions>
<attributetableconfig sortExpression="" sortOrder="0" actionWidgetStyle="dropDown">
<columns>
<column name="year" type="field" width="-1" hidden="0"/>
<column name="month" type="field" width="-1" hidden="0"/>
<column name="hackfest_number" type="field" width="-1" hidden="0"/>
<column name="place" type="field" width="-1" hidden="0"/>
<column name="notes" type="field" width="-1" hidden="0"/>
<column name="month_int" type="field" width="-1" hidden="0"/>
<column name="day_int" type="field" width="-1" hidden="0"/>
<column name="date_nice" type="field" width="-1" hidden="0"/>
<column type="actions" width="-1" hidden="1"/>
</columns>
</attributetableconfig>
<editform tolerant="1"></editform>
<editforminit/>
<editforminitcodesource>0</editforminitcodesource>
<editforminitfilepath></editforminitfilepath>
<editforminitcode><![CDATA[# -*- coding: utf-8 -*-
"""
QGIS forms can have a Python function that is called when the form is
opened.
Use this function to add extra logic to your forms.
Enter the name of the function in the "Python Init function"
field.
An example follows:
"""
from qgis.PyQt.QtWidgets import QWidget
def my_form_open(dialog, layer, feature):
geom = feature.geometry()
control = dialog.findChild(QWidget, "MyLineEdit")
]]></editforminitcode>
<featformsuppress>0</featformsuppress>
<editorlayout>generatedlayout</editorlayout>
<editable>
<field editable="1" name="date_nice"/>
<field editable="1" name="day_int"/>
<field editable="1" name="hackfest_number"/>
<field editable="1" name="month"/>
<field editable="1" name="month_int"/>
<field editable="1" name="notes"/>
<field editable="1" name="place"/>
<field editable="1" name="year"/>
</editable>
<labelOnTop>
<field labelOnTop="0" name="date_nice"/>
<field labelOnTop="0" name="day_int"/>
<field labelOnTop="0" name="hackfest_number"/>
<field labelOnTop="0" name="month"/>
<field labelOnTop="0" name="month_int"/>
<field labelOnTop="0" name="notes"/>
<field labelOnTop="0" name="place"/>
<field labelOnTop="0" name="year"/>
</labelOnTop>
<widgets/>
<conditionalstyles>
<rowstyles/>
<fieldstyles/>
</conditionalstyles>
<expressionfields/>
<previewExpression>year</previewExpression>
<mapTip></mapTip>
<layerGeometryType>0</layerGeometryType>
</qgis>

View File

@ -14,6 +14,7 @@
***************************************************************************/
#include <QFont>
#include <QFileInfo>
#include <QHBoxLayout>
#include <QLabel>
#include <QLineEdit>
@ -27,6 +28,7 @@
#include "qgsmapcanvas.h"
#include "qgsproject.h"
#include "qgscoordinateutils.h"
#include "qgsvectorlayer.h"
QgsStatusBarCoordinatesWidget::QgsStatusBarCoordinatesWidget( QWidget *parent )
@ -117,7 +119,19 @@ void QgsStatusBarCoordinatesWidget::validateCoordinates()
{
return;
}
if ( mLineEdit->text() == QLatin1String( "dizzy" ) )
else if ( mLineEdit->text() == QLatin1String( "world" ) )
{
world();
}
if ( mLineEdit->text() == QLatin1String( "contributors" ) )
{
contributors();
}
else if ( mLineEdit->text() == QLatin1String( "hackfests" ) )
{
hackfests();
}
else if ( mLineEdit->text() == QLatin1String( "dizzy" ) )
{
// sometimes you may feel a bit dizzy...
if ( mDizzyTimer->isActive() )
@ -194,6 +208,52 @@ void QgsStatusBarCoordinatesWidget::dizzy()
mMapCanvas->setTransform( matrix );
}
void QgsStatusBarCoordinatesWidget::contributors()
{
if ( !mMapCanvas )
{
return;
}
QString fileName = QgsApplication::pkgDataPath() + QStringLiteral( "/resources/data/contributors.json" );
QFileInfo fileInfo = QFileInfo( fileName );
QgsVectorLayer *layer = new QgsVectorLayer( fileInfo.absoluteFilePath(),
tr( "QGIS Contributors" ), QStringLiteral( "ogr" ) );
// Register this layer with the layers registry
QgsProject::instance()->addMapLayer( layer );
layer->setAutoRefreshInterval( 500 );
layer->setAutoRefreshEnabled( true );
}
void QgsStatusBarCoordinatesWidget::world()
{
if ( !mMapCanvas )
{
return;
}
QString fileName = QgsApplication::pkgDataPath() + QStringLiteral( "/resources/data/world_map.shp" );
QFileInfo fileInfo = QFileInfo( fileName );
QgsVectorLayer *layer = new QgsVectorLayer( fileInfo.absoluteFilePath(),
tr( "World Map" ), QStringLiteral( "ogr" ) );
// Register this layer with the layers registry
QgsProject::instance()->addMapLayer( layer );
}
void QgsStatusBarCoordinatesWidget::hackfests()
{
if ( !mMapCanvas )
{
return;
}
QString fileName = QgsApplication::pkgDataPath() + QStringLiteral( "/resources/data/qgis-hackfests.json" );
QFileInfo fileInfo = QFileInfo( fileName );
QgsVectorLayer *layer = new QgsVectorLayer( fileInfo.absoluteFilePath(),
tr( "QGIS Hackfests" ), QStringLiteral( "ogr" ) );
// Register this layer with the layers registry
QgsProject::instance()->addMapLayer( layer );
layer->setAutoRefreshInterval( 500 );
layer->setAutoRefreshEnabled( true );
}
void QgsStatusBarCoordinatesWidget::extentsViewToggled( bool flag )
{
if ( flag )

View File

@ -59,6 +59,9 @@ class APP_EXPORT QgsStatusBarCoordinatesWidget : public QWidget
void extentsViewToggled( bool flag );
void validateCoordinates();
void dizzy();
void world();
void contributors();
void hackfests();
void showExtent();
void ensureCoordinatesVisible();