-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathimagewidget.h
76 lines (61 loc) · 1.68 KB
/
imagewidget.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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
#ifndef IMAGEWIDGET_H
#define IMAGEWIDGET_H
#include <QWidget>
#include <QLabel>
#include <QPixmap>
#include <QSize>
#include "targetlistwindow.h"
#include <QMouseEvent>
#include <QTabWidget>
#include "mainwindow.h"
#include "lifesupport.h"
namespace Ui {
class ImageWidget;
}
class ImageWidget : public QWidget
{
Q_OBJECT
public:
explicit ImageWidget(LifeSupport* dataPackage, MainWindow *parent, bool initTargetList = true);
// Setters
void setTitle(QString name);
void setImage(QString imagePath);
void setImage(QPixmap &resizedImage);
void setFolderPath(QString folderPath) ;
void setFilePath(QString filePath) ;
void setImagePath(QString imagePath);
void setTabWidget(QTabWidget* tabWidget ) ;
void setNumTargets(int numTargets);
void setSeen(bool seen);
// Getters
QString getTitle() const;
QString getImagePath() const;
QPixmap& getImage();
QString getFolderPath() const;
QString getFilePath() const;
TargetListWindow* getTargetList() const;
int getNumTargets() const;
bool isInitialized() const;
bool getSeen() const;
void deleteTargetListWindow();
void changeTargetListWindow(TargetListWindow* targetList, bool alreadyInitialized = true);
~ImageWidget();
protected:
void mouseDoubleClickEvent(QMouseEvent *event);
QString title;
int numTargets;
QString filePath ;
QString imagePath;
QString folderPath;
QPixmap image;
TargetListWindow *targetList;
bool targetListInitialized;
bool seen;
private slots:
void on_pinButton_clicked();
private:
LifeSupport* dataPackage ;
Ui::ImageWidget *ui;
MainWindow* mainWindow ;
};
#endif // IMAGEWIDGET_H