Results 1 to 3 of 3

Thread: zooming and moving marker

  1. #1
    Join Date
    Feb 2012
    Posts
    5

    Default zooming and moving marker

    I'm trying to implement in a plot these behaviours:

    left click: move a vertical marker to the clicked position
    left click and move: move the marker following the mouse
    right click: show a context menu with a zoom voice (not enabled in this case)
    right click and move: drag a selection and once that the right mouse is relased open the context menu with the zoom voice (which now are enabled)

    I know that I need to use QwtPlotPicker, QwtPlotMarker and QwtPlotZoomer but I don't know how.
    Thanks in advice for the help

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

    Default Re: zooming and moving marker

    left click: move a vertical marker to the clicked position
    This is a picker with a QwtPickerClickPointMachine. Simply modify the position of the marker according to the selected() signal.
    left click and move: move the marker following the mouse
    This is a picker with a QwtPickerDragPointMachine and a vertical line as rubberband. Hide the marker according to the activated() signal and show it at its new position according to the selected() signal.

    To avoid conflicts this picker should also handle your first use case.

    Uwe

  3. #3
    Join Date
    Feb 2012
    Posts
    5

    Default Re: zooming and moving marker

    Is it possible to do this with only one picker with a QwtPickerDragPointMachine and a vertical line as a rubberband in this way:
    Set and show the marker according to the selected signal
    Hide the marker according to the moved signal

Similar Threads

  1. Zooming the plot without the marker
    By raghvendramisra in forum Qwt
    Replies: 1
    Last Post: 17th May 2012, 17:24
  2. Replies: 0
    Last Post: 24th May 2010, 12:19
  3. Replies: 6
    Last Post: 5th March 2009, 06:26
  4. Marker and Scale
    By WXNSNW in forum Qt Programming
    Replies: 0
    Last Post: 11th December 2008, 09:44
  5. Moving plot marker with the mouse
    By viridis in forum Qwt
    Replies: 2
    Last Post: 23rd September 2008, 20:39

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
  •  
Qt is a trademark of The Qt Company.