-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtrackingprogressdialog.h
More file actions
63 lines (50 loc) · 1.78 KB
/
trackingprogressdialog.h
File metadata and controls
63 lines (50 loc) · 1.78 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
// trackingprogressdialog.h
#ifndef TRACKINGPROGRESSDIALOG_H
#define TRACKINGPROGRESSDIALOG_H
#include <QDialog>
#include <QString>
#include <vector>
#include "trackingcommon.h" // Contains Thresholding::ThresholdAlgorithm definition
// Forward declarations
namespace Ui {
class TrackingProgressDialog;
}
class QProgressBar;
class QLabel;
class QPushButton;
class TrackingProgressDialog : public QDialog {
Q_OBJECT
// Make the globally defined Thresholding::ThresholdAlgorithm known to this class's meta-object system
// This allows us to use QMetaEnum to get string representations.
//Q_ENUM(Thresholding::ThresholdAlgorithm)
public:
explicit TrackingProgressDialog(QWidget *parent = nullptr);
~TrackingProgressDialog();
void setTrackingParameters(const QString& videoPath,
int keyFrame,
const Thresholding::ThresholdSettings& settings,
int numberOfWorms,
int totalFramesInVideo);
public slots:
void updateStatusMessage(const QString& message);
void updateOverallProgress(int percentage);
void onTrackingSuccessfullyFinished();
void onTrackingFailed(const QString& reason);
void onTrackingCancelledByManager();
signals:
void beginTrackingRequested();
void cancelTrackingRequested();
private slots:
void onBeginButtonClicked();
void onCancelButtonClicked();
private:
Ui::TrackingProgressDialog *ui;
QString m_videoPath;
int m_keyFrame;
Thresholding::ThresholdSettings m_thresholdSettings;
int m_numberOfWorms;
int m_totalFramesInVideo;
bool m_isTrackingRunning;
QString formatThresholdSettings(const Thresholding::ThresholdSettings& settings) const;
};
#endif // TRACKINGPROGRESSDIALOG_H