Results 1 to 2 of 2

Thread: QwtThermo size and alarm questions

  1. #1
    Join Date
    May 2013
    Posts
    1
    Qt products
    Qt5
    Platforms
    Windows

    Default QwtThermo size and alarm questions

    Hi,
    for a project I am currently working on I have to imitate a storage basin. I found QwtThermo suitable for that, as one can easily display the actual level of the basin with it. I now have two questions concerning QwtThermo:
    1) I found setPipeWidth() in order to change the width of the thermo pipe. Is there any equivalent for adjusting the height of the pipe?
    2) The possibility of setting an alarm level is quite useful but is it possible to set two different alarm levels for one thermometer widget? I need that because a storage basin may not underrun a certain level as well as it is not allowed to overrun one.

    I looked through the API but got no clue for those. In fact, my clue is that both is not possible, but it is likely I missed something.
    Hopefully one of you can answer my questions and maybe also give me hint for a workaround, if the answer to both questions is no.

    Thanks in advance!
    Kind regards
    Alex

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

    Default Re: QwtThermo size and alarm questions

    Quote Originally Posted by akL View Post
    1) I found setPipeWidth() in order to change the width of the thermo pipe. Is there any equivalent for adjusting the height of the pipe?
    One dimension is set with setPipeWidth, the other one is adjusted to the geometry of the widget - depending on the orientation of the thermo. So you are probably looking for the trivial QWidget APIs like setGeometry, setWidth(), setHeight(), sizeHint() ..

    2) The possibility of setting an alarm level is quite useful but is it possible to set two different alarm levels for one thermometer widget? I need that because a storage basin may not underrun a certain level as well as it is not allowed to overrun one.
    The alarm level API is left over for compatibility reasons only - using a color map is much more powerful and allows to implement an unlimited number of levels.

    I recommend to use Qwt 6.1 - all control widgets have been cleaned up and offer more functionality. The new controls example shows more use cases of QwtThermo including what you are looking for. It might also be interesting to have a look at SVN trunk - the only difference to Qwt 6.1 rc3 is an extension for QwtThermo, that adds a new mode where the origin of the liquid might be inside the scale.

    Uwe

Similar Threads

  1. How to set alarm.
    By Niamita in forum Newbie
    Replies: 4
    Last Post: 10th January 2012, 21:58
  2. QLinearGradient and QwtThermo
    By Marco Trapanese in forum Qwt
    Replies: 2
    Last Post: 6th June 2010, 07:33
  3. QwtThermo ScalePos
    By jhowland in forum Qwt
    Replies: 1
    Last Post: 30th December 2009, 01:53
  4. QObject and alarm clock
    By been_1990 in forum General Programming
    Replies: 2
    Last Post: 13th December 2009, 17:00
  5. Alarm Implementation in Qt/X11
    By technofreek in forum Qt Programming
    Replies: 0
    Last Post: 7th January 2009, 06:30

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.