[0f6817]: kwave / curvewidget.h Maximize Restore History

Download this file

curvewidget.h    81 lines (67 with data), 1.9 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
#ifndef _CURVE_H_
#define _CURVE_H_ 1
#include <qdir.h>
#include <qapp.h>
#include <qpushbt.h>
#include <qstring.h>
#include <qwidget.h>
#include <qpainter.h>
#include <qpixmap.h>
#include <qtimer.h>
#include <kapp.h>
#include <kselect.h>
#include <ktopwidget.h>
#include <kmenubar.h>
#include <kbuttonbox.h>
#include <kstatusbar.h>
#include "gsl_fft.h"
struct CPoint
{
double x,y;
};
class CurveWidget : public QWidget
{
Q_OBJECT
public:
CurveWidget (QWidget *parent=0,const char *name=0,QList<CPoint>*d=0,int=false);
~CurveWidget ();
QList<CPoint> *getPoints ();
int getInterpolationType ();
void setType (char *);
void setCurve (QList<CPoint> *);
void addPoint (double,double);
CPoint* findPoint (int,int);
public slots:
void setType (int);
void scaleFit ();
void VFlip ();
void HFlip ();
void deleteLast ();
void deleteSecond ();
void firstHalf ();
void doDouble ();
void secondHalf ();
void savePreset ();
void loadPreset (int);
signals:
protected:
void mousePressEvent (QMouseEvent * );
void mouseReleaseEvent (QMouseEvent * );
void mouseMoveEvent (QMouseEvent * );
void paintEvent (QPaintEvent *);
private:
int width,height; //of widget
int interpolationtype; //type of interpolation
int keepborder; //flag denying acces to first and last point...e
double x[7],y[7]; //buffer for polynomial coefficients
QList<CPoint> *points; //Points set by User
QPopupMenu *menu;
CPoint *act;
CPoint *last; //last Point clicked remembered for deleting
QPainter p;
QPixmap *pixmap; //pixmap to be blitted to screen
QDir *presetDir; //directory for Presets
QStrList *namelist;
};
//***********************************************************************
#endif //curvewidget.h