This post is part of a series exploring the new style dock.
- Part 1 – Styles
- Part 2 – Plugin pages
- Part 3 – New panel API
A while ago did a post about the new style dock in QGIS. The first stage was getting labels working and then moving on to styles. After many iterations of the UIs and the APIs I’m pretty happy with the release state of the dock. We now have styles (vector and raster), labels, saved styles, undo redo, and plugin support (yep!)
Of all the features I have added to QGIS this is my favorite. Nothing has made me feel more productive then working on this feature and seeing the gains it allows in day to day work.
If you haven’t used the style dock yet I would strongly encourage you to grab the nightly QGIS builds and give it a crack, F7 to open anytime, or use the paint brush icon on the layers panel. I’m not bragging when I say that it will change your life in QGIS for the better, it has become a part of my daily workflow. No going back!
Dock break down
As you can see in the image there is a few main things in the dock, the layer selection, style options selector (come back to this later), undo/redo, live update and apply.
One of the key things for me when doing this dock was instant feedback. I really hated the open close, change, apply, repeat workflow of the old dialogs. Every widget in the dock can request a redraw on change so you can see feedback instantly in the canvas. This might not always be what you want so you can disable it for those cases and use manual apply.
Live updates come with a risk. What happens if you apply something you didn’t mean. There is no cancel button. Well not to fear we now have a undo/redo stack. Any style change will now add an entry to the style undo stack so you can rollback and forward any changes. Undo/Redo now allows for fearless style changes, so style away to your hearts content and rollback anything you don’t like.
I will also add that the undo stack is stored on the layer object itself, so closing the dock doesn’t clear the stack nor does changing the active layer. You can also access the stack via the Python bindings if needed.
On the side of the dock we have the different style options. These buttons change the style options in the main panel.
- Saved styles
- Saved styles
The Saved Styles and Undo/Redo will always be the last in the stack regardless of the active layer type.
Style UIs (Note: GIF heavy section)
Almost all the widgets have been tweaked to allow for better dock layout. Widgets are now in a more uniform layout which flows better when moving around in the dock and just generally look better.
When I talked about live updates before this applies to everything, even the data defined buttons. Any changes in those will be reflected into the canvas without any extra clicks.
Changing renderers is now simple and quick. You go from nothing to seeing instant results in seconds.
A excellent side effect of the live updates is workflows that were never exposed before and now possible. Using the graduated renderer histogram for example. As the histogram allows for live edits we can now update the map on the fly from adjusting the histogram.
Style UIs (Raster)
As soon as I finished vectors it became pretty evident that raster layers were going to be the next main thing to move. So the style dock fully supports raster styling.
For the final trick. Here we have the undo/redo stack in action. Unlimited undo/redo on all layers when changing styles. Fearless change he we come
Trying to find a picture to sum up my feelings about the style dock and I think this fits
but of course I’m super bias.
Stay tuned for Part 2 where I talk about adding your own style panels to the style dock.
Filed under: Open Source, qgis