CAVAPA-GUI  30.5.2014
 All Classes Namespaces Functions Variables Typedefs Enumerations Pages
Public Slots | Signals | Public Member Functions | List of all members
cavapa_gui::SceneWidget Class Reference

A widget that holds the output and media controls of a video source. More...

#include <scenewidget.h>

Inheritance diagram for cavapa_gui::SceneWidget:

Public Slots

void setCameraXRot (int value)
 Sets the camera rotation around X axis. More...
 
void setCameraYRot (int value)
 Sets the camera rotation around Y axis. More...
 
void setCameraZRot (int value)
 Sets the camera rotation around Z axis. More...
 
void setCameraHeight (int value)
 Sets the camera height. More...
 
void setCameraFov (int value)
 Sets the field of view of the camera. More...
 
void setDrawGridEnabled (bool enabled)
 Sets whether the grid is drawn or not. More...
 
void setDrawCalibrationPointsEnabled (bool enabled)
 Sets whether the calibration points are drawn or not. More...
 
void disableForConfiguration ()
 Changes the frame shadow to raised and enables the "Set active" button.
 
void activateForConfiguration ()
 Changes the frame shadow to Sunken and disables the "Set active" button.
 

Signals

void closeRequested (SourceID sender)
 The signal is emitted when the user want's to close this source widget. More...
 
void requestedActivation (SceneWidget *sender)
 The signal is emitted when user wants to activate this source widget for calibration. More...
 
void playRequested (SourceID sender)
 The signal is emitted when the user wants to play the video. More...
 
void pauseRequested (SourceID sender)
 The signal is emitted when the user wants to pause the video. More...
 
void seekBarValueChanged (SourceID sender, FrameTime value)
 The signal is emitted when video seek bar value has changed. More...
 

Public Member Functions

 SceneWidget (SourceID sid, SourceType type, const QString &description, QWidget *parent=0)
 Constructs a new SceneWidget with the specified information. More...
 
int getCameraXRot ()
 Returns the camera rotation around X axis. More...
 
int getCameraYRot ()
 Returns the camera rotation around Y axis. More...
 
int getCameraZRot ()
 Returns the camera rotation around Z axis. More...
 
int getCameraHeight ()
 Returns the camera height. More...
 
int getCameraFov ()
 Returns the field of view of the camera. More...
 
SourceID getSourceID () const
 Returns the ID number of the source that the scene represents. More...
 
void updateFrame (const FrameCapture &frame)
 Updates the scene image. More...
 
void updateSettings (const SourceSettings &settings)
 Updates the scene settings. More...
 
cavapa::camera getCameraSettings ()
 Gets the camera settings. More...
 
std::vector
< cavapa::calibration_point > 
getCalibrationPoints ()
 Gets the calibration points. More...
 
void setCalibrationPoints (std::vector< cavapa::calibration_point > points)
 Sets the calibration points. More...
 
void setAddCalibrationPointsEnabled (bool enabled)
 Tells the SceneWidget whether adding calibration points is possible. More...
 
void setSeekBarValue (FrameTime value)
 Sets the seek bar to a new value. More...
 
void showPlayButton ()
 Shows the play video button (pause button is hidden).
 
void showPauseButton ()
 Shows the pause video button (play button is hidden).
 
void setVideoLength (FrameTime frameTime)
 Sets video length for the seek bar. More...
 

Detailed Description

A widget that holds the output and media controls of a video source.

Purpose of this class is to provide easy way to add or remove the scenes and to intermediate calibration data between the Main Window and the SourceScene.

Author
Oskari Leppäaho

Constructor & Destructor Documentation

cavapa_gui::SceneWidget::SceneWidget ( SourceID  sid,
SourceType  type,
const QString &  description,
QWidget *  parent = 0 
)

Constructs a new SceneWidget with the specified information.

Parameters
sidThe id of the source.
typeThe type of the source.
descriptionThe description of the source.
parentThe parent widget.

Member Function Documentation

void cavapa_gui::SceneWidget::closeRequested ( SourceID  sender)
signal

The signal is emitted when the user want's to close this source widget.

Parameters
senderSource ID-number.
std::vector< cavapa::calibration_point > cavapa_gui::SceneWidget::getCalibrationPoints ( )

Gets the calibration points.

Returns
A vector of calibration points
int cavapa_gui::SceneWidget::getCameraFov ( )
inline

Returns the field of view of the camera.

The value is specified in 0.1 degrees.

Returns
The field of view of the camera in 0.1 degrees.
int cavapa_gui::SceneWidget::getCameraHeight ( )
inline

Returns the camera height.

The value is specified in 0.01 meters.

Returns
The camera height specified in 0.01 meters.
cavapa::camera cavapa_gui::SceneWidget::getCameraSettings ( )

Gets the camera settings.

Returns
The camera settings
int cavapa_gui::SceneWidget::getCameraXRot ( )
inline

Returns the camera rotation around X axis.

The value is specified in 0.1 degrees.

Returns
The camera rotation around X axis specified in 0.1 degrees.
int cavapa_gui::SceneWidget::getCameraYRot ( )
inline

Returns the camera rotation around Y axis.

The value is specified in 0.1 degrees.

Returns
The camera rotation around Y axis specified in 0.1 degrees.
int cavapa_gui::SceneWidget::getCameraZRot ( )
inline

Returns the camera rotation around Z axis.

The value is specified in 0.1 degrees.

Returns
The camera rotation around Z axis specified in 0.1 degrees.
SourceID cavapa_gui::SceneWidget::getSourceID ( ) const
inline

Returns the ID number of the source that the scene represents.

Returns
Source ID number or UNDEFINED_SOURCE if no source is set.
void cavapa_gui::SceneWidget::pauseRequested ( SourceID  sender)
signal

The signal is emitted when the user wants to pause the video.

Parameters
senderSource ID-number.
void cavapa_gui::SceneWidget::playRequested ( SourceID  sender)
signal

The signal is emitted when the user wants to play the video.

Parameters
senderSource ID-number.
void cavapa_gui::SceneWidget::requestedActivation ( SceneWidget sender)
signal

The signal is emitted when user wants to activate this source widget for calibration.

Parameters
senderSource ID-number.
void cavapa_gui::SceneWidget::seekBarValueChanged ( SourceID  sender,
FrameTime  value 
)
signal

The signal is emitted when video seek bar value has changed.

Parameters
senderSource ID-number.
valueThe new seek bar value.
void cavapa_gui::SceneWidget::setAddCalibrationPointsEnabled ( bool  enabled)
inline

Tells the SceneWidget whether adding calibration points is possible.

Parameters
enabledWhether adding calibration points should be possible or not.
void cavapa_gui::SceneWidget::setCalibrationPoints ( std::vector< cavapa::calibration_point >  points)

Sets the calibration points.

Parameters
pointsThe new calibration points.
void cavapa_gui::SceneWidget::setCameraFov ( int  value)
slot

Sets the field of view of the camera.

The value is specified in 0.1 degrees.

Parameters
valueThe new fcamera field of view specified in 0.1 degrees.
void cavapa_gui::SceneWidget::setCameraHeight ( int  value)
slot

Sets the camera height.

The value is specified in 0.01 degrees.

Parameters
valueThe new camera height specified in 0.01 units.
void cavapa_gui::SceneWidget::setCameraXRot ( int  value)
slot

Sets the camera rotation around X axis.

The value is specified in 0.1 degrees.

Parameters
valueThe new X rotation specified in 0.1 degrees.
void cavapa_gui::SceneWidget::setCameraYRot ( int  value)
slot

Sets the camera rotation around Y axis.

The value is specified in 0.1 degrees.

Parameters
valueThe new Y rotation specified in 0.1 degrees.
void cavapa_gui::SceneWidget::setCameraZRot ( int  value)
slot

Sets the camera rotation around Z axis.

The value is specified in 0.1 degrees.

Parameters
valueThe new Z rotation specified in 0.1 degrees.
void cavapa_gui::SceneWidget::setDrawCalibrationPointsEnabled ( bool  enabled)
inlineslot

Sets whether the calibration points are drawn or not.

Parameters
enabledWhether the calibration points are drawn or not.
void cavapa_gui::SceneWidget::setDrawGridEnabled ( bool  enabled)
inlineslot

Sets whether the grid is drawn or not.

Parameters
enabledWhether the grid is drawn or not.
void cavapa_gui::SceneWidget::setSeekBarValue ( FrameTime  value)

Sets the seek bar to a new value.

Parameters
valueThe new value.
void cavapa_gui::SceneWidget::setVideoLength ( FrameTime  frameTime)

Sets video length for the seek bar.

Parameters
frameTimeThe video length specified in FrameTime.
void cavapa_gui::SceneWidget::updateFrame ( const FrameCapture frame)

Updates the scene image.

Parameters
frameThe new frame information.
void cavapa_gui::SceneWidget::updateSettings ( const SourceSettings settings)

Updates the scene settings.

Parameters
settingsThe settings for the source.

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