first commit
This commit is contained in:
60
project/fm_viewer/ui/rm_speed_label.h
Normal file
60
project/fm_viewer/ui/rm_speed_label.h
Normal file
@@ -0,0 +1,60 @@
|
||||
#ifndef RM_SPEED_LABEL_H
|
||||
#define RM_SPEED_LABEL_H
|
||||
|
||||
#include "../rm_include.h"
|
||||
#include "../core/rm_player_base.h"
|
||||
#include "rm_widget_style_base.h"
|
||||
class RMSensorData;
|
||||
class RMButton;
|
||||
class RMSpeedLabel : public RMWidgetStyleBase
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
#if (MODEL_BBVIEWER)
|
||||
explicit RMSpeedLabel(QWidget *parent = nullptr,bool map = false);
|
||||
RMButton* kmhButton;
|
||||
#else
|
||||
explicit RMSpeedLabel(QWidget *parent = nullptr);
|
||||
#endif
|
||||
|
||||
private:
|
||||
QLabel* kmh;
|
||||
QLabel* speed;
|
||||
QHBoxLayout* layout;
|
||||
RMSensorData* _sensor;
|
||||
double _spd;
|
||||
|
||||
#if (MODEL_BBVIEWER && !MODEL_WATEX)
|
||||
QLabel* _obdSpeed;
|
||||
bool isOBDSpeed;
|
||||
void checkODBSpeed();
|
||||
void refreshOBDLabel(); // 차속/GPS 표시
|
||||
#endif
|
||||
|
||||
#if (KMH_MPH_TOGGLE)
|
||||
bool _isMPH; // 지도와, 메인화면 동시에 사용되는 경우가 있어 global 처리하면 2회 반복되어 문제가 됨
|
||||
void refreshSpeed(); // MPH 변환
|
||||
#endif
|
||||
|
||||
signals:
|
||||
#if (KMH_MPH_TOGGLE)
|
||||
void speedUnitChange();
|
||||
#endif
|
||||
|
||||
public slots:
|
||||
|
||||
#if (MODEL_STANDARD && KMH_MPH_TOGGLE)
|
||||
void mouseReleaseEvent (QMouseEvent * event);
|
||||
void mousePressEvent(QMouseEvent * event);
|
||||
void onLanguageChange(RMLanguage::LANGUAGE_TYPE language);
|
||||
#endif
|
||||
void onPositionChanged(qint64 position,qint64 duration);
|
||||
void onPlayEvent(PLAY_EVENT event,RMVideoItem* item);
|
||||
|
||||
#if (KMH_MPH_TOGGLE)
|
||||
void onSpeednUnit();
|
||||
#endif
|
||||
};
|
||||
|
||||
|
||||
#endif // RM_SPEED_LABEL_H
|
||||
Reference in New Issue
Block a user