-
Notifications
You must be signed in to change notification settings - Fork 26
/
imageviewerobserver.h
62 lines (48 loc) · 1.26 KB
/
imageviewerobserver.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#ifndef IMAGEVIEWEROBSERVER_H
#define IMAGEVIEWEROBSERVER_H
#include "imageviewerbase.h"
#include "selection.h"
#include "polygons.h"
class ImageFile;
/*
* Image viewer to display a car with static license plates
*/
class ImageViewerObserver : public ImageViewerBase
{
Q_OBJECT
public:
explicit ImageViewerObserver(QWidget *parent = nullptr);
/*
* Add information with static license plates
*/
void setImageFile(ImageFile *imageFile);
/*
* Reset override
*/
virtual void reset() override;
protected:
/*
* For handling selection
*/
virtual void mousePressEvent(QMouseEvent *e) override;
virtual void mouseMoveEvent(QMouseEvent *e) override;
virtual void mouseReleaseEvent(QMouseEvent *e) override;
/*
* Custom tooltips
*/
virtual bool event(QEvent *event) override;
virtual void pixmapAboutToBeChanged() override;
virtual void pixmapChanged() override;
virtual void draw(QPainter *painter) override;
signals:
void platesChanged();
private slots:
void slotShowPlateSelector();
private:
ImageFile *m_imageFile;
Polygons m_polygons;
Selection m_selection;
QRect m_fixedSelection;
int m_plateFileIndexForEditing;
};
#endif // IMAGEVIEWEROBSERVER_H