(sorry for the late answer) On Tuesday 05 June 2007, Arnout Engelen wrote: > Hi, > > When a segment is changed, any other Views etc. (e.g. NotationViews) > showing it will have to be notified to tell them to update themselves as > well. How is that done / where is that documented? I couldn't quite find > it in the dev docs, it's probably described somewhere I didn't look yet :).
It's unfortunately not described anywhere. It's done through the RefreshStatus class. This class holds a set of 'observer IDs'. Every Segment carries a RefreshStatus, and every edit part displaying one has an observer ID. Whenever a change is made in a segment, its RefreshStatus is set to 'has changed' for all observer IDs. Then each observer, whenever it's refreshed, checks its status ID to see if the segment it displays has changed since last update. This is done in EditViewBase::paintEvent(). It certainly could have been done better, but it works :-). -- Guillaume. http://telegraph-road.org ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ Rosegarden-devel mailing list [email protected] - use the link below to unsubscribe https://lists.sourceforge.net/lists/listinfo/rosegarden-devel
