From: Tom B. (Tehom) <te...@pa...> - 2015-03-28 17:41:18
|
> Next step that I would like to do is to offer the functionality that a > user can click on a certain parallel (in the text window). > [...] > I assume that > NotationView::setCurrentStaff is what I want (just a guess), Yes. > but how to I > get the Staff that the segment (or the event) belongs to? > > Could somebody please give me an hint where to look? As Michael says, it's quite a tangle there. It may require checking all the staffs to find which one visits that segment. NotationStaff provides getSegment (inherited), and NotationScene provides getStaffs, and of course you've found m_notationWidget->getScene(). I think that works, but I can't remember whether that's what I did last time I worked with that stuff. Tom Breton (Tehom) PS: Clearly the plural "staves" has left the English language. |