Results 1 to 6 of 6

Thread: AutoScaling not working

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    Feb 2006
    Location
    Munich, Germany
    Posts
    3,326
    Qt products
    Qt3 Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows
    Thanked 880 Times in 828 Posts

    Default Re: AutoScaling not working

    Just for curiosity, then, how would I do this? (makes the curve aware of the fact that data has changed)
    setRawSamples/setSamples are simply convenience methods creating a data object calling setData then. Behind the back means that you modify the samples inside of this data object without telling the curve with another call of setData.

    what exactly should I put inside the overloaded method?
    How should I know - it depends on the details of your application.

    f.e. if your x values are ordered in time you know the the x value of the first one is the minimum and the last one the maximum. If you add a new sample to an existing set, where you already know the bounding rectangle, all you need to do is to extend it by the coordinates of the new sample. Using such extra information makes it easy to find an implementation, that is way more efficient than the default implementation, that iterates over all points.

    Uwe

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

    Momergil (8th May 2014)

Similar Threads

  1. Autoscaling widget font on resize
    By SeanM in forum Qt Programming
    Replies: 0
    Last Post: 10th March 2014, 17:27
  2. Replies: 7
    Last Post: 24th September 2012, 08:17
  3. Working with map
    By naptizaN in forum Newbie
    Replies: 4
    Last Post: 28th August 2012, 13:57
  4. Replies: 1
    Last Post: 4th July 2012, 20:09
  5. Mac OS X UI not working
    By hvengel in forum Qt Programming
    Replies: 3
    Last Post: 1st April 2006, 02:02

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.