/*
  a GUI for a spectrum analyser
  Copyright (C) 1998  Martin Vogt

  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.

  For more information look at the file COPYRIGHT in this package

 */



#ifndef _GUISPECTRUMANALYSER_H
#define _GUISPECTRUMANALYSER_H

#include <iostream.h>
#include <qpainter.h>
#include <qtimer.h> 
#include <qpixmap.h> 
#include <qwidget.h>

#include <spectrumImage.h>
#include <math.h>


class GuiSpectrumAnalyser : public QWidget {
  Q_OBJECT

 public:
  GuiSpectrumAnalyser(QWidget *parent=0, const char *name=0);
  ~GuiSpectrumAnalyser();

  QSize sizeHint() const;
  void mousePressEvent ( QMouseEvent* mouseEvent);
  void paintEvent ( QPaintEvent * paintEvent );

  void setValues(float floatArray[75]);
  void initBands();

 private:
  SpectrumImage* spectrumImage;
  QPixmap* pixMap;
  float* currentPeaks;
  float* nextPeaks;
  int width;
  int height;
  int bands;
  int spaHeight;
};
#endif

