26 lines
454 B
C
26 lines
454 B
C
|
#ifndef TOWNIMAGEWIDGET_H
|
||
|
#define TOWNIMAGEWIDGET_H
|
||
|
|
||
|
#include <QWidget>
|
||
|
|
||
|
class TownImageWidget : public QWidget
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
public:
|
||
|
explicit TownImageWidget(QWidget *parent = nullptr);
|
||
|
|
||
|
void OnBeginDraw(const QPointF& start, const QPointF& end);
|
||
|
void OnEndDraw();
|
||
|
|
||
|
|
||
|
protected:
|
||
|
void paintEvent(QPaintEvent* event) override;
|
||
|
|
||
|
private:
|
||
|
bool m_drawLine{ false };
|
||
|
QPointF m_start;
|
||
|
QPointF m_end;
|
||
|
};
|
||
|
|
||
|
#endif // TOWNIMAGEWIDGET_H
|