Results 1 to 6 of 6

Thread: selection of multiple areas/items on plot

  1. #1
    Join Date
    Nov 2009
    Posts
    94
    Thanks
    14
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Exclamation selection of multiple areas/items on plot

    Hello,

    could you tell me, whether it is possible by means of QwtPlotPicker to select multiple items on the plot by using Ctrl button? In common programs there is always the option to select first one item by clicking on it (or drag a rectangle around it) and then pressing Ctrl button and do the same action with the mouse, more items can added into selection?

    How can I get this behaviour? Help me please.

    Thank you.

    best regards,

    Vitali

  2. #2
    Join Date
    Sep 2009
    Posts
    140
    Thanks
    4
    Thanked 17 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: selection of multiple areas/items on plot

    Assuming that the selection of a set a vertices by dragging the mouse resides in a method that add vertices in the current selection, just check the result of QMouseEvent::modifiers() in mouse press event, and if not equqals to Qt::ControlModifier, just reset the list.

    Better use a set for selection member to prevent from double entries.

  3. #3
    Join Date
    Nov 2009
    Posts
    94
    Thanks
    14
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: selection of multiple areas/items on plot

    Hello,

    I'm afraid that it is not possible to use QMouseEvent / QEvent to check, whether Ctrl button is pressed because QwtPlotPicker does not provide it, right?

  4. #4
    Join Date
    Sep 2009
    Posts
    140
    Thanks
    4
    Thanked 17 Times in 17 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: selection of multiple areas/items on plot

    ah all right.

    Since I dont use QwtPlotPicker I cant help you.

    But what about creating another QwtPlotPicker and merge selection? Is it possible?

  5. #5
    Join Date
    May 2009
    Location
    Vienna
    Posts
    91
    Thanks
    18
    Thanked 5 Times in 5 Posts
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Default Re: selection of multiple areas/items on plot

    Hi Rambo83,

    Soon i am going to have the same task, and wanted to ask you if you have made progress in here?
    I'am going use QwtPlotPicker to select multible aeras of a curve in a QwtPlot, and store the selected data elsewhere, and so on...

    thanks in advance,
    Astronomy

  6. #6
    Join Date
    Nov 2009
    Posts
    94
    Thanks
    14
    Thanked 1 Time in 1 Post
    Qt products
    Qt4
    Platforms
    Unix/X11

    Default Re: selection of multiple areas/items on plot

    Hello,

    I did not try further to get work the action with CTRL button, thus I had to satisfy with the simple QwtPlotPicker, that provides me only a selection of one certain area by dragging a selection rectangle around it.

    good luck

Similar Threads

  1. QMenu Multiple selection problem
    By vajindarladdad in forum Newbie
    Replies: 3
    Last Post: 7th August 2009, 14:32
  2. QGraphicsScene and multiple selection
    By Bill in forum Newbie
    Replies: 1
    Last Post: 4th August 2009, 16:19
  3. Reg multiple plots in Qwt
    By Tavit in forum Qwt
    Replies: 4
    Last Post: 23rd June 2008, 14:43
  4. multiple selection of list view items
    By samirg in forum Qt Programming
    Replies: 2
    Last Post: 30th October 2007, 20:05
  5. Multiple selection in QTextEdit
    By munna in forum Qt Programming
    Replies: 4
    Last Post: 1st July 2006, 08:58

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.