148 Commits

Author SHA1 Message Date
Nyall Dawson
7f0142c86a Working move item content tool 2017-11-07 11:32:38 +10:00
Nyall Dawson
7924aa1990 Fix regeneration of cached maps when zoom level changes 2017-11-07 11:32:38 +10:00
Nyall Dawson
753f6f5050 Start hooking up map widget gui 2017-11-07 11:32:38 +10:00
Nyall Dawson
23d0617bac Start porting map item 2017-11-07 11:32:38 +10:00
Nyall Dawson
71c41d49b7 Add export layer settings to QgsLayoutContext 2017-11-07 11:32:38 +10:00
Nyall Dawson
420821fd68 Fix correct frame bounding rects for shapes and node items 2017-11-07 11:32:38 +10:00
Nyall Dawson
938b239277 Port more node tool actions 2017-11-07 11:32:38 +10:00
Nyall Dawson
44fe2a8d08 Add tools to create node based items 2017-11-07 11:32:38 +10:00
Nyall Dawson
6b629e199e Port snappedAngle from composer 2017-11-07 11:32:38 +10:00
Nyall Dawson
783636dfa7 Port polygon and polyline items to layouts 2017-11-07 11:32:38 +10:00
Nyall Dawson
2ec31d84d3 Add configuration widget for shapes 2017-11-07 11:32:38 +10:00
Nyall Dawson
7674bd746b Cleanup item xml read/write, save shape properties 2017-11-07 11:32:38 +10:00
Nyall Dawson
26dcf792b0 Fix tests 2017-11-07 11:32:38 +10:00
Nyall Dawson
8ca6d3e717 Refactor layout item gui registry to allow metadata for duplicate item types
This allows registration of item creation actions which create
items with an existing item type, but custom creation functions.

E.g. allowing actions for creation of ellipse/triangles/etc
from a single layout item type.
2017-11-07 11:32:38 +10:00
Nyall Dawson
f524c80b11 More shape porting 2017-11-07 11:32:38 +10:00
Nyall Dawson
cf7714b722 Restore tests, add button to set page background in ui 2017-11-07 11:32:38 +10:00
Nyall Dawson
4a1bcb3266 Revert automatic detection for preview renders
Turns out there's no reliable way to differentiate widget
vs QImage based renders inside QGraphicsItems
2017-11-07 11:32:38 +10:00
Nyall Dawson
edecc37c9f Start work on exporter for layouts 2017-11-07 11:32:38 +10:00
Nyall Dawson
9630a39190 [layouts] Nicer detection of rendering in a view
In compositions, a flag must be explicitly set to indicate
whether the render occuring is for "previews" (i.e.
rendering in a graphics view) or outputs (i.e. rendering
to a image/pdf/other destination device)

This isn't nice api.

So we avoid this by checking the paint device type when
an item is being rendered.
2017-11-07 11:32:38 +10:00
Nyall Dawson
625eef80eb Fix resizing with mouse handles acts strangely when items have frames 2017-11-07 11:32:38 +10:00
Nyall Dawson
8629225a41 Work on functional rotation for items 2017-11-07 11:32:38 +10:00
Nyall Dawson
ce79ff30c8 Add refresh action for layouts 2017-11-07 11:32:38 +10:00
Nyall Dawson
3678f01e54 Port item opacity handling from composer 2017-11-07 11:32:38 +10:00
Nyall Dawson
75898d8e09 Port 'exclude from exports' functionality from composer 2017-11-07 11:32:38 +10:00
Nyall Dawson
4e8878dcb3 Port item blend mode support to layouts 2017-11-07 11:32:38 +10:00
Nyall Dawson
0143d0be68 Add a signal to QgsLayoutContext when flags change 2017-11-07 11:32:38 +10:00
Nyall Dawson
91c3b5d255 Add a shortcut menu to items panel, with option to show
item properties

Refs #11581
2017-11-07 11:32:38 +10:00
Nyall Dawson
ab4e6c11ed Fix resizing items with non-top-left reference point using mouse handles 2017-11-07 11:32:37 +10:00
Nyall Dawson
1c735d59ee Handle position and size with units and ratio lock in item properties 2017-11-07 11:32:37 +10:00
Nyall Dawson
b2414d8d8d Start porting item properties widget 2017-11-07 11:32:37 +10:00
Nyall Dawson
d3836e502a Move population of layout gui registry from GUI->app
Since we don't want all the item type subclass config widgets
to have to reside in gui, we need to populate the registry
from app instead.
2017-11-07 11:32:37 +10:00
Nyall Dawson
8fb2c3cf6e Fix doxygen test 2017-10-10 06:33:32 +10:00
Nyall Dawson
02acbb4184 Fix undo/redo for groups 2017-10-09 19:23:46 +10:00
Nyall Dawson
e17b32c6e2 Fix moving/resizing grouped items 2017-10-09 19:23:46 +10:00
Nyall Dawson
606ad21a51 Port group actions from composer 2017-10-09 19:23:46 +10:00
Nyall Dawson
5aa9a1556f Start porting group handling from composer 2017-10-09 19:23:46 +10:00
Denis Rouzaud
6e14854f90 [sipify] remove redundant private sections 2017-10-09 09:51:40 +02:00
Nyall Dawson
0c858d27d6 Port display name handling from composer 2017-10-06 18:43:10 +10:00
Nyall Dawson
c8eaeb8f93 Port hide pages action from composer 2017-10-06 17:48:25 +10:00
Nyall Dawson
aa7beaad6a Port keyboard nudge of items from composer 2017-10-06 17:48:25 +10:00
Nyall Dawson
bb2e1efdb8 Create undo/redo commands when changing item visibility 2017-10-06 17:48:25 +10:00
Nyall Dawson
fd0cba3914 Hide most of QgsLayoutModel from stable API and remove from bindings
We only expose the QAbstractItemModel interface as stable API - the
rest is non-stable and subject to change.
2017-10-06 17:48:25 +10:00
Nyall Dawson
a66f2cb684 Nicer API for adding/removing items
Automatically create the corresponding undo commands, so that
plugins and scripts which add/delete items will be added to
the undo stack without any work required.
2017-10-06 17:48:25 +10:00
Nyall Dawson
c022bc825e [FEATURE][layouts] Add 'resize to square' action
Resizes all selected items so that they are square
2017-10-06 17:48:25 +10:00
Nyall Dawson
e686e2e565 Fix doxygen warning 2017-10-06 17:48:25 +10:00
Nyall Dawson
e3616f08c4 [FEATURE][layout] Add actions to auto resize items in a selection
Options are resize to narrowest, widest, shortest and tallest.
2017-10-06 17:48:25 +10:00
Nyall Dawson
5141c05ba7 [FEATURE][layout] Add item distribution actions
Adds actions for distributing selections of items by their
left/center/right/top/bottom edges.

Useful for quickly evenly distributing items in the layout

Needs new icons
2017-10-06 17:48:25 +10:00
Nyall Dawson
0939333273 Port item alignment to layouts 2017-10-06 17:48:25 +10:00
Nyall Dawson
822d6f76a3 Move actions which apply to selected items only to QgsLayoutView
Selections are a gui concept, so these actions belong to the
gui class instead of cluterring QgsLayout
2017-10-06 17:48:25 +10:00
Nyall Dawson
fdba8f199a Add tests for changing item z order 2017-10-06 17:48:25 +10:00