Nyall Dawson
0b188295bc
Port item selection and lock related code from composer
2017-10-06 17:48:24 +10:00
Nyall Dawson
4e61ea892a
Port frame and background handling to layout items
...
And add support for frame widths with units
2017-10-06 17:48:24 +10:00
Nyall Dawson
a71f2ad5dc
Fix non-virtual destructor
2017-09-25 12:46:49 +10:00
Nyall Dawson
b44cf5d10f
Fix memory leak
2017-09-18 12:10:46 +10:00
Nyall Dawson
a77950cbf6
SIP, indentation and documentation updates
2017-09-05 09:53:48 +10:00
Nyall Dawson
62dcd0dad5
Start work on undo/redo support for layouts
2017-09-05 09:39:22 +10:00
Nyall Dawson
1589b4e648
Implement some saving/restoring layout items to XML
2017-09-05 09:39:22 +10:00
Nyall Dawson
66e1cf04e6
Port methods to retrieve layout items
2017-09-05 09:39:22 +10:00
Nyall Dawson
3fd2e0921d
Fix ownership issue with layout guides
2017-08-07 22:31:44 +10:00
Nyall Dawson
94362fe218
Add signal when page is about to be deleted
2017-08-07 21:43:31 +10:00
Nyall Dawson
e453116101
[needs-docs] Refine snapping logic for layouts
...
Previously grids would always take precedence when both a grid
and guide were within tolerance of a point.
Now, guides will always take precedence - since they have been
manually set by users we make the assumption that they have
been explicitly placed at highly desirable snapping locations,
and should be selected over the general grid.
Additionally, grid snapping was previously only done if BOTH
x and y could be snapped to the grid. We now snap to the nearest
grid line for x/y separately. This means if a point is close
to a vertical grid line but not a horizontal one it will still
snap to that nearby vertical grid line.
2017-08-07 19:34:28 +10:00
Nyall Dawson
66875641a3
Hook up snap to guides menu option
2017-08-07 19:34:28 +10:00
Nyall Dawson
9267f8676c
Readd menu option to show/hide guides
2017-08-07 19:34:28 +10:00
Nyall Dawson
98ff702491
[FEATURE] Add a button in guide manager to apply current page's guides
...
to all other pages
This allows resetting all other pages to use the guide configuration
for the current page. Since guides are now single page only (required
to handle mixed page size/orientation layouts), this is a shortcut
to allow guide configuration to be setup on a single page and then
easily transferred to all other pages in the layout.
2017-08-07 19:34:28 +10:00
Nyall Dawson
df3bcddab7
Hook up clearing guides
2017-08-07 19:34:28 +10:00
Nyall Dawson
da4382309e
Allow deletion of guides by dragging outside of pages
2017-08-07 19:34:28 +10:00
Nyall Dawson
e06b0af91b
Support dragging existing guides in rulers
2017-08-07 19:34:28 +10:00
Nyall Dawson
c6c9c6fabf
Show guide positions in rulers
2017-08-07 19:34:28 +10:00
Nyall Dawson
ab726c4777
Add methods to determine visible pages in a view
2017-08-07 19:34:28 +10:00
Nyall Dawson
9458f1f934
Support deletion of guides through manager
2017-08-07 19:34:28 +10:00
Nyall Dawson
e718f92bd5
Better headers in guide view
2017-08-07 19:34:28 +10:00
Nyall Dawson
048a5b79b6
Nicer table view for guide editing
2017-08-07 19:34:28 +10:00
Nyall Dawson
886a1208ef
Dropping guides outside of pages doesn't create new guides
2017-08-07 19:34:28 +10:00
Nyall Dawson
ef6727518d
[FEATURE] Add a dock widget showing snap guides for current page
...
Allows creation of snap lines at specific locations, and
adjusting position of existing guides to exact coordinates
2017-08-07 19:34:28 +10:00
Nyall Dawson
f5126b0abd
New class QgsLayoutGuideCollection for storing sets of layout snap guides
...
The class is a QAbstractListModel subclass, making it easy
for creation of different views showing the guides in a layout.
Additionally, a QSortFilterProxyModel (QgsLayoutGuideProxyModel)
has been created to filter QgsLayoutGuideCollection to guides
with matching page numbers and orientations.
2017-08-07 19:34:28 +10:00
Nyall Dawson
fa5eb4e5ad
Refine QgsLayoutGuide API
2017-08-07 19:34:28 +10:00
Nyall Dawson
db36440cfc
Start on classes for snapping guide items
2017-08-07 19:34:28 +10:00
Nyall Dawson
3dbc1a0c2a
Refine z order for some new items
2017-08-07 19:34:28 +10:00
Nyall Dawson
0d0a3c2cdc
Code refactor - split grid appearance settings into their own class
2017-08-07 19:34:28 +10:00
Nyall Dawson
d0dfec72cb
Add actions to switch grid display/snapping on/off
2017-08-07 19:34:28 +10:00
Nyall Dawson
5be237fdd9
Add ability for QgsLayoutSnapper to snap to grid
2017-08-07 19:34:28 +10:00
Nyall Dawson
361dd312bc
Start on layout snapper
2017-08-07 19:34:28 +10:00
Nyall Dawson
b42c055e97
Restore drawing of page grids
2017-08-07 19:34:28 +10:00
Nyall Dawson
213064a8af
Fix layout context flags not being respected when rendering items
2017-07-25 12:54:58 +10:00
Nyall Dawson
fabfd77c2b
Show known page size when opening page properties if current page size matches
2017-07-25 12:54:58 +10:00
Nyall Dawson
a3e26785f8
[needs-docs] Start on right click menu for layouts
...
Currently only contains option for removing the current
page and (non-functional) option for setting current page
properties
2017-07-25 12:54:58 +10:00
Nyall Dawson
e885966cb6
Add method to retrieve page at a specified layout position
2017-07-25 12:54:58 +10:00
Nyall Dawson
1e4c95431c
Don't use constant space between pages - doesn't work well for non mm units
2017-07-25 12:54:58 +10:00
Nyall Dawson
0ab3b8e0ad
Fix cursor position display for multipage layouts
2017-07-25 12:54:57 +10:00
Nyall Dawson
416e1e4bbf
Fix drawing of rulers with multipage layouts
2017-07-25 12:54:57 +10:00
Nyall Dawson
4cf9827ca2
Draw page shadow in layout units
...
Simplifies code a lot, pixel based size proved to complex for
small result
2017-07-25 12:54:57 +10:00
Nyall Dawson
5cfc9cc655
Add a dialog for inserting new pages into a layout
2017-07-25 12:54:57 +10:00
Nyall Dawson
39bf23a5d5
Start on reflow support for page collections (needs tests)
2017-07-25 12:54:57 +10:00
Nyall Dawson
79a4694177
Add support for adding/removing pages to a collection
2017-07-25 12:54:57 +10:00
Nyall Dawson
ea32391280
Add methods for handling page size to QgsLayoutItemPage
2017-07-25 12:54:57 +10:00
Nyall Dawson
9df4a67d6d
Add a page collection to layouts, and start porting composer page items
2017-07-25 12:54:57 +10:00
Nyall Dawson
3cf06db467
Port item id and uuid code
2017-07-25 12:54:57 +10:00
Nyall Dawson
a515e953b8
Add support for reading/writing item properties to XML
2017-07-25 12:54:57 +10:00
Nyall Dawson
09dd6db97b
Add API to save/restore QgsLayoutObject properties to XML
2017-07-25 12:54:57 +10:00
Nyall Dawson
4e0e038aab
Dox updates
2017-07-18 13:04:03 +10:00