11 Commits

Author SHA1 Message Date
Nyall Dawson
5aa9a1556f Start porting group handling from composer 2017-10-09 19:23:46 +10:00
Nyall Dawson
a515e953b8 Add support for reading/writing item properties to XML 2017-07-25 12:54:57 +10:00
Nyall Dawson
b4f5025d4f Port shape items to layouts 2017-07-18 12:42:06 +10:00
Nyall Dawson
cf488d34a4 Split layout item registry into two separate registries
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.
2017-07-11 11:06:36 +10:00
Nyall Dawson
179c51c953 Don't auto populate QgsLayoutItemRegistry
Initially create an empty registry, allow it to be populated
at a later stage.
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
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
c228132cbb Layout designers listen out for new item types in registry and
auto create actions for adding new items of the newly registered type

This avoids hard-coding in available item types into layout UI classes,
and allows designers to handle plugin-supplied item types
2017-07-03 13:57:42 +10:00
Nyall Dawson
97e8d9cf9e Emit signal when new layout item types are added to registry 2017-07-03 13:29:23 +10:00
Nyall Dawson
d23abf955a Add registration of item types to QgsLayoutItemRegistry 2017-07-03 13:22:15 +10:00
Nyall Dawson
18b2b5240b Add some base classes for layouts 2017-06-30 17:01:52 +10:00