Results 1 to 6 of 6

Thread: "Reset" panning?

  1. #1
    Join Date
    Nov 2009
    Location
    Sweden
    Posts
    34
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default "Reset" panning?

    Hi,

    I use both QwtPlotZoomer and QwtPlotPanner - both working very well.

    What I've noticed is that, if I do zooning, it is easy to "return"/reset to the default view using the QwtEventPattern::MouseSelect2, but I cannot find any corresponding "reset" of panning. If I have zoomed in or out and then done panning, then the QwtEventPattern::MouseSelect2 works well (it will "reset" both zooming and panning). However, if I only do panning (stay at default zoom level), then I don't know of any simple way to reset to default panning/view except if I first do zooming. Is there any kind of "one-click" reset of panning I could use which I have not found?

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

    Default Re: "Reset" panning?

    No QwtPlotPanner does not store any type of history, where you can jump back and forth.

    HTH,
    Uwe

  3. #3
    Join Date
    Jan 2008
    Location
    Alameda, CA, USA
    Posts
    5,153
    Thanks
    295
    Thanked 854 Times in 841 Posts
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: "Reset" panning?

    No QwtPlotPanner does not store any type of history, where you can jump back and forth.
    Is there any feedback (signal or event) containing the new extents after a pan or zoom has occurred that would let one implement a stack to keep track of this history?

    What is the response in QwtPlotZoomer / QwtPlotPanner to a single click without mouse movement? I use this in my own graphics scenes to implement a "zoom / pan to previous level" (i.e. pop the history stack) action.
    <=== The Great Pumpkin says ===>
    Please use CODE tags when posting source code so it is more readable. Click "Go Advanced" and then the "#" icon to insert the tags. Paste your code between them.

  4. #4
    Join Date
    Nov 2009
    Location
    Sweden
    Posts
    34
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: "Reset" panning?

    OK, I see. But I guess it should be possible to create eg. a function or method to trigger the same thing as is done when resetting the zoom? For example, a method that zooms in one "step", and then call "reset zoom" (corresponding to QwtEventPattern::MouseSelect2), which obviously seems to work. I guess that should reset to the default axes limits, even if I have panned but not zoomed. Or is there something I'm missing?

  5. #5
    Join Date
    Nov 2009
    Location
    Sweden
    Posts
    34
    Thanks
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default Re: "Reset" panning?

    Maybe I shall put the question like this: Is there any way to set the axis scales to the "default" (the same scale/limits as is initially set when I first plot/show the graph) - before I do any zooming and/or panning at all?

  6. #6
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,296
    Thanked 878 Times in 826 Posts
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

Similar Threads

  1. Replies: 1
    Last Post: 20th November 2015, 11:02
  2. QSqlError("", "Parameter count mismatch", "")
    By Alberto7 in forum Newbie
    Replies: 2
    Last Post: 9th October 2015, 23:09
  3. Replies: 3
    Last Post: 16th March 2015, 08:31
  4. Replies: 3
    Last Post: 8th July 2008, 20:37
  5. Translation QFileDialog standart buttons ("Open"/"Save"/"Cancel")
    By victor.yacovlev in forum Qt Programming
    Replies: 4
    Last Post: 24th January 2008, 20:05

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.