[Kst] branches/work/kst/kst1kde4/kst/src/libkst

Barth Netterfield netterfield at astro.utoronto.ca
Fri Nov 20 20:31:32 CET 2009

On Friday 20 November 2009 13:53:46 Peter Kümmel wrote:
> Barth Netterfield wrote:
> > 	deleteDependents: an interesting one - 2 schools of thought:
> > 		either, we can delete any object at any time,
> > 		and this method deletes everything that depends on it
> > 		or: we can only delete things that are otherwise not
> > 		used (the kst 1.x way) and this method goes away
> Isn't the way "we can only delete things that are otherwise not used"
> much better than "can delete any object at any time"? Because who knows
> the right time?

This is a user preference question: do I want to be able to delete a vector 
and everything it depends on from the data manager, or do I have to start at 
the top of the tree, eg,  remove the curve from the plot, delete the curve, 
then delete the vector...  1.x had a 'purge' button which would repeatedly 
delete all unused object until everthing that was unused was gone to make this 
more convenient.  That being said, I tend to agree we should go back to the 
1.x way.
> > 	getUsage(): would go away if we use QSharedPointers.
> >
> > and it inherits
> > 	NamedObject: needed for everything.  It is in a separate class
> > 		so viewitems can also get at it
> > 	KstRWLock: for locking.  Don't know its history
> I assume we could find a Qt replacement for KstRWLock and we don't
> need to inherit from that Qt class.

QReadWriteLock looks like a likely candidate.
> > 	QObject: signals, slots, and much much more - keep it.
> when needed ...
I think most, if not all Objects need these things.
> > So... at the end of the day, I think we still want Kst::Object, but it
> > may become a lot thinner.
> The questions remains, for what do we need Object then?

-Uniform/easy inheritance.
-So we can have a common list of all objects for updates, etc.
	Otherwise, we *could* break up into list of dataSources, list of primitives, 
list of dataobjects, and list of relations.  Would probably speed up some 
things, but might add some code.

I can imagine that ViewItems might become objects as well... would be nice 

More information about the Kst mailing list