Unlike in 2.x, Layouts in 3.0 adopt the standard UX of dragging
out rulers to create guide lines (instead of clicking on a ruler
position to create a guide)
Tools can now indicate (via setFlags()) if they desire snapping
to be active for the tool. When a tool has the flag set,
any QgsLayoutViewMouseEvents it receives will have a snappedPoint()
available which returns the mouse event point snapped using
the layout's snapping settings.
values are automatically updated when the combo box unit changes
This means that you can flip between units and things like
the existing width and height are converted immediately to the
new unit
This allows the designer dialog to group the corresponding item
actions together (i.e. grouping all basic shape creation actions
together), but without any hardcoded special handling so that
plugin based items can also be grouped.
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.
Instead of relying on forward declared c++ classes from
gui in QgsLayoutItemRegistry, instead create a
QgsLayoutItemGuiRegistry which handles registration
of all the GUI specific behavior relating to layout items.
Remove all GUI related code from QgsLayoutItemRegistry.
This creates a cleaner split between core/gui code, and
given that there'll be a lot of gui specific behavior
which needs to be handled by a registry it makes sense
to keep this isolated in gui.
It also plays nicer with the sip bindings, which can't
handle forward declared gui classes in core.
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.
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)