Results 1 to 3 of 3

Thread: How to count matrix rows in another metric system

  1. #1
    Join Date
    Mar 2012
    Posts
    11
    Thanks
    3
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Question How to count matrix rows in another metric system

    I use QwtMatrixRasterData
    screen_1.png
    Y-axis: we have 30 rows here in matrix data.

    but I have to count in "mm"
    for example three rows of matrix it's a 1 mm, thus I need to change scale without changing the matrix, how can I do it?

    thank you!

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

    Default Re: How to count matrix rows in another metric system

    [QUOTE=layer;244252Y-axis: we have 30 rows here in matrix data - for example three rows of matrix it's a 1 mm, ..[/QUOTE]
    1.0 mm : 3.0 * 30 = 10 mm

    Qt Code:
    1. data->setInterval( Qt::YAxis, 10.0 );
    To copy to clipboard, switch view to plain text mode 

    Uwe

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

    layer (13th May 2013)

  4. #3
    Join Date
    Mar 2012
    Posts
    11
    Thanks
    3
    Qt products
    Qt4 Qt/Embedded
    Platforms
    MacOS X Unix/X11 Windows

    Default Re: How to count matrix rows in another metric system

    Quote Originally Posted by Uwe View Post
    1.0 mm : 3.0 * 30 = 10 mm
    Qt Code:
    1. data->setInterval( Qt::YAxis, 10.0 );
    To copy to clipboard, switch view to plain text mode 
    Uwe
    it seems like setInterval(Qt::Axis, double&)
    but it needs
    Qt Code:
    1. virtual void QwtMatrixRasterData::setInterval(Qt::Axis, const QwtInterval&)
    To copy to clipboard, switch view to plain text mode 

    or I didn't catch something?

    so then I wrote this snippet:
    Qt Code:
    1. setInterval(Qt::YAxis, QwtInterval(0, 10, QwtInterval::ExcludeMaximum));
    To copy to clipboard, switch view to plain text mode 

    and it doesn't work, what I did wrong?

Similar Threads

  1. Read Excel Rows by Rows
    By abgokbayrak in forum Qt Programming
    Replies: 1
    Last Post: 6th December 2011, 22:43
  2. Replies: 2
    Last Post: 15th August 2011, 00:26
  3. LED Matrix
    By jwflammer in forum Newbie
    Replies: 1
    Last Post: 23rd February 2011, 01:23
  4. Count the number of rows in a QTableView
    By grub87 in forum Qt Programming
    Replies: 9
    Last Post: 28th June 2009, 16:31
  5. QWidget::metric:Invalid metric command
    By aaron in forum Qt Programming
    Replies: 2
    Last Post: 3rd April 2009, 01:59

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
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.