59 lines
1.5 KiB
C
59 lines
1.5 KiB
C
|
#ifndef DISPLAYWIDGET_H
|
||
|
#define DISPLAYWIDGET_H
|
||
|
#include <QWidget>
|
||
|
#include <QVector>
|
||
|
#include <QPoint>
|
||
|
#include <QImage>
|
||
|
#include <QMatrix>
|
||
|
#include "structures.h"
|
||
|
/**
|
||
|
*/
|
||
|
class QSettings;
|
||
|
class DisplayWidget : public QWidget {
|
||
|
Q_OBJECT
|
||
|
QVector<int> ACopy;
|
||
|
QVector<int> BCopy;
|
||
|
QMatrix m_forward;
|
||
|
QMatrix m_inverse;
|
||
|
QImage background;
|
||
|
TrigerSettings * m_ts;
|
||
|
QPolygonF ChA, ChB;
|
||
|
MOVE_ITEMS m_items;
|
||
|
int m_timeBase;
|
||
|
int m_ChBase;
|
||
|
double x_lenght;
|
||
|
struct MarkSetting {
|
||
|
double a,b;
|
||
|
} m_time, m_volt;
|
||
|
enum MARKER_ENUM {
|
||
|
MARKER_TIME = 0,
|
||
|
MARKER_VOLT,
|
||
|
} marker_type;
|
||
|
unsigned m_timeCount;
|
||
|
public:
|
||
|
explicit DisplayWidget (QWidget * p);
|
||
|
virtual ~DisplayWidget ();
|
||
|
void setTrigger (TrigerSettings * ts);
|
||
|
void TriggerValues (int n);
|
||
|
void TimeBaseRange (int n);
|
||
|
void MarkerChanged (bool);
|
||
|
void saveSettings (QSettings & setting);
|
||
|
void restSettings (QSettings & setting);
|
||
|
|
||
|
void resizeEvent (QResizeEvent * event) override;
|
||
|
void paintEvent (QPaintEvent * event) override;
|
||
|
void wheelEvent (QWheelEvent * event) override;
|
||
|
void mousePressEvent(QMouseEvent * event) override;
|
||
|
|
||
|
public slots:
|
||
|
void DispChannels (QVector<int>, QVector<int>);
|
||
|
signals:
|
||
|
void SettingsChanged (int n);
|
||
|
protected:
|
||
|
void drawBackground ();
|
||
|
void reloadData ();
|
||
|
void reloadMatrix (const QSize & sz);
|
||
|
};
|
||
|
|
||
|
#endif // DISPLAYWIDGET_H
|