From: Chris C. <ca...@al...> - 2002-02-23 14:51:12
|
The flow of signals for setting things like the position pointer still seems pretty complicated, and I think this is because they can follow two quite separate routes, in inconsistent ways: 1. LoopRuler::setPointerPosition [signal] (in the TrackEditor, fired by mouse action on the ruler) -> RosegardenGUIView::setPointerPosition [slot] -> TrackEditor::setPointerPosition [method] (moves the line on the canvas) -> RosegardenGUIView::setGUIPositionPointer [signal] -> RosegardenGUIApp::setPointerPosition [slot] (sets transport & composition positions) -> RosegardenGUIView::setPointerPosition [method] (moves the line on the canvas) -> NotationView::setGUIPositionPointer [slot] (moves the line on the notation view) 2. SequenceManager::setPointerPosition [signal] (fired by the transport buttons) -> RosegardenGUIApp::setPointerPosition [slot] (sets transport & composition positions) -> RosegardenGUIView::setPointerPosition [method] (moves the line on the canvas) In the first case, I think RosegardenGUIView::setPointerPosition actually happens twice; in the second the NotationView slot currently never happens at all, because the connection is made in an inaccessible place (the RosegardenGUIApp constructor). Now besides wanting to simplify this, we need to make it more general, because we also need to handle signals fired by LoopRulers other than the one in the TrackEditor. (We also ought to move the NotationView stuff up into EditView.) There's already a comment (of Bownie's?) in the RosegardenGUIApp constructor referring to a "temporary arrangement until we get the playback pointer into the document", and it seems to make sense to use the document as a clearing-house for these signals, with a sort of star topology: when some object wants to set the pointer, it just calls a method (no signal) on the document, and the document emits a signal that anyone (including presumably the object that made the original request) can intercept. I think this should work, because everyone seems to have access to the document if they want it. Any comments or objections? (There's another complication in that some of these methods exist in both timeT and RealTime formats, and some originate in DCOP calls using integer arguments instead of our typedefs. We'll need to preserve that somehow.) Chris |