Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

[429088]: kwave / sonagram.h Maximize Restore History

Download this file

sonagram.h    113 lines (94 with data), 2.3 kB

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
#ifndef _SONAGRAM_H_
#define _SONAGRAM_H_ 1
#include <qapp.h>
#include <qpushbt.h>
#include <qstring.h>
#include <qwidget.h>
#include <qpainter.h>
#include <kapp.h>
#include <ktopwidget.h>
#include <kmenubar.h>
#include <kstatusbar.h>
#include <qpixmap.h>
#include <qimage.h>
#include <qtimer.h>
#include "gsl_fft.h"
#include "scale.h"
#include "overview.h"
//***********************************************************************
class ImageView : public QWidget
{
Q_OBJECT
public:
ImageView (QWidget *parent=0);
~ImageView ();
void mouseMoveEvent (QMouseEvent * );
void setImage (QImage *image);
int getWidth ();
int getOffset ();
public slots:
void setOffset (int);
signals:
void viewInfo(int,int,int);
void info (double,double);
protected:
void paintEvent(QPaintEvent *);
private:
int height,width;
int offset;
int lh,lw;
QImage *image;
QPixmap map;
QWidget *parent;
};
//***********************************************************************
class SonagramContainer : public QWidget
{
Q_OBJECT
public:
SonagramContainer (QWidget *parent);
~SonagramContainer ();
void setObjects (ImageView *view,ScaleWidget *x,ScaleWidget *y,CornerPatchWidget *corner,OverViewWidget *overview=0);
public slots:
signals:
protected:
void resizeEvent (QResizeEvent *);
private:
ImageView *view;
ScaleWidget *xscale,*yscale;
CornerPatchWidget *corner;
OverViewWidget *overview;
};
//***********************************************************************
class SonagramWindow : public KTopLevelWidget
{
Q_OBJECT
public:
SonagramWindow (QString *);
~SonagramWindow ();
void setSignal (double*,int,int,int,int);
public slots:
void save ();
void load ();
void toSignal ();
void setInfo (double,double);
void setRange (int,int,int);
signals:
protected:
void createImage ();
void createPalette ();
// void resizeEvent (QResizeEvent *);
private:
KStatusBar *status;
QImage *image;
ImageView *view;
OverViewWidget *overview;
SonagramContainer *mainwidget;
ScaleWidget *xscale,*yscale;
CornerPatchWidget *corner;
int points,rate,length;
int x,y;
complex **data;
double max;
};
#endif //sonagram.h