Source: kpsk/waterfall.h


Annotated List
Files
Globals
Hierarchy
Index
/***************************************************************************
                          waterfall.h  -  description
                             -------------------
    begin                : Tue Jul 25 2000
    copyright            : (C) 2000 by Luc Langehegermann
    email                : luc@1409.org
 ***************************************************************************/

/***************************************************************************
 *                                                                         *
 *   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.                                   *
 *                                                                         *
 ***************************************************************************/

#ifndef WATERFALL_H
#define WATERFALL_H

#include 
#include 
#include 
#include 
#include 
#include 

#include "auxwindow.h"

#define SAMPLES 2048


/**
  *@author Luc Langehegermann
  */

class waterfall : public QWidget  {
  Q_OBJECT
public: 
	waterfall(QWidget *parent=0);
	~waterfall();
  int getIMD (int chn);
  /** Make sure that the old Positions are reinitialized so that the tool tips get the right position */
  void resetOldPos();
  void reInit();

private:
	QPixmap getLineal (double offset, bool lsb = false);
	int activechannel;
	QPixmap buffer; //screen buffer
  QPixmap lineal;
  QPixmap marker;
	QPixmap activemarker;
	int lastpos[4]; // last sample position
	QTimer* timer; // timer for waterfall processing
	auxWindow* aux[3];
//	float upperSig[4]; // For imd Calculations
//	float lowerSig[4];
//	float upperIMD[4];
//	float lowerIMD[4];
  int IMD[4];
	int IMDcount[4];
	int oldlastpos[4];
  int maxfreq;  // maximum displayed frequency
  int minfreq;  // minimum displayed frequency
  int xmax;     // maximum x plot coordinate
  int ymax;     // maximum y plot coordinate
  int xpos;     // x coordinate position
  int large_step_width;  // plot step of lareg freq ticks
  int marker_step_width; // plot step of freq marker
  int marker_freq_step;  // freq step of freq marker
  int to;  //max visible in sample space
  int from;  // min visible in sample space
  int xtranslate[SAMPLES]; // x coordinate matrix of fft samples
  int stranslate[SAMPLES]; // fft samples to x coordinates

//	int lastbanditem;
	QColor watercolor[100]; //waterfall color matrix
protected: // Protected methods
	void mousePressEvent (QMouseEvent* event);
	void mouseMoveEvent (QMouseEvent* event);
  void resizeEvent (QResizeEvent* e);
  void paintEvent (QPaintEvent*);
private slots: // Private slots
  void slotProcessFFTData();
private: // Private methods
  void h2oColors();
  void translate(); // converts x coordinates to samples & samples to x
public slots: // Public slots
  void slotNewBand (int item);
  void slotClrCh1Rx(); // slot to clear ch 1 text
  void slotClrCh2Rx(); // slot to clear ch 2 text
  void slotClrCh3Rx(); // slot to clear ch 3 text
};

#endif

Generated by: ernie on homer on Fri Aug 30 19:54:09 2002, using kdoc 2.0a53.