//======================================================================
// File:		dmmbar.cpp
// Author:	Matthias Toussaint
// Created:	Tue Apr 10 17:45:35 CEST 2001
//----------------------------------------------------------------------
// This file is part of QtDMM.
//
// QtDMM is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License version 3
// as published by the Free Software Foundation.
//
// QtDMM is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with Foobar.  If not, see <http://www.gnu.org/licenses/>.
//----------------------------------------------------------------------
// Copyright (c) 2001 Matthias Toussaint
//======================================================================

#include <dmmbar.h>
//Added by qt3to4:
#include <QPaintEvent>

DMMBar::DMMBar( QWidget *parent, const char *name ) :
  QWidget( parent, name ),
  m_value( 0.0 )
{
}

DMMBar::~DMMBar()
{
}

void
DMMBar::setValue( double value )
{
  while (value > 4)
  {
    value /= 10.;
  }
  
  m_value = value;
  
  update();
}

void
DMMBar::paintEvent( QPaintEvent * )
{
  
}
