5732 Commits

Author SHA1 Message Date
Ismail Sunni
edd921c428 [FEATURE] Measurement tool in 3D map view (#30299)
* Add measurement tool bar.

* Add class for measure line.

* Get coordinate of clicked point.

* Add clicked point to string line.

* Store clicekd points to layer.

* Try to render the measurement line.

* Render the measurement line (with some problems).

* Store points in vector.

* Make identify and measure tool exlusive to each other.

* Add measurement dialog.

* Fix only one action must active.

* Some code suggestion from Martin.

* Revert code to show the line.

* Show segment length and the total.

* Implement close dialog means restart 3d measurement.

* Add new button.

* Add unit combo box.

* Fix shadowing private member of class.

* Add slot to combo box unit changes.

* Hide ellipsoid and cartesian radio button.

* Add measure line for QgsPoint.

* Add unit changes feature.

* Add help (pointed to 2D measurement tool).

* Add finish measurement using right click.

* Remove keypress event, it does not make sense.

* Add remove-last-point with middle button.

* Add crsChanged event.

* Remove confusing tooltip.

* Add pan (camera control) action tool for clear state of 3d map tool.

* Change 3D identify tool cursor.

* Fix distance 2D to 3D.

* Remove unclear method.

* Add unit test for measureLine3D.

* Add 3D measurement setting.

* Add header.

* Make extra 3D renderers refresh the scene when they are updated

+ update the 3D renderer every time the measurement line layer is modified

* Set Altitude clamping to absolute.

* Remove options for 3D measurement line.

* Remove help button in 3D measurement dialog.

* Merge duplicate code for handle clicked position.

* Use color for 3d measure line from 2d one.

* Remove unneeded reimplementation method.

* Remove 2D canvas reference.

* Unify update measurement layer.

Use local variable for feature and line

* Create measurement layer once.

* Use data provider to change the geometry.

* Add length3D for QgsLineString.

* Simplify distance calculation and presentation. Remove QgsDistanceArea measurement.

* Descaled z value based on the terrain vertical scale.

* Remove line when tool is deactivated.

* Enable changing the line color from setting, but after re-activation.

* Update color of measurement line after saving option.

* Remove debug message.

* Remove 3D length calculation from distancearea.

* Handle 2D case for length3D, more unit test, and docstring.

* Fix typos.

* Addressing Martin's and Nyall's review.

* Remove setMeasurement to avoid confussion.
2019-07-08 15:21:00 +02:00
Nyall Dawson
e9a1eab694 [processsing][API] Add api to allow QgsProcessingParameterFile parameters
to have a file filter string defined

Previously only an extension was settable, which prevented use when
multiple extension types are possible. A file filter string allows
for flexible file selection instead.
2019-07-08 15:07:42 +10:00
Nyall Dawson
d03c9d5053 Show bounds of operations in transform selection dialog 2019-07-08 12:42:02 +10:00
Nyall Dawson
dd9dfb0d08 Show authority:code identifiers on transform selection dialog
Many scopes/remark cross reference these, so by showing them in the
table of available operations we give users more clues how to pick
the correct one.
2019-07-08 12:42:02 +10:00
Nyall Dawson
ac0326a351 [API] Add useful PyQGIS additions to QgsSymbol
Adds:
- __len__ : returns number of symbol layers in symbol
- [ ] getter: returns a specific symbol layer, also allows negative indices to retrieve from end of symbol
- del [ ]: removes a specific symbol layer, also allows negative indices
- raise IndexError when an invalid symbol layer is requested
- allow iteration over symbol layers using
  for layer in symbol:
     print(layer.color())
2019-07-08 08:41:59 +10:00
Nyall Dawson
f3dcd8211e Dox, comments 2019-07-06 12:36:54 +10:00
Nyall Dawson
87f10e140e Fix generation of enum class Pydocs 2019-07-06 12:36:54 +10:00
Nyall Dawson
4f5f6b5607 Add a generic method for adding style entities to a QgsStyle 2019-07-06 12:36:54 +10:00
Nyall Dawson
590d1aae9d [FEATURE][API] Visitor API for style entities
Adds a new visitor pattern API for creation of visitors which visit
all the style entities (symbols, color ramps, text formats, and
label styles) associated with different objects. Can be used on a
renderer, map layer, or project wide level.

E.g. on a project wide level, allows collection of ALL the style
symbols/color ramps/text settings inside a project, including those
in layouts or annotations!
2019-07-06 12:36:54 +10:00
Alessandro Pasotti
3a05312121
Merge pull request #30548 from elpaso/bugfix-gh30387-gpkg-project-relative-paths
Fix relative storage for GPKG projects
2019-07-05 14:21:12 +02:00
Alessandro Pasotti
75defad55c Remove warning 2019-07-05 13:33:27 +02:00
Nyall Dawson
7f491513e7 Further improvements to transform selection dialog
- Show area of use information, which gives users much more context
and clues for selecting the right transform from the list
- Fix missing scope and remarks for single operations
2019-07-05 05:53:13 +10:00
Alessandro Pasotti
b92012ccae Fix relative storage for GPKG projects
Fixes #30387
2019-07-04 11:23:56 +02:00
Nyall Dawson
39724c2a48 When building on proj >= 6.2, show the full scope and remarks
for coordinate operations

Gives much more useful information to users to allow them to make
informed choices about suitable operations
2019-07-03 05:11:31 +10:00
Nyall Dawson
13fe327eb9 Fix cloning a vector layer loses all features if the layer is a memory layer 2019-07-02 10:10:11 +10:00
Nyall Dawson
b0d7c2927e Expose contentAsString to QgsNetworkContentFetcherTask 2019-07-01 15:38:45 +10:00
Nyall Dawson
bb9fb49887 Add auth support to QgsNetworkContextFetcher 2019-07-01 15:38:45 +10:00
Nyall Dawson
d96c7386b1 Allow creation of color parameters with no opacity control 2019-07-01 06:32:21 +10:00
Nyall Dawson
38bb5fb260 [FEATURE][processing] New parameter type for colors
Allows for algorithms which require a color value as an input
2019-07-01 06:32:21 +10:00
Blottiere Paul
ee6642477e
Merge pull request #30071 from lbartoletti/wms_tile_buffer
[server]New parameter for WMS service: tile_buffer
2019-06-28 16:22:05 +02:00
Nyall Dawson
99d6524407 Dox++ 2019-06-28 09:45:48 +10:00
Nyall Dawson
03af890132 Address review comments 2019-06-28 09:45:48 +10:00
Nyall Dawson
6aeedfe20b [FEATURE][layouts] Expose choice of arrangement of legends (i.e.
symbols to the left OR symbols to the right of legend text), and
alignment for group/subgroup/item text

Allows creation of right-to-left locale friendly legends. Additionally,
we default to this right-to-left style alignment when creating new
legends under a RTL based locale.
2019-06-28 09:45:48 +10:00
Nyall Dawson
da79b6f0e6 [FEATURE][labels] New text "background" setting for marker symbol backgrounds
Allows for rendering a marker symbol in the background of labels
(complementing the existing shapes/SVG choices). This allows use
of QGIS marker symbology as a background symbol behind labels (e.g.
for highway shield labels)
2019-06-28 08:28:55 +10:00
Nyall Dawson
ef97fefbaa [layouts] Add API to set expression variables at a multiframe level 2019-06-28 07:12:40 +10:00
Martin Dobias
cf2d87837b
Merge pull request #30234 from PeterPetrik/providers
[QEP 149] Introduce static data providers
2019-06-26 08:18:21 +02:00
nirvn
0e4f0c8555 [symbology] Fix broken centroid fill's force point inside polygon 2019-06-26 12:05:07 +07:00
Martin Dobias
8e56f51c23 Merge remote-tracking branch 'origin/master' into providers 2019-06-25 22:11:51 +02:00
Martin Dobias
87ff0dc558 Move qgis 4 todo out of doxygen comment 2019-06-25 16:27:41 +02:00
Martin Dobias
d155b1c877 Further updates from review 2019-06-25 15:38:07 +02:00
Martin Dobias
aead182b21 Change FilterType to enum class + rename values to FilterXXX 2019-06-25 14:53:56 +02:00
nirvn
efeb8b5e32 [raster] Allow raster providers to hint whether resampling is beneficial
For some providers, such as tiled WMTS/XYZ/AMS, resampling is not
always visually beneficial and can lead to larger downloads
2019-06-25 14:42:36 +07:00
Alessandro Pasotti
063d29b256
Add NMEA GST Message for GPSInformation.Accuracies (#30274)
* Update sentence.h

* Update sentence.h

* Update sentence.h

* Update sentence.c

* Update parse.h

* Update parse.h

* Update sentence.h

* Update parse.c

* Update qgsnmeaconnection.cpp

* Update qgsnmeaconnection.cpp

* Update qgsnmeaconnection.cpp

* Update info.h

* Update qgsnmeaconnection.h

* Update qgsnmeaconnection.h

* Update parse.c

* Update parse.c

* Update parse.c

- Corrected Buffer Sizecomparison to 6
- defined Variable for buffer_size

* Astyle

* Fix docstrings
2019-06-25 09:41:29 +02:00
rldhont
15961c2207 Fix SIP file not up to date: core/auto_generated/qgsfieldproxymodel.sip
Introduced by 39fb9ce84a4b1743ddccb6a2cf842f06d17eb124 Merge branch 'master' into on-screen-navigation
2019-06-24 15:41:27 +02:00
Martin Dobias
5f0558915f Pass uri in createProvider() as a reference, not a pointer 2019-06-23 20:36:01 +02:00
Martin Dobias
90910b0447 Patch QgsProviderMetadata in Python to avoid API break
In C++ we do not support QgsProviderMetadata(key, description, createFunc) anymore,
but for python code we can have a patched class that still supports createFunc.

Why not keep the variant with createFunc in C++ as well? Because... SIP!
With newly added virtual methods in QgsProviderMetadata, SIP started to generate
a sip-specific subclass to handle derived classes in Python, however due to the variant
with PyObject* and custom MethodCode it was getting confused about what constructors
are available in C++ and failing to compile.
2019-06-21 18:27:36 +02:00
Martin Dobias
8ed0bb38d1 Start using QgsProjectStorageGuiRegistry + its providers (gpkg projects work again)
Also deprecate gui methods in QgsProjectStorage but keep compatibility
2019-06-21 16:28:21 +02:00
Matthias Kuhn
db18ef260f
Merge pull request #30281 from nyalldawson/text_symbol
Handle text formats in style manager
2019-06-21 16:14:16 +02:00
Matthias Kuhn
5e1ca35373
Merge pull request #10020 from m-kuhn/teamplates_on_welcome_page
Templates on welcome page
2019-06-21 16:13:28 +02:00
Juergen E. Fischer
88cb4d4eda dxf export: fix export of curved geometries 2019-06-21 13:14:46 +02:00
Nyall Dawson
850ea71c4d More wip 2019-06-21 15:52:56 +10:00
Nyall Dawson
d4d77808f9 Style model work 2019-06-21 15:52:56 +10:00
Nyall Dawson
aa658e5d07 Allow label settings gui widget to work widget layers 2019-06-21 15:52:56 +10:00
Nyall Dawson
0fd4984b3b [FEATURE] Allow storage of label settings in style manager
Just like the earlier change which allows for text formats to
be managed in style manager, this change allows for layer-wide
label settings to be stored and managed in styles.

So while a text format includes just the font settings and other
appearance related settings, Label Settings also includes layer-type
specific settings such as label placement, priority, rendering
settings.
2019-06-21 15:52:56 +10:00
Nyall Dawson
6f172da7e0 Fix dox 2019-06-21 15:52:56 +10:00
Nyall Dawson
554d23b324 Improve handling of favorites in QgsStyleModel and proxy model
Fixes favorite entities sometimes incorrectly filtered out
2019-06-21 15:52:56 +10:00
Nyall Dawson
e0446a7165 Preview icons for text symbols 2019-06-21 15:52:56 +10:00
Nyall Dawson
9647a18c13 Move label preview background color setting to QgsTextFormat
So that we can utilise it outside of labeling
2019-06-21 15:52:56 +10:00
Nyall Dawson
40e4789ba1 [API] Add support for text renderer formats to QgsStyle 2019-06-21 15:52:56 +10:00
Martin Dobias
ab261b675e Doxy fix + remove extra QgsProviderMetadata constructor 2019-06-20 14:50:30 +02:00