tail.h
1.68 KB
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 TAIL_H
#define TAIL_H
#include <QLabel>
#include <QKeyEvent>
#include <QMainWindow>
#include <QString>
#include <QToolBar>
#include <QToolButton>
#include <QWheelEvent>
#include <QWidget>
#include <openbr_plugin.h>
#include "dataset.h"
#include "score.h"
#include "scoredistribution.h"
namespace br
{
class BR_EXPORT_GUI Tail : public QMainWindow
{
Q_OBJECT
QToolBar tbToolBar;
QWidget wLeftSpacer, wRightSpacer;
QToolButton tbFirst, tbPrevious, tbNext, tbLast;
Dataset dDataset;
ScoreDistribution sdScoreDistribution;
Score sScore;
br::File target, query;
bool targetLocked, queryLocked;
int count;
int index;
br::FileList targets, queries;
QList<float> scores;
public:
explicit Tail(QWidget *parent = 0);
public slots:
void setAlgorithm(const QString &algorithm);
void setIndex(int index);
void setTargetGallery(const br::File &gallery);
void setQueryGallery(const br::File &gallery);
void setTargetGalleryFiles(const br::FileList &files);
void setQueryGalleryFiles(const br::FileList &files);
void setCount(int count);
void setThreshold(float score);
protected:
void keyPressEvent(QKeyEvent *event);
void wheelEvent(QWheelEvent *event);
private:
void compare();
private slots:
void updateInterface();
void import(QString tailFile = "");
void first();
void previous();
void next();
void last();
void lock(bool checked);
void selected(QPointF point);
signals:
void newTargetFiles(br::FileList files);
void newQueryFiles(br::FileList files);
};
} // namespace br
#endif // TAIL_H