/*************************************************************************** * Copyright (C) 2004 by Johan Maes - ON4QZ * * on4qz@telenet.be * * http://users.telenet.be/on4qz * * * * This program is free software; you can redistribute it and/or modify * * it under the terms of the GNU General Public License as published by * * the Free Software Foundation; either version 2 of the License, or * * (at your option) any later version. * * * * This program 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 this program; if not, write to the * * Free Software Foundation, Inc., * * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * ***************************************************************************/ #ifndef QVUMETER_H #define QVUMETER_H #ifndef QT_H #include "qframe.h" #endif // QT_H /**vumeter - bar or needle representation *@author */ class vuMeter: public QFrame { Q_OBJECT public: vuMeter( QWidget *parent=0, const char *name=0, WFlags f=0 ); vuMeter( int totalSteps, QWidget *parent=0, const char *name=0, WFlags f=0 ); int totalSteps() const; int progress() const; void show(); void UseNeedle(bool needle=TRUE) { Needle=needle; } public slots: void reset(); void setTotalSteps( int totalSteps ); void setProgress( int progress ); protected: void drawContents( QPainter * ); private: int total_steps; int progress_val; int percentage; QString progress_str; bool Needle; private: // Disabled copy constructor and operator= vuMeter( const vuMeter & ); vuMeter &operator=( const vuMeter & ); }; inline int vuMeter::totalSteps() const { return total_steps; } inline int vuMeter::progress() const { return progress_val; } #endif // VUMETER_H