38 lines
839 B
C++
38 lines
839 B
C++
#ifndef FM_FRAME_SPEED_H
|
|
#define FM_FRAME_SPEED_H
|
|
|
|
#include "rm_widget_base.h"
|
|
#include "../fm_event_types.h"
|
|
|
|
class RMSensorData;
|
|
class FMButton;
|
|
class FMSpeedWidget;
|
|
class FMSpeedFrame : public RMWidgetBase
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit FMSpeedFrame(QWidget *parent = nullptr);
|
|
|
|
private:
|
|
FMButton* kmhButton;
|
|
FMSpeedWidget* speed;
|
|
QVBoxLayout* layout;
|
|
RMSensorData* _sensor;
|
|
double _spd;
|
|
|
|
bool _isMPH; // 지도와, 메인화면 동시에 사용되는 경우가 있어 global 처리하면 2회 반복되어 문제가 됨
|
|
void refreshSpeed(); // MPH 변환
|
|
|
|
signals:
|
|
void speedUnitChange();
|
|
|
|
public slots:
|
|
|
|
void onPositionChanged(qint64 position,qint64 duration);
|
|
void onPlayEvent(PLAY_EVENT event,RMVideoItem* item);
|
|
|
|
void onSpeednUnit();
|
|
};
|
|
|
|
#endif // FM_FRAME_SPEED_H
|