30 #ifndef USERINTERFACE_H
31 #define USERINTERFACE_H
35 #include "cavapa/cavapa.h"
37 #include "generalsettings.h"
40 #include "sourcesettings.h"
42 using cavapa::CalibrationPoint;
64 const std::string& path) = 0;
71 virtual bool askConfirmation(
const std::string& question) = 0;
76 virtual void calculationCanceled() = 0;
81 virtual void calculationCompleted() = 0;
86 virtual void calculationContinued() = 0;
91 virtual void calculationPaused() = 0;
96 virtual void calculationStarted() = 0;
101 virtual void calculationStopped() = 0;
107 virtual std::vector<std::string> getMarkerHistory() = 0;
113 virtual void newMeasurement() = 0;
118 virtual void openMeasurement() = 0;
124 virtual void removeSource(
SourceID source) = 0;
131 virtual void setCalibrationPoints(
133 const std::vector<CalibrationPoint>& points) = 0;
139 virtual void setCanPause(
bool flag) = 0;
145 virtual void setCanSaveVideos(
bool flag) = 0;
151 virtual void setMarkerHistory(
const std::vector<std::string>& history) = 0;
159 virtual void setSize(
int width,
int height,
bool fullscreen) = 0;
166 virtual void setLocation(
int x,
int y) = 0;
173 virtual void showMessage(
const std::string& message,
180 virtual void sourcePaused(
SourceID source) = 0;
186 virtual void sourcePlayStarted(
SourceID source) = 0;
191 virtual void startInterface() = 0;
197 virtual void updateCalculation(
const FrameStats& statistics) = 0;
204 virtual void updateFrame(
const FrameCapture& frame) = 0;
210 virtual void updateGeneralSettings(
const GeneralSettings& settings) = 0;
216 virtual void updateMarkers(
const std::vector<GraphMarker>& markers) = 0;
222 virtual void updateMetadata(
const Metadata& metadata) = 0;
230 virtual void updateSourceSettings(
SourceID source,
238 virtual void updateStatistics(
const std::vector<FrameStats>& stats) = 0;
276 const std::vector<CalibrationPoint>& points) = 0;
309 virtual void markersReady(
const std::vector<GraphMarker>& markers) = 0;
350 virtual void sizeChanged(
int width,
int height,
bool fullscreen) = 0;
420 #endif // USERINTERFACE_H
virtual void sourcePlayRequested(SourceID source)=0
Emitted when the user requests to play a source.
virtual void calibrationPointsReady(const std::vector< CalibrationPoint > &points)=0
Emitted when the user has set all the calibration points.
virtual void calculationContinueRequested()=0
Emitted when the user requests to continue the calculation.
virtual void sourceStepForward(SourceID source)=0
Emitted when the user steps a video one frame forward.
virtual void calculationPauseRequested()=0
Emitted when the user requests to pause the calculation.
virtual void redoMeasurementRequested()=0
Emitted when the user wants to redo the measurement.
Structure for holding frame statistics on activity.
Definition: common.h:285
unsigned int SourceID
Used to indicate unique source ID-numbers.
Definition: common.h:229
virtual void metadataOpened(const std::string &path)=0
Emitted when the user requests to open a metadata file.
virtual void sourcePauseRequested(SourceID source)=0
Emitted when the user requests to pause a source.
The Controller class handles the messages between UserInterface and AnalysisController.
Definition: controller.h:68
virtual void locationChanged(int x, int y)=0
Emitted when the interface is moved.
virtual void refreshRequested()=0
Emitted when the user requests to refresh cameras.
virtual void newMeasurementRequested()=0
Emitted when the user wants to start a new measurement.
virtual void calculationStartRequested()=0
Emitted when the user requests to start the calculation.
Represents the settings for a video source.
Definition: sourcesettings.h:46
SourceType
Available source types are the following ones: CAMERA = hardware or network camera, NOTHING = not a working source, STREAM = network stream, VIDEO = video file and VIDEOSET = set of multiple files.
Definition: common.h:68
virtual void exportRequested(const ExportOptions &options)=0
Emitted when the user requests to export data from the graph.
virtual void sourceAddRequested(const std::string &path)=0
Emitted when the user adds a new video source.
Represents the general settings of the application.
Definition: generalsettings.h:43
virtual void sourceSettingsChanged(SourceID source, const SourceSettings &settings)=0
Emitted when the user changes a setting for a source.
std::uint64_t FrameTime
Used to store milliseconds interval in frame times.
Definition: common.h:138
virtual void statisticsRequested(FrameTime start, FrameTime stop, int points)=0
Emitted when the user wants the frame statistics to be retrieved.
The structure is used for storing a single source frame.
Definition: common.h:241
virtual void interfaceClosed()=0
Emitted when the user closes the interface.
virtual void calculationStopRequested()=0
Emitted when the user requests to stop the calculation.
The structure holds CSV export options.
Definition: common.h:183
virtual void sizeChanged(int width, int height, bool fullscreen)=0
Emitted when the size of the interface changes.
virtual void sourceStepBackward(SourceID source)=0
Emitted when the user steps a video one frame back.
virtual void sourceSeekRequested(SourceID source, FrameTime position)=0
Emitted when the user requests to seek a source to a certain position.
virtual void sourceRemoveRequested(SourceID source)=0
Emitted when the user removes a source.
virtual void generalSettingsChanged(const GeneralSettings &settings)=0
Emitted when the user changes a general setting.
virtual void openMeasurementRequested(const std::string &path)=0
Emitted when the user wants to open an existing measurement.
virtual void calculationCancelRequested()=0
Emitted when the user requests to cancel the calculation.
virtual void markersReady(const std::vector< GraphMarker > &markers)=0
Emitted when the user has placed all the markers.
ErrorLevel
Error level indicator.
Definition: common.h:77
virtual void graphPositionSelected(FrameTime time)=0
Emitted when the user selects a position in the activity graph.
The UserInterface class defines the methods and signals that a user interface needs to have...
Definition: userinterface.h:52
virtual void metadataReady(const Metadata &metadata)=0
Emitted when the user has input all the metadata.