264 Commits

Author SHA1 Message Date
Nyall Dawson
bae8a0e5e0 [FEATURE] Georeference outputs (eg PDF) from composer
This commit makes composer automatically georeference outputs
(where output format makes this possible, eg TIF and PDF).

The existing option to create a world file has been separated
from the map selection for georeferencing. The new behaviour
is to always georeference outputs, and only create the
separate world file if that option is checked.
2016-05-29 00:46:39 +10:00
Nyall Dawson
726a013222 Flag old composer table classes as deprecated 2016-05-23 14:52:53 +10:00
Nyall Dawson
eb3a34cc92 Fix QgsComposerAttributeTableV2 setting displayed fields under qt5
Also don't run QgsComposerAttributeTable test when disable
deprecated flag is set.
2016-05-23 14:52:46 +10:00
Martin Dobias
deee8e290e [FEATURE] Composer map to follow a visibility preset (fixes #13418)
This adds a new option in composer map properties:
"Follow visibility preset" with a combo box to choose the active preset.

This is an alternative to "lock layers" (and "lock layer styles") functionality
which would just copy preset's configuration, while the new option links to preset.

The difference is that when a preset is updated, composer map will automatically
pick the new configuration when following the preset, while there is no update
if "lock layers" (and "lock layer styles") option is used.
2016-05-17 12:52:32 +08:00
Nyall Dawson
1b4bd47076 [composer] New QSortFilterProxyModel for filtering items by type
and new widget QgsComposerItemComboBox for showing matching composer
items.

Swap existing comboboxes to use the new widget, which removes a lot
of fragile code designed to allow selection of items. Additionally
the combobox now show the correct item id rather than always showing
"Map 0/1/..."
2016-04-09 09:38:09 +10:00
Nyall Dawson
4764b53518 [composer] Fix world file map is not restored from project 2016-04-09 09:38:09 +10:00
Nyall Dawson
39d0ba5781 [composer] Fix crash setting table columns from python 2016-04-07 18:47:01 +10:00
Nyall Dawson
38fa2980ad [composer] Fix polylines would be removed if they had < 3 points
when deleting nodes (2 node lines should be allowed)
2016-04-01 14:23:19 +11:00
Nyall Dawson
90b6f46bf1 Use Qt methods for translating node coords to scene coords 2016-04-01 14:23:12 +11:00
Blottiere Paul
7a8a5411e0 [FEATURE][composer] Add tools for drawing polygon and polylines 2016-04-01 11:05:03 +11:00
Nyall Dawson
ed3cb12008 [FEATURE] Parameterized svg support for composer svg images
This makes it possible to change SVG fill/outline color and outline
width when using parameterised SVG files such as those included
with QGIS (fix #10542)
2016-03-08 08:15:04 +11:00
Juergen E. Fischer
a90be95f7b sip sync 2016-02-14 03:50:49 +01:00
Nyall Dawson
c3a57434d9 Fix clazy 'pass small and trivially-copyable type by value' warnings 2016-02-02 19:47:21 +11:00
Nyall Dawson
f3c7ab61e6 Spelling fixes, updates to chkspelling.sh 2016-02-02 19:47:21 +11:00
Nyall Dawson
24d9c65494 Fix more classes which violate the rule-of-three
Also remove some empty destructors
2016-01-26 14:24:45 +11:00
Nyall Dawson
9cc9d424ce Add extra check for deprecations to documentation test
This check tests that if a function has been declared deprecated
with either Q_DECL_DEPRECATED or has a @deprecated Doxygen note
then it MUST have both the Q_DECL_DEPRECATD and @deprecated note.

It's important that both are used, as Q_DECL_DEPRECATED allows
throwing a warning if that method is used in code, while the
@deprecated doxygen note gives an indication to devs/PyQGIS users
of why it's deprecated and what should be used instead.

Ideally we'd also test for SIP /Deprecated/ tags, but I can't
find any reliable way to do this.
2015-12-07 21:55:36 +11:00
Matthias Kuhn
313c34ce22 [py3] Updates to sip files 2015-11-16 07:42:48 +01:00
Matthias Kuhn
56ccb2b858 sipClass_Klass is deprecated for a long time: replace with sipType_Klass 2015-11-11 23:22:51 +01:00
Nyall Dawson
719ff408a5 Add some missing SIP bindings, comment some classes as not available
in Python
2015-11-10 17:08:27 +11:00
Hugo Mercier
d16cdcf449 Add more options for filtering legend elements
This introduces two new options to filter legend elements:
- filter by expression: a boolean expression can be set. Only symbols of
features that make the expression evaluated to true will be kept in the legend
- filter by polygon: only symbols of features that are inside the given
polygon will be part of the legend.

The polygon filtering is used in particular for a new option in the
composer legend that allows to filter out anything that is not included
in the current atlas polygon.
2015-11-03 10:39:09 +01:00
Nyall Dawson
fe221d54bf Don't return QStrings by reference, since they're implicitly shared
anyway
2015-10-28 09:47:44 +11:00
Nyall Dawson
f1633a1796 Change all signals to use const refs for non trivial objects 2015-10-26 22:46:25 +11:00
Juergen E. Fischer
bf64f8d0a0 spelling fixes and indentation update 2015-10-22 21:56:54 +02:00
Nyall Dawson
d1be2ff214 Fix hardcoded border for raster legend items (fix #13540)
Previously raster legend items always had a fixed black border.
Now there's options to change the color/width of this border or
disable it entirely.
2015-10-09 06:12:37 +11:00
Nyall Dawson
c49b5b777f Change a lot of arguments to const references in core/gui
Rationale:
- there was a lot of large objects passed by value, so potentially
there's a speed bump from this
- even for implicitly shared classes like QString/QList there's still
a (small) cost for copying the objects when there's no reason to
- it's the right thing to do!
2015-10-07 12:02:04 +11:00
Juergen E. Fischer
c3b027121a debian packaging update and typo fix 2015-10-05 00:17:05 +02:00
Nyall Dawson
e553a79256 [composer] Fix image size/resolution was not honored during export (fix #13438) 2015-10-05 08:21:36 +11:00
Nyall Dawson
abf4e12181 [composer] Closer cropping to content for map items
Sponsored by NIWA
2015-09-25 18:55:35 +10:00
Nyall Dawson
dd759370bd [FEATURE][composer] Option to restrict image/SVG outputs to content
If selected, then the images output by composer will include only
the area of the composition with content. There's also an option
for margins to add around the item bounds if required.

If the composition includes a single page, then the output will
be sized to include EVERYTHING on the composition. If it's a
multi-page composition, then each page will be cropped to only
include the area of that page with items.

A new image export options dialog has been added to facilitate
this, which also includes handy shortcuts for overriding the
print resolution or exported image dimensions.

Sponsored by NIWA
2015-09-25 18:55:35 +10:00
Nyall Dawson
2f343008c1 [FEATURE][composer] Add fit page to contents option
New option in the composition panel, with optional extra margins
to add

Sponsored by NIWA
2015-09-25 18:55:35 +10:00
Nyall Dawson
2215d48712 [FEATURE][composer] Add option to hide pages from view/export
Sponsored by NIWA
2015-09-25 18:55:35 +10:00
Nyall Dawson
e8c3afa398 [FEATURE][composer] Custom format for grid annotations (fix #9292)
Allows composer map grid annotations in custom formats which are
evaluated using QgsExpressions. Made possible through the use
of Expression Contexts(tm)!
2015-09-08 17:31:34 +10:00
Nyall Dawson
829ff50200 Expose map settings (rotation, scale) through expression contexts 2015-09-07 20:24:56 +10:00
Nyall Dawson
9133538a74 [FEATURE][composer] Advanced customisation of cell background color
for attribute tables

This allows users to set differing colors for alternating rows and
columns, first/last row/column and header row. Fixes #5131.

Sponsored by Ville de Morges
2015-09-05 22:06:31 +10:00
Nyall Dawson
166e5bf9eb [composer] Make some set symbol methods clone symbol, nicer API
for PyQGIS (fix #13304)
2015-09-03 22:46:21 +10:00
Juergen E. Fischer
b39055b39c indentation update (now including autopep8) 2015-08-22 14:29:41 +02:00
Nyall Dawson
bfc8f56ad4 Display variables and functions from contexts in expression builder 2015-08-22 19:01:42 +10:00
Nyall Dawson
c9c12bc7f9 Fix warnings 2015-08-22 19:01:41 +10:00
Nyall Dawson
43bcc0c2a5 Finish porting composer to expression contexts 2015-08-22 19:01:40 +10:00
Nyall Dawson
a0e35a3893 Switch some composer expressions to contexts 2015-08-22 19:01:39 +10:00
Nyall Dawson
f5de32779f Add missing sip changes 2015-08-22 19:01:39 +10:00
Nyall Dawson
b87e5f7573 [FEATURE][composer] Data defined style preset for composer maps
Sponsored by City of Uster
2015-08-19 20:43:19 +10:00
Nyall Dawson
612df6ae14 [FEATURE][composer] Auto wrapping for text in fixed width columns
in attribute tables

Sponsored by City of Uster
2015-08-19 06:08:22 +10:00
Nyall Dawson
b78564899a [FEATURE][composer] Option for 'wrap text on' for attribute tables
Fix #8006

Sponsored by City of Uster
2015-08-19 05:16:12 +10:00
Nyall Dawson
759f842bc3 [FEATURE][composer] Vertical alignment control for attribute tables
Sponsored by City of Uster
2015-08-19 05:16:12 +10:00
Nyall Dawson
372534eb89 [composer] Add proper handling of multiline text in attribute tables
Previously multi-line text would overflow onto neighbouring cells.
Now rows will be expanded to fit required height of text.
Fix #10273.

Sponsored by City of Uster
2015-08-19 05:16:12 +10:00
Nyall Dawson
29cc0642a4 [composer] Add method for calculating height of text
Sponsored by City of Uster
2015-08-19 05:16:12 +10:00
Nyall Dawson
7527638d43 [FEATURE][composer] Data defined control over map layers
Adds new data defined control for the map layers to show in a
composer map. Expression result should be a | delimited list of
layer names which will be shown in the map.

Sponsored by City of Uster
2015-08-17 23:46:13 +10:00
Juergen E. Fischer
624f16cc2c indentation update 2015-08-16 11:56:27 +02:00
Nyall Dawson
19a833c23d Clean atlas interface - avoid storage of pointer to atlas feature 2015-08-13 08:35:43 +10:00