Hi,

On Wednesday, 22 August 2007 09:28, Heikki Johannes Junes wrote:
> I have tried to make several attempts to determine the timeT at the edges
> of the visible part of notation view. How to find the time at the left and
> right edges in visible part of notation view?

I don't know if there is a method somewere to find the data directly, and i'm  
sure that Chris and Guillaume would give you a better advice, but anyway...

I would locate first the left and right edge coordinates in QCanvasView units. 
Rosegarden::NotationCanvasView indirectly inherits from Qt3's QCanvasView the 
methods contentsX(), contentsY(), visibleWidth(), and visibleHeight(). They  
give the part of the canvas that is visible in this view, i.e. the bounding 
rectangle of the view in canvas coordinates.

Next, I would use the edge coordinates to find the nearest notation element.   
Look to the method NotationCanvasView::contentsMouseMoveEvent(). This method  
calculates the time under the mouse cursor, and it is used to update the 
status bar's time label.

Regards,
Pedro

-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Rosegarden-devel mailing list
[email protected] - use the link below to unsubscribe
https://lists.sourceforge.net/lists/listinfo/rosegarden-devel

Reply via email to