23 May 2012 15:55
how to click buttons to zoom in and out instead of mouse dragging?
HongLiang Wang <hongliang.wang <at> hvr-software.com>
2012-05-23 13:55:14 GMT
2012-05-23 13:55:14 GMT
Hello all,
I am working on a qwt plot curve zooming problem. Basically I would like to create two buttons so that if the user clicks one button, the plot is zooming in and same for the other button.
I also don't want the user to use mouse dragging on the plot to zooming.
I searched into the source code and got the impression that qwtplotzoomer::zoom() should be responsible for zooming in and out.
so I was using following code in button click slots:
void
JBStatGraph::horizontalZoomIn(void)
{
zoomer->zoom(+10);
}
void
JBStatGraph::horizontalZoomOut(void)
{
zoomer->zoom(-10);
}
Tracing message shows that zoomer->zoomRectIndex() always returns 0, no matter +10 and -10 is send to zoom(). but I don't know why.
Can anybody give me a hand?
Furthermore, I don't know how to disable mousing dragging for zooming. Can anybody give me a suggestion?
Thanks in advance.
Hongliang Wang
HVR Software bv | Haaksbergweg 45 | 1101 BR Amsterdam | The Netherlands
T. +31-020 312 7517 | F. +31-020 312 7509 | hongliang.wang <at> hvr-software.com
------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________ qwt-interest mailing list qwt-interest <at> lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/qwt-interest
RSS Feed