Add go to dialog
This commit is contained in:
1 parent
47c8aa2bf6
commit
a772ca3ea3
5 files changed
+38
-2
No files matched your search
@@ -71,6 +71,7 @@ set(plaYUVer_App_SRCS
|
||||
ConfigureFormatDialog.cpp
|
||||
DialogSubWindowSelector.cpp
|
||||
ProgressBar.cpp
|
||||
SeekStreamDialog.cpp
|
||||
# Widgets
|
||||
HistogramWidget.cpp
|
||||
WidgetFrameNumber.cpp
|
||||
|
||||
@@ -70,7 +70,6 @@ ModulesHandleOptDialog::ModulesHandleOptDialog( QWidget *parent, PlaYUVerAppModu
|
||||
{
|
||||
resize( 400, 10 );
|
||||
setWindowTitle( "Select module parameters" );
|
||||
setWindowIcon( QIcon( ":/images/configureformat.png" ) );
|
||||
|
||||
const Options::OptionsList& moduleOptions = m_pcCurrModuleIf->m_pcModule->m_cModuleOptions.getOptionList();
|
||||
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
#include "VideoSubWindow.h"
|
||||
#include "PlaYUVerSubWindowHandle.h"
|
||||
#include "DialogSubWindowSelector.h"
|
||||
#include "SeekStreamDialog.h"
|
||||
#include "FramePropertiesDock.h"
|
||||
#include "WidgetFrameNumber.h"
|
||||
#include <QtGui>
|
||||
@@ -90,6 +91,10 @@ Void VideoHandle::createActions()
|
||||
connect( m_arrayActions[VIDEO_FORWARD_ACT], SIGNAL( triggered() ), m_mapperVideoSeek, SLOT( map() ) );
|
||||
m_mapperVideoSeek->setMapping( m_arrayActions[VIDEO_FORWARD_ACT], 1 );
|
||||
|
||||
m_arrayActions[VIDEO_GOTO_ACT] = new QAction( "Go to", this );
|
||||
m_arrayActions[VIDEO_GOTO_ACT]->setShortcut( tr( "Ctrl+G" ) );
|
||||
connect( m_arrayActions[VIDEO_GOTO_ACT], SIGNAL( triggered() ), this, SLOT( seekVideo() ) );
|
||||
|
||||
m_arrayActions[VIDEO_LOOP_ACT] = new QAction( "Repeat", this );
|
||||
m_arrayActions[VIDEO_LOOP_ACT]->setCheckable( true );
|
||||
m_arrayActions[VIDEO_LOOP_ACT]->setChecked( false );
|
||||
@@ -117,6 +122,8 @@ QMenu* VideoHandle::createMenu()
|
||||
m_pcMenuVideo->addAction( m_arrayActions[STOP_ACT] );
|
||||
m_pcMenuVideo->addAction( m_arrayActions[VIDEO_BACKWARD_ACT] );
|
||||
m_pcMenuVideo->addAction( m_arrayActions[VIDEO_FORWARD_ACT] );
|
||||
m_pcMenuVideo->addAction( m_arrayActions[VIDEO_GOTO_ACT] );
|
||||
m_pcMenuVideo->addSeparator();
|
||||
m_pcMenuVideo->addAction( m_arrayActions[VIDEO_LOOP_ACT] );
|
||||
m_pcMenuVideo->addAction( m_arrayActions[VIDEO_ZOOM_LOCK_ACT] );
|
||||
m_pcMenuVideo->addAction( m_arrayActions[VIDEO_LOCK_SELECTION_ACT] );
|
||||
@@ -562,6 +569,33 @@ Void VideoHandle::seekEvent( Int direction )
|
||||
}
|
||||
}
|
||||
|
||||
Void VideoHandle::seekVideo()
|
||||
{
|
||||
if( m_pcCurrentVideoSubWindow )
|
||||
{
|
||||
if( m_pcCurrentVideoSubWindow->getInputStream() )
|
||||
{
|
||||
SeekStreamDialog* dialogSeekVideo = new SeekStreamDialog( m_pcCurrentVideoSubWindow->getInputStream(), this );
|
||||
Int newFrameNum = dialogSeekVideo->runDialog();
|
||||
if( newFrameNum >= 0 )
|
||||
{
|
||||
if( m_acPlayingSubWindows.contains( m_pcCurrentVideoSubWindow ) )
|
||||
{
|
||||
for( Int i = 0; i < m_acPlayingSubWindows.size(); i++ )
|
||||
{
|
||||
m_acPlayingSubWindows.at( i )->seekAbsoluteEvent( ( UInt )newFrameNum );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pcCurrentVideoSubWindow->seekAbsoluteEvent( ( UInt )newFrameNum );
|
||||
}
|
||||
emit changed();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Void VideoHandle::seekSliderEvent( Int new_frame_num )
|
||||
{
|
||||
if( m_pcCurrentVideoSubWindow )
|
||||
|
||||
@@ -79,6 +79,7 @@ private:
|
||||
STOP_ACT,
|
||||
VIDEO_FORWARD_ACT,
|
||||
VIDEO_BACKWARD_ACT,
|
||||
VIDEO_GOTO_ACT,
|
||||
VIDEO_LOOP_ACT,
|
||||
VIDEO_ZOOM_LOCK_ACT,
|
||||
VIDEO_LOCK_ACT,
|
||||
@@ -129,6 +130,7 @@ private Q_SLOTS:
|
||||
void playEvent();
|
||||
void seekSliderEvent( int new_frame_num );
|
||||
void seekEvent( int direction );
|
||||
void seekVideo();
|
||||
void videoSelectionButtonEvent();
|
||||
|
||||
};
|
||||
|
||||
@@ -201,6 +201,7 @@ Void VideoSubWindow::refreshSubWindow()
|
||||
{
|
||||
refreshFrame();
|
||||
}
|
||||
updateVideoWindowInfo();
|
||||
}
|
||||
|
||||
Bool VideoSubWindow::loadFile( QString cFilename, Bool bForceDialog )
|
||||
@@ -497,7 +498,6 @@ Void VideoSubWindow::setCurrFrame( PlaYUVerFrame* pcCurrFrame )
|
||||
{
|
||||
m_pcCurrFrame = pcCurrFrame;
|
||||
m_cViewArea->setImage( m_pcCurrFrame );
|
||||
//updateVideoWindowInfo();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user