blob: 19c7806ac468c9a6b77f32e1c95d70bd33ed83d9 (
plain)
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
|
//Author: Timothy Pearson <kb9vqf@pearsoncomputing.net>, (C) 2012
//Copyright: See COPYING file that comes with this distribution
#include <tqwidget.h>
class TQPixmap;
class TraceWidget : public TQWidget
{
Q_OBJECT
public:
TraceWidget(TQWidget* = 0, const char* = 0);
~TraceWidget();
void setNumberOfSamples(unsigned int samples);
void setNumberOfHorizontalDivisions(unsigned int divisions);
void setNumberOfVerticalDivisions(unsigned int divisions);
void setDisplayLimits(double x, double y, double w, double h);
double* samples();
protected:
virtual void paintEvent(TQPaintEvent*);
virtual void resizeEvent(TQResizeEvent *);
private slots:
void updateGraticule();
private:
unsigned int m_samples;
unsigned int m_horizDivs;
unsigned int m_vertDivs;
double m_leftEdge;
double m_rightEdge;
double m_topEdge;
double m_bottomEdge;
double* m_sampleArray;
TQPixmap* m_graticulePixmap;
};
|