-
Dmitry Kazakov authored
This patch introduces a lot of things: 1) Implements a proper model-view-controller design for all the paintop preset-based properties, such as opacity, flow and size: Model --- KisPaintOpSettings Controller --- KoResourceManager (also tracks dependencies among the preset and its derived properties, such as opacity, size, flow, composite op) View --- KisPaintOpBox. Basically, it means that KisPaintOpBox doesn't write to the settings directly anymore. Instead, it uses KoResourceManager for that. 2) Well, there are still a couple of flaws in the MVC design. E.g. the settings widgets still write directly into the settings bypassing the resource managers. To overcome this issue see the next bullet about KisResourceUpdateMediator. There is also a bigger problem, the size of the brush is still fetched through the access to the GUI elements, or, more precisely m_optionsWidget. I don't think it can be solved atm :( 3) Adds KisResourceUpdateMediator. This is a special class that allows the resource manager to track the changes in complex resources, such as KisPaintOpPreset. When such resource changes internaly, all the derived resources get notification, and if they are also changed, a corresponding signal is emitted. There are still two regressions present: 1) Locked Settings functionality doesn't work 2) Resizing of the brush using Shift+Gesture is slow again :(
65fa65a9