Results 1 to 4 of 4

Thread: compatibility problem with a waterfall display

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Mar 2008
    Posts
    51
    Thanks
    2
    Thanked 2 Times in 2 Posts
    Platforms
    Unix/X11 Windows

    Default Re: compatibility problem with a waterfall display

    Well, the (my) problem seems to be that whatever I try, there is a crash of the program (segmentation violation) in pixelhint and I do not seem to be able to tell the
    qwtrasterdata what the actual data is (a value function is implemented).

    >>> instead the pointer to the data object is passed to the spectrogram item taking ownership.<<<< ??????

    It might have been solved in 5 minutes by someone understanding the modifications, it takes now three days

    best
    jan

  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: compatibility problem with a waterfall display

    Hm, what needs to be done:


    • Call YourRasterData::setInterval
      The intervals for the x/y axes are the values you have passed with setBoundingRect before. The interval for z axis is what you have returned as range before.
    • Implement the YourRasterData::value method
      Absulutely nothing has changed here.
    • Optionally implement YourRasterData::pixelHint(). pixelHint() returns not only the size of a pixel ( rasterHint() returned the number of pixels ! ) but also a position, so that the image can be aligned properly. You can return the geometry of any pixel.
      Note that the pixelHint is not working in Qwt 6.0.1 - you need to use the code from SVN 6.0, or wait for 6.0.2 what will happen the next days.


    Then do: spectrogram->setData( new YourRasterData() );

    The previous data object gets deleted, when you pass a new data object, but in your case I guess YourRasterData is somehow connected to your vector of doubles and you directly modify this vector behind the back of the spectrogram item. Beside this vector I guess you need to adjust the interval of the y interval and to invalidate the cache ( if QwtPlotRasterItem::PaintCache is enabled ) before you call replot. But this is not different to what you had to do with Qt 5.2.

    Uwe

Similar Threads

  1. Replies: 23
    Last Post: 9th January 2013, 07:27
  2. updating waterfall QwtSpectrogram
    By tnorthardt in forum Newbie
    Replies: 2
    Last Post: 2nd November 2012, 14:59
  3. Replies: 4
    Last Post: 12th May 2011, 10:06
  4. x-axis for waterfall plot
    By janK in forum Qwt
    Replies: 8
    Last Post: 29th July 2009, 15:00
  5. waterfall display
    By jmsbc in forum Qt Programming
    Replies: 7
    Last Post: 15th November 2008, 08:29

Tags for this Thread

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.