-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathVideoControlWidget.h
More file actions
70 lines (55 loc) · 1.68 KB
/
VideoControlWidget.h
File metadata and controls
70 lines (55 loc) · 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
#pragma once
#include <QIcon>
#include <QWidget>
#include "biotracker/BioTrackerApp.h"
#include "biotracker/TrackerStatus.h"
#include "ui_VideoControlWidget.h"
#include "biotracker/util/QtRaiiWrapper.hpp"
#include "VideoView.h"
#include "biotracker/util/QtRaiiWrapper.hpp"
namespace BioTracker {
namespace Gui {
class VideoControlWidget : public QWidget {
Q_OBJECT
public:
typedef Util::QtRaiiWrapper<Ui::VideoControlWidget, QWidget> VideoControlUi;
explicit VideoControlWidget(QWidget *parent, Core::BioTrackerApp &facade,
VideoView *videoView);
VideoControlUi &getUi() {
return m_ui;
}
void updateWidgets();
public Q_SLOTS:
void fileOpened(const std::string filename, const size_t totalFrames, const double tfps);
private:
VideoControlUi m_ui;
Core::BioTrackerApp &m_bioTracker;
VideoView *m_videoView;
QIcon m_iconPause;
QIcon m_iconPlay;
QTimer m_timer;
bool m_isPanZoomMode;
bool m_sliderVideoWasRunning;
void initConnects();
void initShortcuts();
public Q_SLOTS:
void frameCalculated(const size_t frameNumber, const std::string filename,
const double currentFps);
private Q_SLOTS:
void playPause();
void stop();
void setFrame(const size_t frame);
void nextFrame();
void previousFrame();
void changeCurrentFrameByEdit();
void takeScreenshot();
void switchPanZoomMode();
void videoSliderReleased();
void videoSliderPressed();
void speedSliderValueChanged(int value);
void viewChanged(QString);
void onRequestRepaint();
void registerViews(const std::vector<Core::TrackingAlgorithm::View> view);
};
}
}