Extending IToolViewFactory to be able to save state information

Andreas Pakulat apaku at gmx.de
Thu Jun 26 21:10:51 UTC 2008


Hi,

currently when a toolview wants to save some state thats pretty much
impossible because there can be n toolviews and the last one overwrites
the stuff from the first one as the toolviews don't know about each
other.

My idea to help with this is providing something like

void saveState( KConfigGroup& );
void restoreState( KConfigGroup& );

on IToolViewFactory (as there's currently no IToolView interface that
toolviews use to subclass from). This would get a config group which
uniquely identifies the toolview in KDevelop (i.e. similar to how area's
store their own state) and can just write its setting into that
toolview. 

This would allow to easily implement storing the currently opened state
of the project treeview and more importantly wether the detail-widget
(i.e. currently only buildset) was visible or not.

Anybody with a better idea how to solve this? Or any pointers where I
should start looking for code that would call these functions?

Andreas

-- 
You learn to write as if to someone else because NEXT YEAR YOU WILL BE
"SOMEONE ELSE."




More information about the KDevelop-devel mailing list