Skip to content

Restructure Strangevis Dataflow

Magne.Stromsnes requested to merge restructure into master

This restructure aims to provide a better data-flow inside the application.

The main change is to enforce that views into the data (renderwidget) never change that data. This isn't fully enforced for the texturestore (environment) currently.

It moves construction of the data-classes (properties, texturestore, colormapstore) from MainWindow to the new Application class, which subclasses QApplication. It will be the responsibility of toolbars/interaction widgets to update their corresponding SharedProperties, and the responsibility of Application to ensure such changes propagate to other data classes as needed. The current example of this is the currently selected colormap.

It introduces the use of Interface classes for the data stores. This makes potential future testing easier and helps prevent connect() calls on the datastores, as they are not QObjects. The Properties-classes that aren't SharedProperties don't enforce this.

It includes much greater attempts at const correctness.

In total, the new connect-flow should be (needs a bit more work): Widgets only use SharedProperties Toolbars use both signals and slots. Renderwidgets use only signals. Application uses signals from SharedProperties to update other data-stores.

Widgets are allowed to read from data-stores, so that they can load textures and populate lists etc.

Edited by Magne.Stromsnes

Merge request reports