Utils: Introduce a staging area for gui values

Accessing gui elements is very aspect-specific, whereas the
rules when and how values are synchronized are rather general.

Splitting the two concepts and having a permanent 'buffer' area
that is synchronized with the gui elements if and only if they
have been created helps to keep the boilerplate needed per-aspect
at a minimum.

This value could also serve as "model" in case we wanted to allow
multiple "views" in different places of the gui onto that aspect.

Change-Id: I34832512b99c53cb0e4df437ee9b4c5d17a2ad8f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
hjk
2023-07-12 15:41:06 +02:00
parent 433f8a3241
commit 4ab1d75ee6
6 changed files with 211 additions and 213 deletions

View File

@@ -36,8 +36,8 @@ public:
void writeSettings() const override;
private:
void guiToInternal() override;
void internalToGui() override;
void guiToBuffer() override;
void bufferToGui() override;
SourcePathMapAspectPrivate *d = nullptr;
};