Diffstat (limited to 'noncore/multimedia/opierec/waveform.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/multimedia/opierec/waveform.cpp | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/noncore/multimedia/opierec/waveform.cpp b/noncore/multimedia/opierec/waveform.cpp index 05be373..9cc40b4 100644 --- a/noncore/multimedia/opierec/waveform.cpp +++ b/noncore/multimedia/opierec/waveform.cpp @@ -1,70 +1,69 @@ /********************************************************************** ** Copyright (C) 2000-2002 Trolltech AS. All rights reserved. ** ** This file is part of the Qtopia Environment. ** ** This file may be distributed and/or modified under the terms of the ** GNU General Public License version 2 as published by the Free Software ** Foundation and appearing in the file LICENSE.GPL included in the ** packaging of this file. ** ** This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE ** WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. ** ** See http://www.trolltech.com/gpl/ for GPL licensing information. ** ** Contact info@trolltech.com if any conditions of this licensing are ** not clear to you. ** **********************************************************************/ #include "waveform.h" -#include <qlabel.h> #include <qpainter.h> Waveform::Waveform( QWidget *parent, const char *name, WFlags fl ) : QWidget( parent, name, fl ) { pixmap = 0; windowSize = 100; samplesPerPixel = 8000 / (5 * windowSize); currentValue = 0; numSamples = 0; windowPosn = 0; window = 0; } void Waveform::changeSettings( int frequency, int channels ) { makePixmap(); // qWarning("change waveform %d, %d", frequency, channels); samplesPerPixel = frequency * channels / (5 * windowSize); qWarning("Waveform::changeSettings %d", samplesPerPixel); if ( !samplesPerPixel ) samplesPerPixel = 1; currentValue = 0; numSamples = 0; windowPosn = 0; draw(); } Waveform::~Waveform() { if ( window ) delete[] window; if ( pixmap ) delete pixmap; } void Waveform::reset() { makePixmap(); currentValue = 0; numSamples = 0; windowPosn = 0; draw(); } |