iVS3D v2.0.9
Loading...
Searching...
No Matches
VideoPlayerController Class Reference

The VideoPlayerController class manages visualization of image data and manual changes to keyframes. More...

#include <videoplayercontroller.h>

Inheritance diagram for VideoPlayerController:

Public Slots

void slot_play ()
 [slot] slot_play() toggles automatic iteration over image sequence.
 
void slot_showFirstImage ()
 [slot] slot_showFirstImage() displays first image.
 
void slot_showLastImage ()
 [slot] slot_showLastImage() displays last image.
 
void slot_showPreviousImage ()
 [slot] slot_showPreviousImage() displays image going one or more steps backward from current image.
 
void slot_showNextImage ()
 [slot] slot_showNextImage() displays image going one or more steps forward from current image.
 
void slot_toggleKeyframe ()
 [slot] slot_toggleKeyframe() toggles keyframe-state for currently displayed image.
 
void slot_toggleKeyframesOnly (bool checked)
 [slot] slot_toggleKeyframesOnly(...) switches between displaying all images or keyframes only.
 
void slot_changeStepSize (unsigned int stepsize)
 [slot] slot_changeStepSize(...) changes stepsize for iterating the images.
 
void slot_changeIndex (unsigned int index)
 [slot] slot_changeIndex(...) displays the image from DataManager referenced by given index.
 
void slot_mipChanged ()
 [slot] slot_mipChanged() is called when image data changed. VideoPlayer and Timeline are updated.
 
void slot_deleteKeyframes ()
 [slot] slot_deleteKeyframes() deletes all selected keyframes.
 
void slot_deleteAllKeyframes ()
 [slot] slot_deleteAllKeyframes() deletes all keyframes.
 
void slot_stopPlay ()
 [slot] slot_stopPlay() stops running videoPlayer.
 
void slot_updateBoundaries (QPoint boundaries)
 [slot] slot_updateBoundaries() updates the mip so that the boundaries are up to date
 
void slot_resetBoundaries ()
 [slot] slot_resetBoundaries() updates the mip so that the boundaries are back to default
 
void slot_redraw ()
 [slot] slot_redraw() draws selected image again.
 
void slot_refreshPreview (bool clearOldPreview)
 [slot] slot_refreshPreview() updates the visualization for the currently displayed image by requesting a new preview from the preview plugin.
 

Signals

void sig_hasStatusMessage (QString message)
 [signal] sig_hasStatusMessage(...) is emitted when VideoPlayerController has a status message to display to the user.
 
void sig_toggleKeyframe (uint idx, bool isNowKeyframe)
 [signal] sig_toggleKeyframe notifies about a manual keyframe change by clicking Add keyframe/Remove keyframe
 
void sig_deleteKeyframes ()
 [signal] sig_deleteKeyframes is emitted when all keyframes are deleted
 
void sig_deleteAllKeyframes ()
 [signal] sig_deleteAllKeyframes is emitted when frames are reseted to be keyframes
 

Public Member Functions

 VideoPlayerController (QObject *parent=nullptr, VideoPlayer *player=nullptr, Timeline *timeline=nullptr, DataManager *dataManager=nullptr, std::shared_ptr< PluginThread > pluginThread=nullptr)
 Creates a VideoPlayerController instance. Connects to the signals from VideoPlayer and Timeline and initializes both with image data from DataManager. Initializes a timer to interrupt periodically.
 
 ~VideoPlayerController ()
 disconnects signals, deletes timer and VideoPlayerController instance.
 
unsigned int getImageIndexOnScreen ()
 getImageIndexOnScreen getter for m_imageIndexOnScreen (only used in tests for now)
 

Detailed Description

The VideoPlayerController class manages visualization of image data and manual changes to keyframes.

The image data is provided by the DataManager *dataManager. For visualization a VideoPlayer *player and a Timeline *timeline are used. The user can select images and modify keyframes using Timeline and VideoPlayer functions which delegate the command to this VideoPlayerController using signals. This VideoPlayerController is tasked with updating the data provided by dataManager as well as refreshing the view-elements (Timeline and VideoPlayer) periodically and after changes to the image data.

Author
Dominik Wüst
Date
2021/02/10

Constructor & Destructor Documentation

◆ VideoPlayerController()

VideoPlayerController::VideoPlayerController ( QObject *  parent = nullptr,
VideoPlayer player = nullptr,
Timeline timeline = nullptr,
DataManager dataManager = nullptr,
std::shared_ptr< PluginThread pluginThread = nullptr 
)
explicit

Creates a VideoPlayerController instance. Connects to the signals from VideoPlayer and Timeline and initializes both with image data from DataManager. Initializes a timer to interrupt periodically.

Parameters
parenta QWidget as parent in the Qt object hierarchy
playera VideoPlayer instance to display images
timelinea Timeline instance to visualize keyframe distribution
dataManagera DataManager Instance to access image data
algoControlleran AlgorithmController instance to transform images and preview them

Member Function Documentation

◆ getImageIndexOnScreen()

unsigned int VideoPlayerController::getImageIndexOnScreen ( )

getImageIndexOnScreen getter for m_imageIndexOnScreen (only used in tests for now)

Returns
index of image currently displayed

◆ sig_hasStatusMessage

void VideoPlayerController::sig_hasStatusMessage ( QString  message)
signal

[signal] sig_hasStatusMessage(...) is emitted when VideoPlayerController has a status message to display to the user.

Parameters
messagethe QString to display.

◆ sig_toggleKeyframe

void VideoPlayerController::sig_toggleKeyframe ( uint  idx,
bool  isNowKeyframe 
)
signal

[signal] sig_toggleKeyframe notifies about a manual keyframe change by clicking Add keyframe/Remove keyframe

Parameters
idxIndex of the changed frame
isNowKeyframetrue if the frame wasn't a keyframe and became one by the user, false otherwise

◆ slot_changeIndex

void VideoPlayerController::slot_changeIndex ( unsigned int  index)
slot

[slot] slot_changeIndex(...) displays the image from DataManager referenced by given index.

Parameters
indexof image to display

◆ slot_changeStepSize

void VideoPlayerController::slot_changeStepSize ( unsigned int  stepsize)
slot

[slot] slot_changeStepSize(...) changes stepsize for iterating the images.

Parameters
stepsizenew stepsize

◆ slot_showNextImage

void VideoPlayerController::slot_showNextImage ( )
slot

[slot] slot_showNextImage() displays image going one or more steps forward from current image.

See also
VideoPlayerController::slot_changeStepSize to change stepsize.

◆ slot_showPreviousImage

void VideoPlayerController::slot_showPreviousImage ( )
slot

[slot] slot_showPreviousImage() displays image going one or more steps backward from current image.

See also
VideoPlayerController::slot_changeStepSize to change stepsize.

◆ slot_toggleKeyframesOnly

void VideoPlayerController::slot_toggleKeyframesOnly ( bool  checked)
slot

[slot] slot_toggleKeyframesOnly(...) switches between displaying all images or keyframes only.

Parameters
checkeddisplay all images if false, keyframes only if true

The documentation for this class was generated from the following files: