47 Commits

Author SHA1 Message Date
Matthias Kuhn
385529ef7b PalLabelling: Reproject geometries before evaluating mininum size
Followup 2b096e09
2015-06-03 23:59:42 +02:00
Matthias Kuhn
2b096e09e2 Fix suppress labelling of short lines
And deduplicate code
Followup cfe397e
2015-06-03 18:53:36 +02:00
Juergen E. Fischer
2ab8a0bed9 include user.py in translations 2015-05-31 00:42:51 +02:00
Nyall Dawson
51bd0b2bc5 Followup 2dc5d95, add unit tests 2015-05-31 07:58:05 +10:00
Juergen E. Fischer
d40d481bd3 avoid warning about not created test difference image 2015-05-25 21:43:55 +02:00
Nyall Dawson
4b4075b5b9 [labeling] Fix setting a wrap character conflicts with newlines
in label text (fix #12750)
2015-05-19 06:18:07 +10:00
Nyall Dawson
2863f20d67 Add a const geometry getter to QgsFeature 2015-05-11 19:46:32 +10:00
Nyall Dawson
7314047698 Fix missing doc strings due to invalid doxygen tags 2015-04-30 17:26:58 +10:00
Juergen E. Fischer
d79268cbd7 indentation update 2015-04-17 09:51:24 +02:00
Nyall Dawson
cfe397e718 Better fix for ffd81f4, avoid unnecessary copies of geometry 2015-04-14 10:36:04 +10:00
Nyall Dawson
7c7ef6d8cd Fix diagrams not respecting canvas rotation
Also fixes diagrams not showing for invalid polygons (fix #11955)
2015-04-13 23:16:14 +10:00
Nyall Dawson
44f7930ecf [FEATURE] Add follow point alignment for multiline labels
When set to this mode, text alignment for labels will be dependant
on the final placement of the label relative to the point. Eg, if
the label is placed to the left of the point then the label will
be right aligned, and if it is placed to the right of the point
then the label will be left aligned.
(fix #11153)
2015-03-19 19:48:38 +11:00
Nyall Dawson
e4fb95fad1 [pal] Some const correctness and avoid passing large object by value 2015-02-05 18:34:14 +11:00
Juergen E. Fischer
9ceb5ceab6 sip sync 2014-11-21 01:17:21 +01:00
Juergen E. Fischer
67e077853e DXF export improvements:
* tree view and attribute selection for layer assigment in dialog
* support fill polygons/HATCH
* represent texts as MTEXT instead of TEXT (including font, slant and weight)
* support for RGB colors when there's no exact color match
* use AutoCAD 2000 DXF (R15) instead of R12
* remove R18 test methods

Funded-By: City of Uster
Funded-By: Ville de Morges
Funded-By: SIGE
2014-09-26 14:10:26 +02:00
Larry Shaffer
c1d80ed6a6 Initial fix for #3975, label engine vectorizing texts in SVG and PDF output
- Add labeling engine option to render text-as-text
- Default is still text-as-outlines (vectorized), due to differences between text (as text) and buffer (as outline) methods
- Good output with printing to PDF (searchable, selectable text and embedded fonts)
- OK output with SVG, but differences between text (as text) and buffer (as outline) methods

Does not yet include unit tests or auto-setting of text-as-text for SVG output
2014-06-13 10:20:55 -06:00
Martin Dobias
73358c3a7e [layertree] Add python bindings - part one (core) 2014-06-03 19:27:28 +07:00
Juergen E. Fischer
45c0be1059 sip: remove enum constants 2014-06-02 21:52:02 +02:00
Larry Shaffer
fe42b0048f Merge pull request #1238 from ahuarte47/Issue_9480
Fix bug #9480: Labels for polygon centroids should always originate inside a polygon
2014-05-29 14:45:22 -06:00
Juergen E. Fischer
c1f50db1ac fix warnings 2014-05-29 01:43:04 +02:00
Juergen E. Fischer
c4c131ef75 sip sync 2014-05-27 23:32:42 +02:00
ahuarte47
6cb4cbb1cc #9480: Add centroidInside to sip file 2014-05-27 13:39:31 +02:00
Martin Dobias
5a4f8d07a0 Change "added/deprecated in 2.1" notes to 2.4 for stuff related to threading 2014-02-21 17:33:09 +07:00
Martin Dobias
a3af93394e Merge branch 'master' into threading-revival
Some features are still disabled - will be fixed later

Conflicts:
	python/core/composer/qgscomposition.sip
	python/core/diagram/qgsdiagram.sip
	python/core/diagram/qgshistogramdiagram.sip
	python/core/diagram/qgspiediagram.sip
	python/core/diagram/qgstextdiagram.sip
	python/core/qgsdiagramrendererv2.sip
	python/core/qgsfield.sip
	python/core/qgslabelsearchtree.sip
	python/core/qgsmaprenderer.sip
	python/core/qgsrenderchecker.sip
	python/core/symbology-ng/qgssymbollayerv2.sip
	python/gui/qgsmapcanvas.sip
	src/app/composer/qgscomposerlegendwidget.cpp
	src/app/qgisapp.cpp
	src/core/composer/qgsatlascomposition.cpp
	src/core/composer/qgscomposerattributetable.cpp
	src/core/composer/qgscomposermap.cpp
	src/core/composer/qgscomposition.cpp
	src/core/composer/qgscomposition.h
	src/core/diagram/qgsdiagram.h
	src/core/diagram/qgshistogramdiagram.cpp
	src/core/diagram/qgshistogramdiagram.h
	src/core/diagram/qgspiediagram.cpp
	src/core/diagram/qgspiediagram.h
	src/core/diagram/qgstextdiagram.cpp
	src/core/diagram/qgstextdiagram.h
	src/core/qgsdiagramrendererv2.cpp
	src/core/qgsdiagramrendererv2.h
	src/core/qgsmaprenderer.cpp
	src/core/qgsmaprenderer.h
	src/core/qgsnetworkaccessmanager.h
	src/core/qgspallabeling.cpp
	src/core/qgsrenderchecker.h
	src/core/qgsvectorlayer.cpp
	src/core/qgsvectorlayer.h
	src/core/qgsvectorlayerfeatureiterator.cpp
	src/core/qgsvectorlayerfeatureiterator.h
	src/core/raster/qgsrasterlayer.cpp
	src/core/symbology-ng/qgscategorizedsymbolrendererv2.cpp
	src/core/symbology-ng/qgsgraduatedsymbolrendererv2.cpp
	src/core/symbology-ng/qgsmarkersymbollayerv2.cpp
	src/core/symbology-ng/qgssinglesymbolrendererv2.cpp
	src/core/symbology-ng/qgssymbollayerv2.cpp
	src/core/symbology-ng/qgssymbollayerv2.h
	src/core/symbology-ng/qgssymbolv2.cpp
	src/gui/qgshighlight.cpp
	src/gui/qgsmapcanvas.cpp
	src/gui/qgsmapcanvas.h
	src/gui/qgsmapcanvasitem.cpp
	src/gui/qgsmaptoolidentify.cpp
	src/plugins/georeferencer/qgsgeorefplugingui.cpp
	src/providers/memory/qgsmemoryfeatureiterator.cpp
	src/providers/ogr/qgsogrfeatureiterator.cpp
	src/providers/ogr/qgsogrfeatureiterator.h
	src/providers/ogr/qgsogrprovider.cpp
	src/providers/oracle/qgsoraclefeatureiterator.cpp
	src/providers/oracle/qgsoracleprovider.cpp
	src/providers/postgres/qgspostgresconn.cpp
	src/providers/postgres/qgspostgresfeatureiterator.cpp
	src/providers/postgres/qgspostgresfeatureiterator.h
	src/providers/wfs/qgswfsfeatureiterator.cpp
	src/providers/wms/qgswmsprovider.cpp
	src/providers/wms/qgswmsprovider.h
	src/ui/qgsoptionsbase.ui
	tests/src/core/CMakeLists.txt
	tests/src/core/testqgscomposereffects.cpp
	tests/src/core/testqgscomposerhtml.cpp
	tests/src/core/testqgscomposerscalebar.cpp
	tests/src/core/testqgscomposershapes.cpp
2014-02-18 11:28:46 +07:00
Juergen E. Fischer
74e7314c36 update sip bindings II 2014-01-27 09:22:53 +01:00
Juergen E. Fischer
d4e369414b update sip bindings 2014-01-26 18:36:29 +01:00
Martin Dobias
bf7dd52299 Various fixes to make it compile on Windows 2013-12-06 09:22:26 +07:00
Martin Dobias
2bece090f5 Update Python bindings to match changes in core/gui libraries. 2013-12-05 18:27:45 +07:00
yellow-sky
cf5d35b5cb Added python binding for ShowingPartialsLabels 2013-09-20 00:14:06 +04:00
Larry Shaffer
c9c013572f [labeling] Fix python bindings for access to data defined properties 2013-08-31 05:10:18 -06:00
Larry Shaffer
430f0fcb1b Add user notification when defined labeling font is not found on system, then substituted
- [API] add signal to QgsVectorLayer that is emitted when its labeling font is not found
- Message bar notification on first rendering of layer offers link to open layer's labeling dialog
- Add 'font not found' notification to labeling dialog
- Labeling dialog defaults to 'Text style' section when font is not found, to show notice
- Substituted font is not saved with project, unless user applies changes.
- Change labeling gui font selector dialog to font family combobox (since only family is being chosen)
2013-06-09 18:54:08 -06:00
Larry Shaffer
45f374f428 Update labeling gui and add expression support as data defined value
- Add QgsDataDefined class
- Add QgsDataDefinedButton class
- Add data defined Python support
- Add standalone SVG selector dialog to QgsSvgSelectorWidget class

- Fix for #4607, show only pertinent fields when setting a data defined value
- Fix for #5048 and #5049, data defined settings are literally used
- Fix for #5726, number formatting does not work for expressions
- Fix for #7755, using bufferSize to enable/disable label buffer is confusing
- Fix for #7779, labels do not register in label collision engine; and for #4719, inactive options in labeling dialog
- Prepare label text's expression upfront when preparing layer; makes rendering much faster
- Change name of 'feature obstacles' to appropriate terminology
2013-05-20 12:22:29 -06:00
Larry Shaffer
046fbeea39 Fix for #7627, wrong label scaling in print or PDF
- Add shadow device dpi output (high resolution)
- [API] Add scaleToPixelContext method to QgsPalLayerSettings for better precision scaling
2013-04-18 06:41:29 -06:00
Larry Shaffer
8749b29936 Add drop shadow option to labels
- Add option to show debug rectangles for shadows to PAL engine properties
- Add small container class, QgsLabelComponent, for temporal values during generation of label components
- Add static image blurring function to QgsSymbolLayerV2Utils
- Fix rotational offset issue with label backgrounds
2013-04-14 16:11:20 -06:00
Larry Shaffer
b809723977 [FEATURE] Add background shapes and svg symbols to labels
- Rectangle, square, circle and ellipse generated symbols
- SVG background via new symbology, so uses cache
- Add new gui class QgsSvgSelectorWidget, symbol selector setup culled from symbologyV2
- Does not include any associated data defined mappings, yet
- Does not auto-search for missing SVGs, yet
- Caveat: does not currently account for background size in PAL collision calculations (overlaps occur)
- Allow direct update of QgsColorButton background
2013-04-04 15:38:27 -06:00
Larry Shaffer
995fbadc60 Fix typo in QgsPalLabeling 2013-02-07 15:22:19 -07:00
Larry Shaffer
fbf999190c Update QgsPalLabeling to work with new vector api
- Switch data defined properties from field index- to name-based
- Add routine to migrate properties to new keys:  labeling/dataDefined/[enum name]
- Add QHash containing old-style data provider mapping of index to name for use in properties migration
- Update QgsLabelingGui, QgsMapToolLabel, QgsLabelPropertyDialog to work with name-based properties
2013-02-07 14:49:56 -07:00
Larry Shaffer
ee12df2f4e Add option to set inside and outside maximum for delta angle between curved label characters
- Addresses #6763, #6673 and #2113, but does not perform any feature simplification
- Recommend adding some letter [and word] spacing before applying any delta angle adjustment
2012-11-27 17:48:01 -07:00
Larry Shaffer
e3d30af735 Update to limit of number of features sent to PAL
- Distributes max number across total number of features registered in PAL
- Caveat: PAL may not show label for every registered feature
2012-11-15 21:21:13 -07:00
Larry Shaffer
f210668cb2 Add option to limit number of labels rendered per layer (OFF by default)
- Initial limit set to 2000
- Results would look better if limited subset was a random sampling of all features
2012-11-13 15:40:19 -07:00
Larry Shaffer
bb947b4762 Add custom line direction symbols to labeling
- Options to place symbol above or below label text
- Option to reverse symbol direction
- Add character selector dialog for single font to src/gui
2012-11-11 16:12:45 -07:00
Larry Shaffer
15fe9926ce Add data defined option to always show a label, unless overridden
- Label is skipped during PAL priority calculation, permitting collisions and overlaps
- Overridden by layer and data defined 'scale/pixel size visibility' and data defined 'show label'  options
- Add option to Change Label tool
2012-11-10 00:49:50 -07:00
Larry Shaffer
e5f07edf55 Add pixel size limiting for labels defined in map units
- Allows user to quickly set visibility thresholds based upon text legibility
- By default initially on for map unit labels to skip rendering at sizes < 3 px
2012-11-09 14:27:55 -07:00
Larry Shaffer
e08833ac3b Adv labeling, add multi-line spacing and alignment 2012-10-23 08:01:06 -06:00
Larry Shaffer
e125e98eb4 [FEATURE] Fix #6482, options for showing upside-down labels
- Adv Labeling option to 'Show upside-down labels': never, when rotation defined, or always
- 'Never' (default) option is same as before, labels with 90 <= angle < 270 are turned so their text is always upright
- 'When rotation defined' option shows upside-down labels if their rotation is layer- or data-defined (dynamic labels are turned upright)
- 'Always' option shows upside-down labels at layer- or data-defined rotations and for dynamic labels
2012-10-09 18:50:47 -06:00
Juergen E. Fischer
f3cb57b1eb SIP bindings update:
- update methods of existing classes
- add comment to methods missing in the sip bindings
- split up collective sip files into single files and use
  same directory structure in python/ as in src/
- add a lot of missing classes (some might not make sense because of
  missing python methods in those classes)
- remove some non-existing methods from the header files
- add scripts/sipdiff
- replace some usages of std::vector and std::set with QVector/QSet
2012-09-24 02:42:57 +02:00
Juergen E. Fischer
8898e6b847 missed the new file 2012-09-16 20:40:18 +02:00