OpenWalnut
1.5.0dev
|
This class is a screen recorder adapter in QT. More...
#include <WQtGLScreenCapture.h>
Public Member Functions | |
WQtGLScreenCapture (WQtGLDockWidget *parent) | |
Creates screen capture gui for the specified capture callback of a certain view. More... | |
virtual | ~WQtGLScreenCapture () |
Destructor. More... | |
QAction * | getScreenshotTrigger () const |
Returns the trigger used for screenshotting. More... | |
virtual void | saveSettings () |
Save settings. More... | |
virtual void | restoreSettings () |
Restore settings. More... | |
Protected Member Functions | |
virtual bool | event (QEvent *event) |
Custom event dispatcher. More... | |
Private Slots | |
void | screenShot () |
Initiates taking a screenshot. More... | |
void | startRec () |
Slot triggered by m_moveRecButton. More... | |
void | stopRec () |
Slot triggered by m_moveStopButton. More... | |
void | resetFrames () |
Slot triggered by m_configFrameResetButton. More... | |
void | toolBoxChanged (int index) |
Someone changed the open tab in the toolbox. More... | |
void | resolutionChange (bool force) |
Changes resolution of gl widget. More... | |
Private Member Functions | |
void | recCallback () |
Called by the screencapture callback to notify this widget about recording. More... | |
void | handleImage (size_t framesLeft, size_t totalFrames, osg::ref_ptr< osg::Image > image) const |
The function handles new images. More... | |
Private Attributes | |
WQtGLDockWidget * | m_glDockWidget |
My parent. More... | |
WGEViewer::SPtr | m_viewer |
The actual screen capture instance. More... | |
boost::signals2::connection | m_recordConnection |
Recording - callback connection. More... | |
boost::signals2::connection | m_imageConnection |
New image incoming - callback connection to handleImage. More... | |
QToolBox * | m_toolbox |
The toolbox containing all the stuff. More... | |
QWidget * | m_configWidget |
The configuration widget. More... | |
QLineEdit * | m_configFileEdit |
The filename for the screenshot. More... | |
QLabel * | m_configFrameLabel |
Shows recorded frames. More... | |
QPushButton * | m_configFrameResetButton |
Triggers frame counter reset. More... | |
QWidget * | m_screenshotWidget |
Widget containing all the widgets to control movie recording. More... | |
QPushButton * | m_screenshotButton |
The trigger which triggers the screenshot. More... | |
QAction * | m_screenshotAction |
This action triggers a screenshot. More... | |
QLabel * | m_movieTimeLabel |
Shows recorded time in movie-time. More... | |
QWidget * | m_movieWidget |
Widget containing all the widgets to control movie recording. More... | |
QPushButton * | m_movieRecButton |
record button More... | |
QPushButton * | m_movieStopButton |
stop button More... | |
QComboBox * | m_resolutionCombo |
Stores the resolution the user wants to have. More... | |
QLineEdit * | m_customWidth |
Widget for entering a custom resolution width. More... | |
QLineEdit * | m_customHeight |
Widget for entering a custom resolution height. More... | |
This class is a screen recorder adapter in QT.
It uses WGEScreenCapture and provides a nice widget around it.
Definition at line 52 of file WQtGLScreenCapture.h.
|
explicit |
Creates screen capture gui for the specified capture callback of a certain view.
parent | the parent |
Definition at line 44 of file WQtGLScreenCapture.cpp.
References WQtGLDockWidget::getDockTitle(), WQtGui::getIconManager(), handleImage(), m_configFileEdit, m_configFrameLabel, m_configFrameResetButton, m_configWidget, m_customHeight, m_customWidth, m_imageConnection, m_movieRecButton, m_movieStopButton, m_movieTimeLabel, m_movieWidget, m_recordConnection, m_resolutionCombo, m_screenshotAction, m_screenshotButton, m_screenshotWidget, m_toolbox, m_viewer, recCallback(), resetFrames(), resolutionChange(), screenShot(), startRec(), stopRec(), and toolBoxChanged().
|
virtual |
Destructor.
Cleans up.
Definition at line 213 of file WQtGLScreenCapture.cpp.
References m_imageConnection, and m_recordConnection.
|
protectedvirtual |
Custom event dispatcher.
Gets called by QT's Event system every time an event got sent to this widget. This event handler processes several custom events, like WModuleAssocEvent.
event | the event that got transmitted. |
Definition at line 264 of file WQtGLScreenCapture.cpp.
References m_configFrameLabel, m_configWidget, m_movieRecButton, m_movieStopButton, m_movieTimeLabel, m_screenshotWidget, and m_viewer.
QAction * WQtGLScreenCapture::getScreenshotTrigger | ( | ) | const |
Returns the trigger used for screenshotting.
Definition at line 236 of file WQtGLScreenCapture.cpp.
References m_screenshotAction.
Referenced by WQtGLDockWidget::WQtGLDockWidget().
|
private |
The function handles new images.
Implement it.
framesLeft | how much frames to come |
totalFrames | the total number of frames until now |
image | the image |
Definition at line 241 of file WQtGLScreenCapture.cpp.
References wlog::info(), and m_configFileEdit.
Referenced by WQtGLScreenCapture().
|
private |
Called by the screencapture callback to notify this widget about recording.
Definition at line 328 of file WQtGLScreenCapture.cpp.
Referenced by WQtGLScreenCapture().
|
privateslot |
Slot triggered by m_configFrameResetButton.
Definition at line 322 of file WQtGLScreenCapture.cpp.
References wlog::debug(), and m_viewer.
Referenced by WQtGLScreenCapture().
|
privateslot |
Changes resolution of gl widget.
force | if true, the resolution is set. If not, it gets restored. |
Definition at line 338 of file WQtGLScreenCapture.cpp.
References wlog::debug(), WQtGLDockWidget::forceGLWidgetSize(), m_customHeight, m_customWidth, m_glDockWidget, m_resolutionCombo, and WQtGLDockWidget::restoreGLWidgetSize().
Referenced by WQtGLScreenCapture().
|
virtual |
Restore settings.
Definition at line 228 of file WQtGLScreenCapture.cpp.
References WQtGui::getSettings(), m_configFileEdit, m_customHeight, m_customWidth, and m_resolutionCombo.
Referenced by WQtGLDockWidget::restoreSettings().
|
virtual |
Save settings.
Definition at line 220 of file WQtGLScreenCapture.cpp.
References WQtGui::getSettings(), m_configFileEdit, m_customHeight, m_customWidth, and m_resolutionCombo.
Referenced by WQtGLDockWidget::saveSettings().
|
privateslot |
Initiates taking a screenshot.
Definition at line 305 of file WQtGLScreenCapture.cpp.
References m_viewer.
Referenced by WQtGLScreenCapture().
|
privateslot |
Slot triggered by m_moveRecButton.
Definition at line 310 of file WQtGLScreenCapture.cpp.
References wlog::info(), and m_viewer.
Referenced by WQtGLScreenCapture().
|
privateslot |
Slot triggered by m_moveStopButton.
Definition at line 316 of file WQtGLScreenCapture.cpp.
References wlog::info(), and m_viewer.
Referenced by WQtGLScreenCapture().
|
privateslot |
Someone changed the open tab in the toolbox.
index | the new index |
Definition at line 333 of file WQtGLScreenCapture.cpp.
Referenced by WQtGLScreenCapture().
|
private |
The filename for the screenshot.
Definition at line 181 of file WQtGLScreenCapture.h.
Referenced by handleImage(), restoreSettings(), saveSettings(), and WQtGLScreenCapture().
|
private |
Shows recorded frames.
Definition at line 186 of file WQtGLScreenCapture.h.
Referenced by event(), and WQtGLScreenCapture().
|
private |
Triggers frame counter reset.
Definition at line 191 of file WQtGLScreenCapture.h.
Referenced by WQtGLScreenCapture().
|
private |
The configuration widget.
It contains the common config stuff
Definition at line 176 of file WQtGLScreenCapture.h.
Referenced by event(), and WQtGLScreenCapture().
|
private |
Widget for entering a custom resolution height.
Definition at line 234 of file WQtGLScreenCapture.h.
Referenced by resolutionChange(), restoreSettings(), saveSettings(), and WQtGLScreenCapture().
|
private |
Widget for entering a custom resolution width.
Definition at line 229 of file WQtGLScreenCapture.h.
Referenced by resolutionChange(), restoreSettings(), saveSettings(), and WQtGLScreenCapture().
|
private |
|
private |
New image incoming - callback connection to handleImage.
Definition at line 166 of file WQtGLScreenCapture.h.
Referenced by WQtGLScreenCapture(), and ~WQtGLScreenCapture().
|
private |
record button
Definition at line 218 of file WQtGLScreenCapture.h.
Referenced by event(), and WQtGLScreenCapture().
|
private |
stop button
Definition at line 219 of file WQtGLScreenCapture.h.
Referenced by event(), and WQtGLScreenCapture().
|
private |
Shows recorded time in movie-time.
Definition at line 211 of file WQtGLScreenCapture.h.
Referenced by event(), and WQtGLScreenCapture().
|
private |
Widget containing all the widgets to control movie recording.
Definition at line 216 of file WQtGLScreenCapture.h.
Referenced by WQtGLScreenCapture().
|
private |
Recording - callback connection.
Definition at line 161 of file WQtGLScreenCapture.h.
Referenced by WQtGLScreenCapture(), and ~WQtGLScreenCapture().
|
private |
Stores the resolution the user wants to have.
Definition at line 224 of file WQtGLScreenCapture.h.
Referenced by resolutionChange(), restoreSettings(), saveSettings(), and WQtGLScreenCapture().
|
private |
This action triggers a screenshot.
Definition at line 206 of file WQtGLScreenCapture.h.
Referenced by getScreenshotTrigger(), and WQtGLScreenCapture().
|
private |
The trigger which triggers the screenshot.
Definition at line 201 of file WQtGLScreenCapture.h.
Referenced by WQtGLScreenCapture().
|
private |
Widget containing all the widgets to control movie recording.
Definition at line 196 of file WQtGLScreenCapture.h.
Referenced by event(), and WQtGLScreenCapture().
|
private |
The toolbox containing all the stuff.
Definition at line 171 of file WQtGLScreenCapture.h.
Referenced by WQtGLScreenCapture().
|
private |
The actual screen capture instance.
Definition at line 142 of file WQtGLScreenCapture.h.
Referenced by event(), resetFrames(), screenShot(), startRec(), stopRec(), and WQtGLScreenCapture().