Summary
We have a flexible, decoupled navigation mechanism in place and are successfully transitioning between different views. We have the basics of a navigation bar in place and a working content pane as designed at the beginning of the chapter.
Having the UI call the business logic layer to emit a signal that the UI then reacts to may seem like a bit of a roundabout way of navigating between views, but this business logic signal/UI slot design brings benefits. It keeps the UI modular as the views don't need to know about each other. It keeps the logic for navigation in the business logic layer and enables that layer to request that the UI navigate the user to a particular view without needing to know anything about the UI or the view itself. Crucially, it also gives us intercept points so that when the user requests navigation to a given view, we can handle it and perform any additional processing we need, such as state management or cleanup.
In Chapter 4, Style, we will introduce a shared style component, and QML modules and icons before we complete our UI design with a dynamic command bar.