File: fastplot.h

package info (click to toggle)
js8call 2.2.0%2Bds-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 22,416 kB
  • sloc: cpp: 563,285; f90: 9,265; ansic: 937; python: 132; sh: 93; makefile: 6
file content (88 lines) | stat: -rw-r--r-- 2,024 bytes parent folder | download | duplicates (3)
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
///////////////////////////////////////////////////////////////////////////
// Some code in this file and accompanying files is based on work by
// Moe Wheatley, AE4Y, released under the "Simplified BSD License".
// For more details see the accompanying file LICENSE_WHEATLEY.TXT
///////////////////////////////////////////////////////////////////////////

#ifndef FPLOTTER_H
#define FPLOTTER_H

#include <QtWidgets>
#include <QFrame>
#include <QImage>
#include <cstring>

class FPlotter : public QFrame
{
  Q_OBJECT
public:
  explicit FPlotter(QWidget *parent = 0);
  ~FPlotter();

  qint32  m_w;
  qint32  m_plotZero;
  qint32  m_plotGain;
  qint32  m_greenGain;
  qint32  m_greenZero;
  qint32  m_x0;
  qint32  m_x1;
  qint32  m_y0;
  qint32  m_UTCdisk;
  bool    m_diskData;

  void draw();		                                    //Update the Fast plot
  void setPlotZero(int plotZero);
  void setPlotGain(int plotGain);
  void setGreenZero(int n);
  void setTRperiod(int n);
  void drawScale();
  void setMode(QString mode);

signals:
  void fastPick (int x0, int x1, int y);

protected:
  //re-implemented widget event handlers
  void paintEvent(QPaintEvent *event);
//  void resizeEvent(QResizeEvent* event);

private slots:
  void mousePressEvent(QMouseEvent *event);
  void mouseMoveEvent(QMouseEvent *event);

private:

  void MakeTimeStrs();
  int XfromTime(float t);
  float TimefromX(int x);
  qint64 RoundFreq(qint64 freq, int resolution);

  QPixmap m_ScalePixmap;
  QString m_HDivText[483];
  QString m_t;
  QString m_t0;
  QString m_t1;
  QString m_mode;

  double  m_pixPerSecond;

  qint32  m_hdivs;
  qint32  m_h;
  qint32  m_h1;
  qint32  m_h2;
  QPixmap m_HorizPixmap;
  qint32  m_jh0;
  qint32  m_TRperiod;

  bool    m_bPaint2;
};

extern float fast_green[703];
extern float fast_green2[703];
extern float fast_s[44992];                                    //44992=64*703
extern float fast_s2[44992];
extern int   fast_jh;
extern int   fast_jh2;
extern QVector<QColor> g_ColorTbl;

#endif // FPLOTTER_H