77 lines
1.6 KiB
C++
77 lines
1.6 KiB
C++
#ifndef RM_GRAPH_WIDGET_H
|
|
#define RM_GRAPH_WIDGET_H
|
|
|
|
#include <QWidget>
|
|
#include <QLabel>
|
|
#include <QVBoxLayout>
|
|
#include "../fm_event_types.h"
|
|
#include "../data/rm_video_item_2ch.h"
|
|
|
|
class QCustomPlot;
|
|
class QCPItemPixmap;
|
|
class QCPItemLine;
|
|
class QCheckBox;
|
|
class QDateTime;
|
|
class RMSensorData;
|
|
class RMSpeedLabel;
|
|
|
|
#include "../core/rm_player_base.h"
|
|
class RMVideoItem;
|
|
class RMGraphWidget : public QWidget
|
|
{
|
|
Q_OBJECT
|
|
private:
|
|
|
|
QList<int> _scales;
|
|
void paintEvent(QPaintEvent *pe);
|
|
|
|
QPolygonF _polygonX;
|
|
QPolygonF _polygonY;
|
|
QPolygonF _polygonZ;
|
|
|
|
int _currentScale;
|
|
int _cursorX;
|
|
|
|
#if (USE_TRIGGER)
|
|
QPixmap eTrigger;
|
|
QPixmap mTrigger;
|
|
#endif // USE_TRIGGER
|
|
|
|
void _updatePolygon();
|
|
float _transform(float value, float height);
|
|
|
|
RMSensorData* currentData;
|
|
|
|
QLabel* labelX;
|
|
QLabel* labelY;
|
|
QLabel* labelZ;
|
|
|
|
const float* getSensorData(double ratio);
|
|
double _itemDurationMSec; // AVI 헤더 시간
|
|
public:
|
|
explicit RMGraphWidget(QWidget *parent = 0,QList<int> scales = QList<int>());
|
|
void setLabels(QLabel*x,QLabel*y,QLabel*z);
|
|
#if (MODEL_BBVIEWER)
|
|
QLabel* xLabel;
|
|
QLabel* yLabel;
|
|
QLabel* zLabel;
|
|
#endif
|
|
|
|
void redraw();
|
|
|
|
signals:
|
|
#if (MODEL_STANDARD)
|
|
void zoomChange(bool zi,bool zo);
|
|
#endif
|
|
public slots:
|
|
#if (MODEL_STANDARD)
|
|
void onZoomIn();
|
|
void onZoomOut();
|
|
#endif
|
|
|
|
void onPlayEvent(PLAY_EVENT event,RMVideoItem* item);
|
|
void onPositionChanged(qint64 position,qint64 duration);
|
|
};
|
|
|
|
#endif // RM_GRAPH_WIDGET_H
|