13 Commits

Author SHA1 Message Date
Nyall Dawson
867bdb6117 Move click-and-drag detection to QgsLayoutViewTool 2017-07-11 11:06:36 +10:00
Nyall Dawson
5cac2f71f0 Allow setting pen/brush for QgsLayoutViewRubberBand 2017-07-11 11:06:36 +10:00
Nyall Dawson
a346736df2 Handle tool changes mid press-release operation
Because it's possible for users to change the tool while a
press release operation is mid-way, e.g. by pressing a tool
shortcut key.
2017-07-11 11:06:36 +10:00
Nyall Dawson
3f66520828 Add layout panning tool 2017-07-11 11:06:36 +10:00
Nyall Dawson
db62a745eb Add a temporary layout item type for testing 2017-07-11 11:06:36 +10:00
Nyall Dawson
86bc8af216 Add some unit tests 2017-07-11 11:06:36 +10:00
Nyall Dawson
3843b5ef37 Create rubber band classes for layout views
c++ QgsLayoutItem metadata classes can directly register
a function which creates a QgsLayoutViewRubberBand for the item
subclass.

Python code cannot utilise this shortcut (due to inaccessibility
of forward declared gui classes from core Python classes), so
there's a separate gui registry utility class added for registering
prototypes for rubber bands for already registered item types.
2017-07-11 11:06:36 +10:00
Nyall Dawson
4ebea75e6a Subclass QMouseEvent to QgsLayoutViewMouseEvent
For easy access to mouse event coordinates in layout coordinate
space (and future use with snapped item coordinates)
2017-07-11 11:06:35 +10:00
Nyall Dawson
a6ccd63bc8 Start implementing an add item tool 2017-07-11 11:06:35 +10:00
Nyall Dawson
25034979e3 Add some unit tests for layout tools 2017-07-11 11:06:35 +10:00
Nyall Dawson
99f34300b9 Add shell classes for layout view tools
Copy the same model as QgsMapCanvas uses, with separate
classes for individual interaction tools instead of keeping
all the logic in the QGraphicsView subclass (as is done
with composer)
2017-07-11 11:06:35 +10:00
Nyall Dawson
4c2447fd89 Add shell for QgsLayoutView 2017-07-11 11:06:35 +10:00
Nyall Dawson
4f21afac0f Shell layout designer dialog 2017-07-03 12:14:56 +10:00