first commit
This commit is contained in:
41
project/fm_viewer/ui/rm_widget_zoom_pos.h
Normal file
41
project/fm_viewer/ui/rm_widget_zoom_pos.h
Normal file
@@ -0,0 +1,41 @@
|
||||
#ifndef RM_WIDGET_ZOOM_POS_H
|
||||
#define RM_WIDGET_ZOOM_POS_H
|
||||
|
||||
#include <QWidget>
|
||||
#include <QPaintEvent>
|
||||
#include <QPainter>
|
||||
|
||||
|
||||
class RMWidgetZoomPos : public QWidget
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
friend class RMFrameVideoMain;
|
||||
friend class RMFrameVideoBase;
|
||||
explicit RMWidgetZoomPos(QWidget *parent = nullptr);
|
||||
|
||||
// 이동 좌표를 입력하고 누적된 영역 시작 좌표(0.0~0.5)를 받는다,
|
||||
// D1 영상등의 처리를 위해 비디오 Aspector Ratio 를 확인한다.
|
||||
void setPos(float x, float y);
|
||||
void start() {
|
||||
_startX = _x;
|
||||
_startY = _y;
|
||||
}
|
||||
protected:
|
||||
float _x;
|
||||
float _y;
|
||||
#if (USE_ZOOM_WH_RATIO)
|
||||
float _whr; // width / height
|
||||
#endif
|
||||
|
||||
private:
|
||||
float _startX;
|
||||
float _startY;
|
||||
QPainter _painter;
|
||||
void paintEvent(QPaintEvent *event) override;
|
||||
signals:
|
||||
|
||||
public slots:
|
||||
};
|
||||
|
||||
#endif // RM_WIDGET_ZOOM_POS_H
|
||||
Reference in New Issue
Block a user