Results 1 to 3 of 3

Thread: Using QwtSeriesData as data bridge for large datasets

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #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: Using QwtSeriesData as data bridge for large datasets

    Qt Code:
    1. class YourData: public QwtSeriesData<QPointF>
    2. {
    3. ....
    4. virtual size_t size() const
    5. {
    6. return 1000000;
    7. }
    8.  
    9. virtual QPointF sample( size_t i ) const
    10. {
    11. return QPointF( i * delta, m_values[i] );
    12. }
    13.  
    14. // optional
    15. virtual QRectF boundingRect() const
    16. {
    17. return QRect( 0.0, yMin, size() * delta, ymax - yMin );
    18. }
    19.  
    20. private:
    21. double *m_values;
    22. };
    To copy to clipboard, switch view to plain text mode 

    When workin with huge datasets you might want to have a look at the QwtPlotCurve::FilterPointsAggressive from svn trunk.

    Uwe

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

    jeffL1349 (31st March 2017)

Similar Threads

  1. QTableView and Large data sets
    By KenJustKen in forum Qt Programming
    Replies: 3
    Last Post: 25th January 2016, 09:16
  2. Replies: 3
    Last Post: 28th April 2014, 17:21
  3. Need help with QTableView/QTableWidget and large data
    By aguayro in forum Qt Programming
    Replies: 2
    Last Post: 29th June 2012, 12:09
  4. how to manipulate a very large data using QT?
    By aurora in forum Qt Programming
    Replies: 10
    Last Post: 25th May 2012, 17:37
  5. QWT and large amounts of data
    By ko9 in forum Qwt
    Replies: 1
    Last Post: 17th October 2007, 05:28

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.