Results 1 to 2 of 2

Thread: Bode example modification to enable zooming support for every range?

  1. #1
    Join Date
    Jan 2010
    Location
    Ankara - TURKEY
    Posts
    30
    Thanks
    13
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Windows

    Default Bode example modification to enable zooming support for every range?

    Hi All,

    I want to enable zooming and panning for plotter which has to many realtime data so my range is not limited and as a result not static. I have looked bode, refreshtest and ossilascope examples in details. My plotter has 2 scrolling (control) type. Automatic and manual.

    In automatic mode plotter plots my curve in QwtPlotDirectPainter like refreshtest or ossicaliton example. In manualscroll I give the control plotter. I can change scrolling mode between each other. So my zoombase need to be updated after I enter the manualscroll mode to achieve zooming in all range.

    So I implement necessary d_zoomer[0]->setZoomBase(); slot by triggered panner's panned signal, so when I panned I update my zoom base so I can zoom current range. But there is a problem as you could see, every setZoomBase funtion clears zoom rectange stack, so my zooming stack disapper after panned. To deactivate this problem I add setMousePattern(QwtEventPattern::MouseSelect2, Qt::MidButton); pattern to zoomer. So I return zoom(0) before panned my canvas? I have implemented same mechanism for bode example, If there is no problem could you add this changing to svn Uwe? Because same problem existing in bode. When I panned my canvas out of 0, 100 range I can't zoom in or out(I mean I can zoom but there is nothing zoomed such as grid and other markers)? Or do you think how should I handle this situation?

    I have attached necessary changing for bode example.
    Thanks so much.
    Regards.
    Attached Files Attached Files

  2. #2
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,313
    Thanked 879 Times in 827 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: Bode example modification to enable zooming support for every range?

    The basic design problem is, that there should be a navigation stack for a plot instead of a local stack inside the zoomer. Introducing such a thing is on my TODO list, but won't make it into Qwt 6.0. In the meantime you have to use QwtPlotZoomer::zoomStack() and QwtPlotZoomer::setZoomStack() if you want to add, remove or replace rectangles manually.

    Uwe

  3. The following user says thank you to Uwe for this useful post:

    umituzun84 (19th March 2010)

Similar Threads

  1. Layout modification in QListWidget
    By ouekah in forum Newbie
    Replies: 2
    Last Post: 20th March 2010, 06:15
  2. QStandardItem color modification
    By prashant in forum Qt Programming
    Replies: 0
    Last Post: 5th November 2009, 09:24
  3. file modification date/time
    By tommy in forum Qt Programming
    Replies: 1
    Last Post: 18th March 2009, 20:43
  4. Replies: 1
    Last Post: 11th September 2007, 07:43
  5. modification time on files
    By soul_rebel in forum Qt Programming
    Replies: 3
    Last Post: 9th August 2007, 20:51

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.