40312 Commits

Author SHA1 Message Date
Nyall Dawson
19a7863ea4 Add methods to construct layout size/point from QSizeF/QPointF 2017-07-18 12:42:06 +10:00
Nyall Dawson
d14f3b9c13 Add QComboBox subclass widget for selecting layout units 2017-07-18 12:42:06 +10:00
Nyall Dawson
cdec70babe [needs-docs] Add a new item properties dialog
When adding a new item to a layout, if the user just does a single
click of the mouse (vs a click and drag to set the new item
position/size), then a dialog is shown asking to user for
the new item size/position/reference point.

This allows easy creation of items with an exact position/size
and is common behavior in most proper DTP/illustration apps.
2017-07-18 12:42:06 +10:00
Nyall Dawson
b4f5025d4f Port shape items to layouts 2017-07-18 12:42:06 +10:00
Nyall Dawson
38cbbe23aa Implement a cache for item content renders
Speeds up redraw of items, making use of layout designer much
faster with slow to redraw items.

This will also make it possible to use live effects on layout
items without killing performance of the designer.
2017-07-18 12:42:06 +10:00
Nyall Dawson
436710a177 Ensure that item painter is correctly scaled so that painter units are pixels 2017-07-18 12:42:06 +10:00
Nyall Dawson
56bb65709d Change QgsLayoutItem::draw to use a renderContext instead of
direct QPainter argument

This will make use of other rendering code within layout items
much easier - since symbology/text renderer/diagrams/etc all
require QgsRenderContexts for use, it makes sense for
layout item rendering to also use this approach.

This also avoids lots of duplicate code which was scattered
throughout different composer item types to manually handle
creation of QgsRenderContexts when required.
2017-07-18 12:42:06 +10:00
Nyall Dawson
c282024748 Partially port some layout utils for render context creation 2017-07-18 12:42:06 +10:00
Nyall Dawson
7a0851c2ce Shell class for QgsLayoutItemMap 2017-07-18 12:42:06 +10:00
Nyall Dawson
00405fd6b5 Start porting item rotation 2017-07-18 12:42:06 +10:00
Nyall Dawson
c3456133dc Add QgsLayoutUtils 2017-07-18 12:42:06 +10:00
Nyall Dawson
6fd06983a6 Port data defined item position and size 2017-07-18 12:42:06 +10:00
Nyall Dawson
3f0a0cb063 Ensure that moving/resizing items respects reference point 2017-07-18 12:42:06 +10:00
Nyall Dawson
d0c844ed67 Implement item size and positioning using layout units 2017-07-18 12:42:06 +10:00
Nyall Dawson
498c4cda16 Add some rendering checks for layout items 2017-07-18 12:42:06 +10:00
Nyall Dawson
dd370373be Port a bunch of low-level methods to layouts
Relating to expression contexts and variables
2017-07-18 12:42:06 +10:00
Nyall Dawson
15b65fa6d4 Port some basic functionality from QgsComposerObject 2017-07-18 12:42:06 +10:00
Nyall Dawson
a6156d9221 Layouts have a name 2017-07-18 12:42:05 +10:00
Nyall Dawson
ab79b1560c [layout] Add measurement unit handling to QgsLayout
Allows layouts to convert from various units to their
own native units

Also added a QgsLayoutContext to QgsLayout.
2017-07-18 12:42:05 +10:00
Nyall Dawson
cd380f616c Add measurement converter and dpi to layout context 2017-07-18 12:42:05 +10:00
Nyall Dawson
b2b35dd084 Add a context class for layouts
Stores information relating to the current context (such as
associated feature and layer) and rendering settings for a layout.
2017-07-18 12:42:05 +10:00
Nyall Dawson
d70f53c405 Merge pull request #4876 from nyalldawson/upstream_ftw
Upstream some sourcepole fork commits
2017-07-18 11:02:52 +10:00
Sandro Mani
514e43057a Re-use timer in QgsMapCanvas::refresh to ensure multiple refresh requests get compressed
Forward port from Sourcepole's fork
2017-07-18 09:51:45 +10:00
Sandro Mani
f405b96ddd Demote translation loading warning to debug msg
(forward port from Sourcepole's fork)
2017-07-18 09:37:28 +10:00
Juergen E. Fischer
9bae832753 add (unemitted) signals to provider source selectors to silence data
source manager connection warnings
2017-07-18 00:09:32 +02:00
Juergen E. Fischer
205b7051dc don't close database selection dialogs 2017-07-17 22:24:18 +02:00
Juergen E. Fischer
bae6d56388 consider datum transformation when pasting features (fixes #16846) 2017-07-17 22:22:49 +02:00
rldhont
349c996ad2 [Server] WMS GetFeatureInfo refactoring cleanup 2017-07-17 15:47:55 +02:00
Juergen E. Fischer
bcc8e90640 Fix qgsversion.h creation 2017-07-17 15:26:43 +02:00
David
06cb6342fc run target t2tdoc (followup 478dd209) 2017-07-17 13:17:57 +02:00
David
44cb806047 Additional libraries for Fedora 2017-07-17 13:17:57 +02:00
rldhont
f926033699 [Server] WMS GetFeatureInfo refactoring 2017-07-17 12:39:34 +02:00
Alexander Bruy
e61daed979 Merge pull request #4869 from alexbruy/network-analysis
[processing] restore network analysis algorithms
2017-07-17 12:45:16 +03:00
Alexander Bruy
f3f74a9ddf [processing] adapt network analysis algorithms to latest API changes 2017-07-17 11:32:12 +03:00
Alexander Bruy
4a6ceffc54 [processing] make service area outputs optional 2017-07-17 11:09:28 +03:00
Alexander Bruy
bee5683643 [processing] allow diferent CRS for point layers and network layer 2017-07-17 11:09:28 +03:00
Alexander Bruy
95de3a414a [processing] add cancellation support where possible 2017-07-17 11:09:28 +03:00
Alexander Bruy
5af177e963 [processing] restore Service area from layer 2017-07-17 11:09:28 +03:00
Alexander Bruy
abd14e8b94 [processing] restore Service area from point 2017-07-17 11:09:28 +03:00
Alexander Bruy
1e795960b6 [processing] restore Shortest path from layer to point 2017-07-17 11:09:28 +03:00
Alexander Bruy
494ceff3b4 [processing] restore Shortest path from point to layer 2017-07-17 11:09:28 +03:00
Alexander Bruy
c5ed53942c [processing] restore Shortest path from point to point 2017-07-17 11:09:28 +03:00
Alexander Bruy
6c0cb2f5c0 Merge pull request #4872 from alexbruy/network-api
[API] small improvements for network analysis API
2017-07-17 11:08:04 +03:00
Matthias Kuhn
246685b0cb [processing] Better error reporting in point on surface 2017-07-17 08:38:01 +02:00
Matthias Kuhn
2b2d5e3637 [FEATURE] Give access to geometry errors
When methods are called that use GEOS to create new geometries, the
result geometries now contain information about what has gone wrong in
case of an error.

In practice, this means it's possible to give more detailed information
in place (and not only in the message log) when things like processing
algorithms fail.
2017-07-17 08:38:01 +02:00
Nyall Dawson
db11185d24 Make doc test happy 2017-07-17 13:24:14 +10:00
Nyall Dawson
c404b8020a Fix uninitialized member (thanks to Coverity) 2017-07-17 13:00:28 +10:00
Nyall Dawson
b24370dca3 Fix use after delete error (thanks to Coverity) 2017-07-17 12:59:09 +10:00
Nyall Dawson
4e5597ab72 Merge pull request #4848 from nyalldawson/virtual_agg
Fix aggregate calculation in virtual fields
2017-07-17 12:49:47 +10:00
Nyall Dawson
3a2710efe5 Merge pull request #4870 from nyalldawson/algs3
Port 4 more algs to new API
2017-07-17 07:51:47 +10:00