Project: QGIS

Version: 3.0.0

Feature: Map Composer Overhaul

This is a major rework to how compositions are managed in the code of QGIS.

Highlights are:

  • A new QgsLayoutManager class which is used for storage and serializing/deserializing of compositions. A QgsLayoutManager is attached to QgsProject. This allows core code to access the compositions attached to a project. All handling of compositions has been moved from app to core, making it easy for server (and other non-app based projects. QField/roam?) to access project compositions without resorting to fragile xml parsing.

  • Composer windows are created on demand and destroyed on close. This avoids the heavy requirement of creating all composer windows and widgets for every single composer item when loading projects. It was the main reason loading projects with compositions were so slow previously. Now, composer windows are created only when the window is opened and destroyed when the window is closed. Composer item configuration widgets are also only created on demand (when an item is selected) instead of precreating all widgets.

  • A side benefit of destroying composer windows on close is that we now no longer suffer from a Qt bug which blocked use of floating docks in composer windows. Now you can float the item/composition/etc panels! Much nicer for full screen working with compositions on multi-monitor setups.

  • Reworked API for working with composers through iface. Since composer windows don't exist unless they are currently open, all the iface methods for interacting with composers have been redone to make it clear that they only apply to open windows. Additionally, a simple composer interface which provides a stable API for plugins and scripts to work with composer windows has been added. Very basic for now, but in future we can extend with more hooks to allow plugins to interact with composer windows.

  • Lots of code cleanups and removal

More info at https://north-road.com/qgis-layout-and-reporting-engine-campaign/

This feature was funded by The Swiss QGIS User Group and many more!

This feature was developed by Nyall Dawson (North Road)