Results 1 to 2 of 2

Thread: QwtScaleEngine Time scale engine

  1. #1
    Join Date
    Aug 2010
    Posts
    1
    Qt products
    Qt4
    Platforms
    Unix/X11 Windows

    Question QwtScaleEngine Time scale engine

    Hello,

    in order to make a time scale
    - I converted time [h: m: s] in seconds
    - I draw label like in cpuplot examples
    - My scale move like cpuplot example
    - But I dont want to use the method setaxisscale in cpuplot

    in the following case :
    23h00 ----- 00h00 ---- 01h00 in h:m:s
    82800s------0s--------3600s in s
    setAxisScale(xBottom, min=82600,max=3600)

    the axis must have only positive value witch zero in the midle
    for implement that i have this solution

    while(i != max)
    {
    //if i>84600 i=i-84600
    i = (min++)%84600 //84600 is 24h60m60s convert in sec
    }

    1) how to make this in QwtLinearScaleEngine ?
    2) What methods should I reimplemented (divide scale)?
    3) Is this the class to use ?
    4) is it possible to save autoScale() and transformation (I want to change the least)?

    I hope have been clear

    Thanks Mederic

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

    Default Re: QwtScaleEngine Time scale engine

    1) how to make this in QwtLinearScaleEngine ?
    2) What methods should I reimplemented (divide scale)?
    3) Is this the class to use ?
    Derive from QwtScaleEngine and implement all pure virtual methods.
    4) is it possible to save autoScale() and transformation (I want to change the least)?
    Yes, but I don't think that you want to do this. I can imagine a log2 based transformation or something irregular f.e when you want to have a scale with gaps, but your transformation doesn't look special to me.

    Uwe

Similar Threads

  1. Time in a xBotton scale
    By qtprgrmr in forum Qwt
    Replies: 2
    Last Post: 12th April 2010, 13:53
  2. Paint Engine
    By ^NyAw^ in forum Qt Programming
    Replies: 9
    Last Post: 22nd January 2010, 00:44
  3. Replies: 0
    Last Post: 6th March 2009, 08:19
  4. Can you specify a file engine?
    By skimber in forum Qt Programming
    Replies: 2
    Last Post: 18th September 2008, 15:54
  5. Scripting engine
    By stevey in forum Qt Programming
    Replies: 2
    Last Post: 27th October 2006, 11:36

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.