How to properly save/restore toolbar UI state
Andreas Pakulat
apaku at gmx.de
Sun Dec 5 01:01:45 UTC 2010
On 04.12.10 22:18:27, Milian Wolff wrote:
> Hey all, esp. Adymo.
>
> Did you ever think of properly saving and restoring the UI state of toolviews?
Yes.
> E.g. the splitter in the projectmanagerview is always reset on KDevelop
> restarts. Should this work, if yes - how?
No.
> If not, what do you think should I do to fix this?
I think the only way to do this is adding a new interface which has a
save/restore function taking a KConfigGroup. Then toolview factory would
always return this interface. Or you put a save/restore on the factory
providing the QWidget of the toolview instance and a kconfiggroup. Then
the factory could internally cast the widget to the right type and
query/set the config stuff.
Though when to do the save and restore, I have no idea...
Andreas
--
You will engage in a profitable business activity.
More information about the KDevelop-devel
mailing list