Merge lot of cool stuff in master
Make it stable and release it
This commit is contained in:
1 parent
3e6b04e983
commit
58a0b11c8f
69 files changed
+1854
-2487
No files matched your search
+140
-552
@@ -1,6 +1,6 @@
|
||||
/* This file is a part of plaYUVer project
|
||||
* Copyright (C) 2014 by Luis Lucas (luisfrlucas@gmail.com)
|
||||
* Joao Carreira (jfmcarreira@gmail.com)
|
||||
* Copyright (C) 2014-2015 by Luis Lucas (luisfrlucas@gmail.com)
|
||||
* Joao Carreira (jfmcarreira@gmail.com)
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -29,7 +29,6 @@
|
||||
#include "plaYUVerApp.h"
|
||||
#include "DialogSubWindowSelector.h"
|
||||
#include "WidgetFrameNumber.h"
|
||||
#include "Settings.h"
|
||||
|
||||
#define SYNCHRONISED_ZOON 1
|
||||
|
||||
@@ -46,18 +45,16 @@ plaYUVerApp::plaYUVerApp()
|
||||
m_pDBusAdaptor = new PlaYUVerAppAdaptor( this );
|
||||
#endif
|
||||
|
||||
mdiArea = new PlaYUVerMdiArea;
|
||||
mdiArea = new PlaYUVerMdiArea( this );
|
||||
setCentralWidget( mdiArea );
|
||||
mdiArea->setActivationOrder( QMdiArea::ActivationHistoryOrder );
|
||||
|
||||
connect( mdiArea, SIGNAL( subWindowActivated(QMdiSubWindow*) ), this, SLOT( chageSubWindowSelection() ) );
|
||||
//mdiArea->setActivationOrder( QMdiArea::ActivationHistoryOrder );
|
||||
|
||||
mapperWindow = new QSignalMapper( this );
|
||||
connect( mapperWindow, SIGNAL( mapped(QWidget*) ), this, SLOT( setActiveSubWindow(QWidget*) ) );
|
||||
|
||||
m_pcModulesHandle = new ModulesHandle( this, mdiArea );
|
||||
|
||||
m_appModuleQuality = new QualityMeasurement( this, mdiArea );
|
||||
m_appModuleVideo = new VideoHandle( this, mdiArea );
|
||||
m_appModuleQuality = new QualityHandle( this, mdiArea );
|
||||
m_appModuleExtensions = new ModulesHandle( this, mdiArea );
|
||||
|
||||
createActions();
|
||||
createToolBars();
|
||||
@@ -72,17 +69,14 @@ plaYUVerApp::plaYUVerApp()
|
||||
setWindowIcon( QIcon( ":/images/playuver.png" ) );
|
||||
setUnifiedTitleAndToolBarOnMac( true );
|
||||
|
||||
m_bIsPlaying = false;
|
||||
m_pcPlayingTimer = new QTimer;
|
||||
#if( QT_VERSION_PLAYUVER == 5 )
|
||||
m_pcPlayingTimer->setTimerType( Qt::CoarseTimer );
|
||||
#endif
|
||||
connect( m_pcPlayingTimer, SIGNAL( timeout() ), this, SLOT( playEvent() ) );
|
||||
m_acPlayingSubWindows.clear();
|
||||
|
||||
setAcceptDrops( true );
|
||||
mdiArea->setAcceptDrops( true );
|
||||
|
||||
connect( mdiArea, SIGNAL( subWindowActivated(QMdiSubWindow*) ), this, SLOT( update() ) );
|
||||
connect( m_appModuleVideo, SIGNAL( changed() ), this, SLOT( update() ) );
|
||||
connect( m_appModuleQuality, SIGNAL( changed() ), this, SLOT( update() ) );
|
||||
connect( m_appModuleExtensions, SIGNAL( changed() ), this, SLOT( update() ) );
|
||||
|
||||
m_pcAboutDialog = NULL;
|
||||
m_pcCurrentSubWindow = NULL;
|
||||
m_pcCurrentVideoSubWindow = NULL;
|
||||
@@ -106,13 +100,6 @@ Void plaYUVerApp::about()
|
||||
if( !m_pcAboutDialog )
|
||||
m_pcAboutDialog = new AboutDialog( this );
|
||||
m_pcAboutDialog->exec();
|
||||
// QString about_message;
|
||||
// about_message.append( "The <b>plaYUVer</b> is an open-source raw video player! " );
|
||||
// about_message.append( "Developed by " );
|
||||
// about_message.append( "João Carreira " );
|
||||
// about_message.append( "and " );
|
||||
// about_message.append( "Luís Lucas" );
|
||||
// QMessageBox::about( this, "About plaYUVer", about_message );
|
||||
}
|
||||
|
||||
Void plaYUVerApp::closeEvent( QCloseEvent *event )
|
||||
@@ -141,7 +128,7 @@ Void plaYUVerApp::closeEvent( QCloseEvent *event )
|
||||
|
||||
if( mayCloseAll )
|
||||
{
|
||||
m_pcPlayingTimer->stop();
|
||||
//m_pcPlayingTimer->stop();
|
||||
closeAll();
|
||||
writeSettings();
|
||||
event->accept();
|
||||
@@ -157,6 +144,18 @@ Void plaYUVerApp::closeEvent( QCloseEvent *event )
|
||||
}
|
||||
}
|
||||
|
||||
Void plaYUVerApp::closeActiveWindow()
|
||||
{
|
||||
SubWindowHandle *currSubWindow = activeSubWindow();
|
||||
m_appModuleVideo->closeSubWindow( qobject_cast<VideoSubWindow*>( currSubWindow ) );
|
||||
mdiArea->closeActiveSubWindow();
|
||||
}
|
||||
|
||||
Void plaYUVerApp::closeAll()
|
||||
{
|
||||
mdiArea->closeAllSubWindows();
|
||||
}
|
||||
|
||||
Void plaYUVerApp::loadFile( QString fileName, PlaYUVerStreamInfo* pStreamInfo )
|
||||
{
|
||||
if( !QFileInfo( fileName ).exists() )
|
||||
@@ -193,7 +192,7 @@ Void plaYUVerApp::loadFile( QString fileName, PlaYUVerStreamInfo* pStreamInfo )
|
||||
mdiArea->addSubWindow( videoSubWindow );
|
||||
videoSubWindow->show();
|
||||
|
||||
connect( videoSubWindow->getViewArea(), SIGNAL( selectionChanged( QRect ) ), this, SLOT( updatePropertiesSelectedArea( QRect ) ) );
|
||||
connect( videoSubWindow->getViewArea(), SIGNAL( selectionChanged( QRect ) ), m_appModuleVideo, SLOT( updateSelectionArea( QRect ) ) );
|
||||
|
||||
connect( subWindow, SIGNAL( updateStatusBar( const QString& ) ), this, SLOT( updateStatusBar( const QString& ) ) );
|
||||
connect( subWindow, SIGNAL( zoomChanged() ), this, SLOT( updateZoomFactorSBox() ) );
|
||||
@@ -334,7 +333,7 @@ Void plaYUVerApp::format()
|
||||
m_pcCurrentSubWindow->close();
|
||||
}
|
||||
m_pcCurrentSubWindow = NULL;
|
||||
chageSubWindowSelection();
|
||||
update();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -342,17 +341,15 @@ Void plaYUVerApp::reload()
|
||||
{
|
||||
if( m_pcCurrentVideoSubWindow )
|
||||
{
|
||||
VideoSubWindow* pcVideoSubWindow = qobject_cast<VideoSubWindow*>( m_pcCurrentVideoSubWindow );
|
||||
pcVideoSubWindow->reloadFile();
|
||||
m_pcCurrentVideoSubWindow->reloadFile();
|
||||
m_pcCurrentSubWindow = NULL;
|
||||
chageSubWindowSelection();
|
||||
update();
|
||||
}
|
||||
}
|
||||
|
||||
Void plaYUVerApp::reloadAll()
|
||||
{
|
||||
VideoSubWindow *subWindow;
|
||||
|
||||
QList<VideoSubWindow*> videoSubWindowList = mdiArea->findChildren<VideoSubWindow*>();
|
||||
for( Int i = 0; i < videoSubWindowList.size(); i++ )
|
||||
{
|
||||
@@ -362,7 +359,10 @@ Void plaYUVerApp::reloadAll()
|
||||
subWindow->reloadFile();
|
||||
}
|
||||
}
|
||||
m_pcCurrentSubWindow = NULL;
|
||||
update();
|
||||
}
|
||||
|
||||
Void plaYUVerApp::loadAll()
|
||||
{
|
||||
if( m_pcCurrentVideoSubWindow )
|
||||
@@ -377,11 +377,6 @@ Void plaYUVerApp::setTool( Int idxTool )
|
||||
{
|
||||
m_appTool = ( ViewArea::eTool )idxTool;
|
||||
actionGroupTools->actions().at( m_appTool )->setChecked( true );
|
||||
setAllSubWindowTool();
|
||||
}
|
||||
|
||||
Void plaYUVerApp::setAllSubWindowTool()
|
||||
{
|
||||
QList<VideoSubWindow*> videoSubWindowList = mdiArea->findChildren<VideoSubWindow*>();
|
||||
for( Int i = 0; i < videoSubWindowList.size(); i++ )
|
||||
{
|
||||
@@ -389,342 +384,6 @@ Void plaYUVerApp::setAllSubWindowTool()
|
||||
}
|
||||
}
|
||||
|
||||
Void plaYUVerApp::closeActiveWindow()
|
||||
{
|
||||
SubWindowHandle *currSubWindow = activeSubWindow();
|
||||
if( currSubWindow->getCategory() == SubWindowHandle::VIDEO_SUBWINDOW )
|
||||
{
|
||||
VideoSubWindow* pcVideoSubWindow = qobject_cast<VideoSubWindow*>( currSubWindow );
|
||||
if( m_acPlayingSubWindows.contains( pcVideoSubWindow ) )
|
||||
{
|
||||
Int pos = m_acPlayingSubWindows.indexOf( pcVideoSubWindow );
|
||||
m_acPlayingSubWindows.at( pos )->stop();
|
||||
m_acPlayingSubWindows.remove( pos );
|
||||
}
|
||||
}
|
||||
mdiArea->closeActiveSubWindow();
|
||||
}
|
||||
|
||||
Void plaYUVerApp::closeAll()
|
||||
{
|
||||
mdiArea->closeAllSubWindows();
|
||||
}
|
||||
|
||||
// ----------------------- Modules Selection --------------------
|
||||
|
||||
Void plaYUVerApp::ModuleHandling( QAction *curr_action )
|
||||
{
|
||||
m_pcFrameProperties->stopHistogram();
|
||||
SubWindowHandle *interfaceChild = m_pcModulesHandle->processModuleHandlingOpt();
|
||||
if( interfaceChild )
|
||||
{
|
||||
mdiArea->addSubWindow( interfaceChild );
|
||||
//interfaceChild->getViewArea()->setTool( m_appTool );
|
||||
}
|
||||
if( activeSubWindow() )
|
||||
m_pcCurrentSubWindow = activeSubWindow();
|
||||
|
||||
updateStreamProperties();
|
||||
return;
|
||||
}
|
||||
|
||||
// ----------------------- Update Properties --------------------
|
||||
|
||||
UInt64 plaYUVerApp::getMaxFrameNumber()
|
||||
{
|
||||
UInt currFrames;
|
||||
UInt64 maxFrames = INT_MAX;
|
||||
if( m_pcCurrentVideoSubWindow )
|
||||
{
|
||||
if( m_acPlayingSubWindows.contains( m_pcCurrentVideoSubWindow ) )
|
||||
{
|
||||
for( Int i = 0; i < m_acPlayingSubWindows.size(); i++ )
|
||||
{
|
||||
currFrames = m_acPlayingSubWindows.at( i )->getInputStream()->getFrameNum();
|
||||
if( currFrames < maxFrames )
|
||||
maxFrames = currFrames;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
maxFrames = m_pcCurrentVideoSubWindow->getInputStream()->getFrameNum();
|
||||
}
|
||||
}
|
||||
return maxFrames;
|
||||
}
|
||||
|
||||
Void plaYUVerApp::updateStreamProperties()
|
||||
{
|
||||
if( m_pcCurrentVideoSubWindow )
|
||||
{
|
||||
Int frame_num = 0;
|
||||
UInt64 total_frame_num = 1;
|
||||
if( m_pcCurrentVideoSubWindow->getInputStream() )
|
||||
{
|
||||
frame_num = m_pcCurrentVideoSubWindow->getInputStream()->getCurrFrameNum();
|
||||
m_pcFrameNumInfo->setCurrFrameNum( frame_num );
|
||||
total_frame_num = getMaxFrameNumber();
|
||||
m_pcStreamProperties->setData( m_pcCurrentVideoSubWindow->getInputStream() );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pcStreamProperties->setData( NULL );
|
||||
m_pcFrameNumInfo->setCurrFrameNum( 0 );
|
||||
}
|
||||
|
||||
m_pcFrameProperties->setData( m_pcCurrentVideoSubWindow->getCurrFrame(), m_pcCurrentVideoSubWindow->isPlaying() );
|
||||
|
||||
m_pcFrameSlider->setValue( frame_num );
|
||||
m_pcFrameSlider->setMaximum( total_frame_num - 1 );
|
||||
m_pcFrameNumInfo->setTotalFrameNum( total_frame_num );
|
||||
|
||||
if( m_pcCurrentVideoSubWindow->isPlaying() )
|
||||
m_arrayActions[PLAY_ACT]->setIcon( style()->standardIcon( QStyle::SP_MediaPause ) );
|
||||
else
|
||||
m_arrayActions[PLAY_ACT]->setIcon( style()->standardIcon( QStyle::SP_MediaPlay ) );
|
||||
|
||||
m_appModuleQuality->update( m_pcCurrentVideoSubWindow );
|
||||
return;
|
||||
}
|
||||
m_pcStreamProperties->setData( NULL );
|
||||
m_pcFrameProperties->setData( NULL, false );
|
||||
m_pcFrameNumInfo->setCurrFrameNum( 0 );
|
||||
m_pcFrameNumInfo->setTotalFrameNum( 0 );
|
||||
m_pcZoomFactorSBox->setValue( 0.0 );
|
||||
}
|
||||
|
||||
Void plaYUVerApp::updatePropertiesSelectedArea( QRect area )
|
||||
{
|
||||
if( m_pcCurrentSubWindow )
|
||||
{
|
||||
if( area.isValid() )
|
||||
{
|
||||
m_pcFrameProperties->setSelection( area );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pcFrameProperties->setData( NULL, false );
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------- Playing Functions --------------------
|
||||
|
||||
Void plaYUVerApp::setTimerStatus()
|
||||
{
|
||||
Bool status = false;
|
||||
for( Int i = 0; i < m_acPlayingSubWindows.size(); i++ )
|
||||
{
|
||||
status |= m_acPlayingSubWindows.at( i )->isPlaying();
|
||||
}
|
||||
if( m_pcCurrentVideoSubWindow )
|
||||
{
|
||||
status |= m_pcCurrentVideoSubWindow->isPlaying();
|
||||
}
|
||||
if( status )
|
||||
{
|
||||
if( !m_bIsPlaying )
|
||||
{
|
||||
m_pcPlayingTimer->start();
|
||||
m_bIsPlaying = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pcPlayingTimer->stop();
|
||||
m_bIsPlaying = false;
|
||||
}
|
||||
}
|
||||
|
||||
Void plaYUVerApp::play()
|
||||
{
|
||||
if( !m_pcCurrentVideoSubWindow )
|
||||
return;
|
||||
|
||||
if( !m_pcCurrentVideoSubWindow->getInputStream() )
|
||||
return;
|
||||
|
||||
if( !m_pcCurrentVideoSubWindow->isPlaying() ) // Not playing
|
||||
{
|
||||
UInt frameRate;
|
||||
UInt timeInterval;
|
||||
if( m_acPlayingSubWindows.size() < 2 )
|
||||
{
|
||||
for( Int i = 0; i < m_acPlayingSubWindows.size(); i++ )
|
||||
{
|
||||
m_acPlayingSubWindows.at( i )->pause();
|
||||
}
|
||||
m_acPlayingSubWindows.clear();
|
||||
m_acPlayingSubWindows.append( m_pcCurrentVideoSubWindow );
|
||||
}
|
||||
if( m_acPlayingSubWindows.contains( m_pcCurrentVideoSubWindow ) )
|
||||
{
|
||||
for( Int i = 0; i < m_acPlayingSubWindows.size(); i++ )
|
||||
{
|
||||
m_acPlayingSubWindows.at( i )->play();
|
||||
}
|
||||
frameRate = m_acPlayingSubWindows.at( 0 )->getInputStream()->getFrameRate();
|
||||
timeInterval = ( UInt )( 1000.0 / frameRate + 0.5 );
|
||||
m_pcPlayingTimer->setInterval( timeInterval );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if( m_acPlayingSubWindows.contains( m_pcCurrentVideoSubWindow ) )
|
||||
{
|
||||
for( Int i = 0; i < m_acPlayingSubWindows.size(); i++ )
|
||||
{
|
||||
m_acPlayingSubWindows.at( i )->pause();
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pcCurrentVideoSubWindow->pause();
|
||||
}
|
||||
}
|
||||
setTimerStatus();
|
||||
updateStreamProperties();
|
||||
}
|
||||
|
||||
Void plaYUVerApp::stop()
|
||||
{
|
||||
if( m_acPlayingSubWindows.size() > 0 )
|
||||
{
|
||||
for( Int i = 0; i < m_acPlayingSubWindows.size(); i++ )
|
||||
{
|
||||
m_acPlayingSubWindows.at( i )->stop();
|
||||
}
|
||||
m_acPlayingSubWindows.clear();
|
||||
setTimerStatus();
|
||||
}
|
||||
else
|
||||
{
|
||||
if( m_pcCurrentVideoSubWindow )
|
||||
{
|
||||
m_pcCurrentVideoSubWindow->stop();
|
||||
}
|
||||
}
|
||||
updateStreamProperties();
|
||||
m_arrayActions[VIDEO_LOCK_ACT]->setVisible( false );
|
||||
}
|
||||
|
||||
Void plaYUVerApp::playEvent()
|
||||
{
|
||||
Bool bEndOfSequence = false;
|
||||
try
|
||||
{
|
||||
for( Int i = 0; i < m_acPlayingSubWindows.size(); i++ )
|
||||
{
|
||||
bEndOfSequence |= m_acPlayingSubWindows.at( i )->playEvent();
|
||||
}
|
||||
if( bEndOfSequence && !m_arrayActions[VIDEO_LOOP_ACT]->isChecked() )
|
||||
{
|
||||
stop();
|
||||
}
|
||||
}
|
||||
catch( const char *msg )
|
||||
{
|
||||
QString warningMsg = "Error while playing " + QFileInfo( m_pcCurrentVideoSubWindow->getCurrentFileName() ).fileName() + " with the following error: \n"
|
||||
+ msg;
|
||||
QMessageBox::warning( this, QApplication::applicationName(), warningMsg );
|
||||
statusBar()->showMessage( warningMsg, 2000 );
|
||||
qDebug( ) << warningMsg;
|
||||
stop();
|
||||
m_pcCurrentVideoSubWindow->close();
|
||||
}
|
||||
updateStreamProperties();
|
||||
}
|
||||
|
||||
Void plaYUVerApp::seekEvent( Int direction )
|
||||
{
|
||||
if( m_pcCurrentVideoSubWindow )
|
||||
{
|
||||
if( m_acPlayingSubWindows.contains( m_pcCurrentVideoSubWindow ) )
|
||||
{
|
||||
if( !( ( UInt )( m_pcCurrentVideoSubWindow->getInputStream()->getCurrFrameNum() + 1 ) >= getMaxFrameNumber() && direction > 0 ) )
|
||||
{
|
||||
for( Int i = 0; i < m_acPlayingSubWindows.size(); i++ )
|
||||
{
|
||||
m_acPlayingSubWindows.at( i )->seekRelativeEvent( direction > 0 ? true : false );
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pcCurrentVideoSubWindow->seekRelativeEvent( direction > 0 ? true : false );
|
||||
}
|
||||
updateStreamProperties();
|
||||
}
|
||||
}
|
||||
|
||||
Void plaYUVerApp::seekSliderEvent( Int new_frame_num )
|
||||
{
|
||||
if( m_pcCurrentVideoSubWindow )
|
||||
{
|
||||
if( m_acPlayingSubWindows.contains( m_pcCurrentVideoSubWindow ) )
|
||||
{
|
||||
for( Int i = 0; i < m_acPlayingSubWindows.size(); i++ )
|
||||
{
|
||||
m_acPlayingSubWindows.at( i )->seekAbsoluteEvent( ( UInt )new_frame_num );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pcCurrentVideoSubWindow->seekAbsoluteEvent( ( UInt )new_frame_num );
|
||||
}
|
||||
updateStreamProperties();
|
||||
}
|
||||
}
|
||||
|
||||
Void plaYUVerApp::videoSelectionButtonEvent()
|
||||
{
|
||||
DialogSubWindowSelector dialogWindowsSelection( this, mdiArea );
|
||||
QStringList cWindowListNames;
|
||||
for( Int i = 0; i < m_acPlayingSubWindows.size(); i++ )
|
||||
{
|
||||
cWindowListNames.append( m_acPlayingSubWindows.at( i )->getWindowName() );
|
||||
dialogWindowsSelection.setSubWindowList( cWindowListNames );
|
||||
}
|
||||
if( dialogWindowsSelection.exec() == QDialog::Accepted )
|
||||
{
|
||||
QStringList selectedWindows = dialogWindowsSelection.getSelectedWindows();
|
||||
m_acPlayingSubWindows.clear();
|
||||
SubWindowHandle *subWindow;
|
||||
QString windowName;
|
||||
for( Int i = 0; i < mdiArea->subWindowList().size(); i++ )
|
||||
{
|
||||
subWindow = qobject_cast<SubWindowHandle *>( mdiArea->subWindowList().at( i ) );
|
||||
windowName = subWindow->getWindowName();
|
||||
if( selectedWindows.contains( windowName ) )
|
||||
{
|
||||
VideoSubWindow* pcVideoSubWinodw = qobject_cast<VideoSubWindow*>( subWindow );
|
||||
m_acPlayingSubWindows.append( pcVideoSubWinodw );
|
||||
pcVideoSubWinodw->seekAbsoluteEvent( m_acPlayingSubWindows.at( 0 )->getInputStream()->getCurrFrameNum() );
|
||||
}
|
||||
}
|
||||
if( m_acPlayingSubWindows.size() > 0 )
|
||||
{
|
||||
m_acPlayingSubWindows.at( 0 )->activateWindow();
|
||||
if( m_acPlayingSubWindows.size() > 1 )
|
||||
{
|
||||
m_arrayActions[VIDEO_LOCK_ACT]->setVisible( true );
|
||||
}
|
||||
if( m_bIsPlaying )
|
||||
{
|
||||
for( Int i = 0; i < m_acPlayingSubWindows.size(); i++ )
|
||||
{
|
||||
m_acPlayingSubWindows.at( i )->play();
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
stop();
|
||||
}
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------- Zoom Functions -----------------------
|
||||
|
||||
Void plaYUVerApp::normalSize()
|
||||
@@ -789,55 +448,6 @@ Void plaYUVerApp::updateZoomFactorSBox()
|
||||
}
|
||||
}
|
||||
|
||||
Void plaYUVerApp::chageSubWindowSelection()
|
||||
{
|
||||
SubWindowHandle *new_window = activeSubWindow();
|
||||
if( activeSubWindow() != m_pcCurrentSubWindow )
|
||||
{
|
||||
m_pcCurrentVideoSubWindow = NULL;
|
||||
if( activeSubWindow() )
|
||||
{
|
||||
m_pcCurrentSubWindow = new_window;
|
||||
|
||||
m_pcCurrentVideoSubWindow = NULL;
|
||||
switch( m_pcCurrentSubWindow->getCategory() )
|
||||
{
|
||||
case SubWindowHandle::VIDEO_SUBWINDOW:
|
||||
m_pcCurrentVideoSubWindow = qobject_cast<VideoSubWindow*>( m_pcCurrentSubWindow );
|
||||
break;
|
||||
}
|
||||
|
||||
setWindowTitle( QApplication::applicationName() + " - " + m_pcCurrentSubWindow->getWindowName() );
|
||||
|
||||
if( m_pcCurrentVideoSubWindow )
|
||||
{
|
||||
if( !plaYUVerApp::findSubWindow( mdiArea, m_pcCurrentVideoSubWindow->getRefSubWindow() ) )
|
||||
{
|
||||
m_pcCurrentVideoSubWindow->setRefSubWindow( NULL );
|
||||
}
|
||||
}
|
||||
updateZoomFactorSBox();
|
||||
}
|
||||
}
|
||||
updateStreamProperties();
|
||||
m_appModuleQuality->update( m_pcCurrentVideoSubWindow );
|
||||
updateMenus();
|
||||
}
|
||||
|
||||
// ----------------------- Status bar Functions -----------------------
|
||||
|
||||
Void plaYUVerApp::updateStatusBar( const QString& statusBarString )
|
||||
{
|
||||
if( !statusBarString.isEmpty() )
|
||||
{
|
||||
statusBar()->showMessage( statusBarString, 5000 );
|
||||
}
|
||||
else
|
||||
{
|
||||
statusBar()->showMessage( " " );
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------- Drag and drop functions ----------------------
|
||||
|
||||
Void plaYUVerApp::dragEnterEvent( QDragEnterEvent *event )
|
||||
@@ -859,7 +469,12 @@ Void plaYUVerApp::dropEvent( QDropEvent *event )
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------- Gui Functions -----------------------
|
||||
// ----------------------- Sub Window Functions -----------------------
|
||||
|
||||
void plaYUVerApp::tileSubWindows()
|
||||
{
|
||||
mdiArea->tileSubWindows();
|
||||
}
|
||||
|
||||
SubWindowHandle *plaYUVerApp::activeSubWindow()
|
||||
{
|
||||
@@ -915,6 +530,56 @@ Void plaYUVerApp::setActiveSubWindow( QWidget *window )
|
||||
mdiArea->setActiveSubWindow( qobject_cast<QMdiSubWindow *>( window ) );
|
||||
}
|
||||
|
||||
// ----------------------- Update Functions -----------------------
|
||||
|
||||
Void plaYUVerApp::update()
|
||||
{
|
||||
SubWindowHandle *new_window = activeSubWindow();
|
||||
QCoreApplication::processEvents();
|
||||
//if( activeSubWindow() != m_pcCurrentSubWindow )
|
||||
{
|
||||
m_pcCurrentSubWindow = NULL;
|
||||
m_pcCurrentVideoSubWindow = NULL;
|
||||
if( activeSubWindow() )
|
||||
{
|
||||
m_pcCurrentSubWindow = new_window;
|
||||
|
||||
switch( m_pcCurrentSubWindow->getCategory() )
|
||||
{
|
||||
case SubWindowHandle::VIDEO_SUBWINDOW:
|
||||
m_pcCurrentVideoSubWindow = qobject_cast<VideoSubWindow*>( m_pcCurrentSubWindow );
|
||||
break;
|
||||
}
|
||||
|
||||
setWindowTitle( QApplication::applicationName() + " - " + m_pcCurrentSubWindow->getWindowName() );
|
||||
|
||||
if( m_pcCurrentVideoSubWindow )
|
||||
{
|
||||
if( !plaYUVerApp::findSubWindow( mdiArea, m_pcCurrentVideoSubWindow->getRefSubWindow() ) )
|
||||
{
|
||||
m_pcCurrentVideoSubWindow->setRefSubWindow( NULL );
|
||||
}
|
||||
}
|
||||
updateZoomFactorSBox();
|
||||
}
|
||||
}
|
||||
m_appModuleVideo->update( m_pcCurrentVideoSubWindow );
|
||||
m_appModuleQuality->update( m_pcCurrentVideoSubWindow );
|
||||
updateMenus();
|
||||
}
|
||||
|
||||
Void plaYUVerApp::updateStatusBar( const QString& statusBarString )
|
||||
{
|
||||
if( !statusBarString.isEmpty() )
|
||||
{
|
||||
statusBar()->showMessage( statusBarString, 5000 );
|
||||
}
|
||||
else
|
||||
{
|
||||
statusBar()->showMessage( " " );
|
||||
}
|
||||
}
|
||||
|
||||
Void plaYUVerApp::updateMenus()
|
||||
{
|
||||
Bool hasSubWindow = ( activeSubWindow() != 0 );
|
||||
@@ -936,25 +601,15 @@ Void plaYUVerApp::updateMenus()
|
||||
m_arrayActions[ZOOM_OUT_ACT]->setEnabled( hasSubWindow );
|
||||
m_arrayActions[ZOOM_NORMAL_ACT]->setEnabled( hasSubWindow );
|
||||
m_arrayActions[ZOOM_FIT_ACT]->setEnabled( hasSubWindow );
|
||||
m_arrayActions[ZOOM_FIT_ALL_ACT]->setEnabled( hasSubWindow );
|
||||
m_pcZoomFactorSBox->setEnabled( hasSubWindow );
|
||||
|
||||
m_arrayActions[PLAY_ACT]->setEnabled( hasSubWindow );
|
||||
//m_arrayActions[PAUSE_ACT]->setEnabled( hasSubWindow );
|
||||
m_arrayActions[STOP_ACT]->setEnabled( hasSubWindow );
|
||||
m_arrayActions[VIDEO_BACKWARD_ACT]->setEnabled( hasSubWindow );
|
||||
m_arrayActions[VIDEO_FORWARD_ACT]->setEnabled( hasSubWindow );
|
||||
m_arrayActions[VIDEO_LOOP_ACT]->setEnabled( hasSubWindow );
|
||||
m_arrayActions[VIDEO_LOCK_SELECTION_ACT]->setEnabled( hasSubWindow );
|
||||
m_pcFrameSlider->setEnabled( hasSubWindow );
|
||||
if( !hasSubWindow )
|
||||
{
|
||||
m_pcFrameSlider->setValue( 0 );
|
||||
m_pcFrameNumInfo->clear();
|
||||
}
|
||||
m_arrayActions[NAVIGATION_TOOL_ACT]->setEnabled( hasSubWindow );
|
||||
m_arrayActions[SELECTION_TOOL_ACT]->setEnabled( hasSubWindow );
|
||||
|
||||
m_pcModulesHandle->updateMenus( hasSubWindow );
|
||||
m_appModuleVideo->updateMenus();
|
||||
m_appModuleQuality->updateMenus();
|
||||
m_appModuleExtensions->updateMenus();
|
||||
}
|
||||
|
||||
Void plaYUVerApp::updateWindowMenu()
|
||||
@@ -1008,7 +663,7 @@ Void plaYUVerApp::updateWindowMenu()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// ----------------------- Create Functions -----------------------
|
||||
|
||||
Void plaYUVerApp::createActions()
|
||||
{
|
||||
@@ -1100,47 +755,10 @@ Void plaYUVerApp::createActions()
|
||||
m_arrayActions[ZOOM_FIT_ACT]->setStatusTip( tr( "Zoom in or out to fit on the window." ) );
|
||||
connect( m_arrayActions[ZOOM_FIT_ACT], SIGNAL( triggered() ), this, SLOT( zoomToFit() ) );
|
||||
|
||||
// ------------ Playing ------------
|
||||
|
||||
m_arrayActions[PLAY_ACT] = new QAction( "Play", this );
|
||||
m_arrayActions[PLAY_ACT]->setIcon( QIcon( style()->standardIcon( QStyle::SP_MediaPlay ) ) );
|
||||
m_arrayActions[PLAY_ACT]->setShortcut( Qt::Key_Space );
|
||||
connect( m_arrayActions[PLAY_ACT], SIGNAL( triggered() ), this, SLOT( play() ) );
|
||||
|
||||
m_arrayActions[STOP_ACT] = new QAction( "Stop", this );
|
||||
m_arrayActions[STOP_ACT]->setIcon( QIcon( style()->standardIcon( QStyle::SP_MediaStop ) ) );
|
||||
connect( m_arrayActions[STOP_ACT], SIGNAL( triggered() ), this, SLOT( stop() ) );
|
||||
|
||||
mapperSeekVideo = new QSignalMapper( this );
|
||||
connect( mapperSeekVideo, SIGNAL( mapped(int) ), this, SLOT( seekEvent(int) ) );
|
||||
|
||||
m_arrayActions[VIDEO_BACKWARD_ACT] = new QAction( "Video Backward", this );
|
||||
m_arrayActions[VIDEO_BACKWARD_ACT]->setIcon( QIcon( style()->standardIcon( QStyle::SP_MediaSeekBackward ) ) );
|
||||
m_arrayActions[VIDEO_BACKWARD_ACT]->setShortcut( Qt::Key_Left );
|
||||
connect( m_arrayActions[VIDEO_BACKWARD_ACT], SIGNAL( triggered() ), mapperSeekVideo, SLOT( map() ) );
|
||||
mapperSeekVideo->setMapping( m_arrayActions[VIDEO_BACKWARD_ACT], 0 );
|
||||
|
||||
m_arrayActions[VIDEO_FORWARD_ACT] = new QAction( "Video Forward", this );
|
||||
m_arrayActions[VIDEO_FORWARD_ACT]->setIcon( QIcon( style()->standardIcon( QStyle::SP_MediaSeekForward ) ) );
|
||||
m_arrayActions[VIDEO_FORWARD_ACT]->setShortcut( Qt::Key_Right );
|
||||
connect( m_arrayActions[VIDEO_FORWARD_ACT], SIGNAL( triggered() ), mapperSeekVideo, SLOT( map() ) );
|
||||
mapperSeekVideo->setMapping( m_arrayActions[VIDEO_FORWARD_ACT], 1 );
|
||||
|
||||
m_arrayActions[VIDEO_LOOP_ACT] = new QAction( "Repeat", this );
|
||||
m_arrayActions[VIDEO_LOOP_ACT]->setCheckable( true );
|
||||
m_arrayActions[VIDEO_LOOP_ACT]->setChecked( false );
|
||||
|
||||
m_arrayActions[VIDEO_LOCK_SELECTION_ACT] = new QAction( "Video Lock Window Selection", this );
|
||||
m_arrayActions[VIDEO_FORWARD_ACT]->setIcon( QIcon( style()->standardIcon( QStyle::SP_MediaSeekForward ) ) );
|
||||
connect( m_arrayActions[VIDEO_LOCK_SELECTION_ACT], SIGNAL( triggered() ), this, SLOT( videoSelectionButtonEvent() ) );
|
||||
|
||||
m_pcFrameSlider = new QSlider;
|
||||
m_pcFrameSlider->setOrientation( Qt::Horizontal );
|
||||
m_pcFrameSlider->setMaximumWidth( 100 );
|
||||
m_pcFrameSlider->setMaximumWidth( /* 300 */2000 );
|
||||
m_pcFrameSlider->setSizePolicy( QSizePolicy( QSizePolicy::MinimumExpanding, QSizePolicy::Fixed ) );
|
||||
m_pcFrameSlider->setEnabled( false );
|
||||
connect( m_pcFrameSlider, SIGNAL( sliderMoved(int) ), this, SLOT( seekSliderEvent(int) ) );
|
||||
m_arrayActions[ZOOM_FIT_ALL_ACT] = new QAction( tr( "Zoom to Fit All" ), this );
|
||||
//m_arrayActions[ZOOM_FIT_ALL_ACT]->setIcon( QIcon::fromTheme( "zoom-fit-best", QIcon( ":/images/fittowindow.png" ) ) );
|
||||
m_arrayActions[ZOOM_FIT_ALL_ACT]->setStatusTip( tr( "Apply zoom to fit to all windows" ) );
|
||||
connect( m_arrayActions[ZOOM_FIT_ALL_ACT], SIGNAL( triggered() ), this, SLOT( zoomToFitAll() ) );
|
||||
|
||||
// ------------ Tools ------------
|
||||
actionGroupTools = new QActionGroup( this );
|
||||
@@ -1165,14 +783,17 @@ Void plaYUVerApp::createActions()
|
||||
connect( m_arrayActions[SELECTION_TOOL_ACT], SIGNAL( triggered() ), m_mapperTools, SLOT( map() ) );
|
||||
m_mapperTools->setMapping( m_arrayActions[SELECTION_TOOL_ACT], ViewArea::NormalSelectionTool );
|
||||
|
||||
m_appModuleVideo->createActions();
|
||||
m_appModuleQuality->createActions();
|
||||
m_appModuleExtensions->createActions();
|
||||
|
||||
// ------------ Window ------------
|
||||
|
||||
m_arrayActions[TILE_WINDOWS_ACT] = new QAction( tr( "Tile" ), this );
|
||||
m_arrayActions[TILE_WINDOWS_ACT]->setIcon( QIcon( ":images/windowstile.png" ) );
|
||||
m_arrayActions[TILE_WINDOWS_ACT]->setStatusTip( tr( "Tile the windows" ) );
|
||||
connect( m_arrayActions[TILE_WINDOWS_ACT], SIGNAL( triggered() ), mdiArea, SLOT( tileSubWindows() ) );
|
||||
//connect( m_arrayActions[TILE_WINDOWS_ACT], SIGNAL( triggered() ), mdiArea, SLOT( tileSubWindows() ) );
|
||||
connect( m_arrayActions[TILE_WINDOWS_ACT], SIGNAL( triggered() ), this, SLOT( tileSubWindows() ) );
|
||||
|
||||
m_arrayActions[CASCADE_WINDOWS_ACT] = new QAction( tr( "Cascade" ), this );
|
||||
m_arrayActions[CASCADE_WINDOWS_ACT]->setIcon( QIcon( ":images/windowscascade.png" ) );
|
||||
@@ -1242,6 +863,7 @@ Void plaYUVerApp::createMenus()
|
||||
m_arrayMenu[VIEW_MENU]->addAction( m_arrayActions[ZOOM_OUT_ACT] );
|
||||
m_arrayMenu[VIEW_MENU]->addAction( m_arrayActions[ZOOM_NORMAL_ACT] );
|
||||
m_arrayMenu[VIEW_MENU]->addAction( m_arrayActions[ZOOM_FIT_ACT] );
|
||||
m_arrayMenu[VIEW_MENU]->addAction( m_arrayActions[ZOOM_FIT_ALL_ACT] );
|
||||
|
||||
m_arrayMenu[VIEW_MENU]->addSeparator();
|
||||
|
||||
@@ -1258,20 +880,13 @@ Void plaYUVerApp::createMenus()
|
||||
// m_arrayMenu[TOOLS_MENU]->addAction( m_arrayActions[NAVIGATION_TOOL_ACT] );
|
||||
// m_arrayMenu[TOOLS_MENU]->addAction( m_arrayActions[SELECTION_TOOL_ACT] );
|
||||
|
||||
m_arrayMenu[VIDEO_MENU] = menuBar()->addMenu( tr( "Video" ) );
|
||||
m_arrayMenu[VIDEO_MENU]->addAction( m_arrayActions[PLAY_ACT] );
|
||||
//m_arrayMenu[VIDEO_MENU]->addAction( m_arrayActions[PAUSE_ACT] );
|
||||
m_arrayMenu[VIDEO_MENU]->addAction( m_arrayActions[STOP_ACT] );
|
||||
m_arrayMenu[VIDEO_MENU]->addAction( m_arrayActions[VIDEO_BACKWARD_ACT] );
|
||||
m_arrayMenu[VIDEO_MENU]->addAction( m_arrayActions[VIDEO_FORWARD_ACT] );
|
||||
m_arrayMenu[VIDEO_MENU]->addAction( m_arrayActions[VIDEO_LOOP_ACT] );
|
||||
m_arrayMenu[VIDEO_MENU]->addAction( m_arrayActions[VIDEO_LOCK_SELECTION_ACT] );
|
||||
|
||||
QMenu* VideoMenu = m_appModuleVideo->createMenu();
|
||||
menuBar()->addMenu( VideoMenu );
|
||||
QMenu* QualityMenu = m_appModuleQuality->createMenu();
|
||||
menuBar()->addMenu( QualityMenu );
|
||||
|
||||
QMenu* modules_menu = m_pcModulesHandle->createMenus( menuBar() );
|
||||
connect( modules_menu, SIGNAL( triggered(QAction *) ), this, SLOT( ModuleHandling(QAction *) ) );
|
||||
QMenu* ModuleMenu = m_appModuleExtensions->createMenu();
|
||||
menuBar()->addMenu( ModuleMenu );
|
||||
//connect( ModuleMenu, SIGNAL( triggered(QAction *) ), this, SLOT( ModuleHandling(QAction *) ) );
|
||||
|
||||
m_arrayMenu[WINDOW_MENU] = menuBar()->addMenu( tr( "&Window" ) );
|
||||
updateWindowMenu();
|
||||
@@ -1319,52 +934,22 @@ Void plaYUVerApp::createToolBars()
|
||||
m_arrayToolBars[FILE_TOOLBAR]->setMovable( false );
|
||||
addToolBar( Qt::TopToolBarArea, m_arrayToolBars[VIEW_TOOLBAR] );
|
||||
|
||||
m_arrayToolBars[VIDEO_TOOLBAR] = new QToolBar( tr( "Video" ) );
|
||||
m_arrayToolBars[VIDEO_TOOLBAR]->setAllowedAreas( Qt::TopToolBarArea | Qt::BottomToolBarArea );
|
||||
m_arrayToolBars[VIDEO_TOOLBAR]->addAction( m_arrayActions[PLAY_ACT] );
|
||||
m_arrayToolBars[VIDEO_TOOLBAR]->addAction( m_arrayActions[STOP_ACT] );
|
||||
addToolBar( Qt::TopToolBarArea, m_appModuleVideo->createToolBar() );
|
||||
|
||||
m_pcLockLabel = new QLabel( "PlayingLock", this );
|
||||
m_arrayActions[VIDEO_LOCK_ACT] = m_arrayToolBars[VIDEO_TOOLBAR]->addWidget( m_pcLockLabel );
|
||||
|
||||
m_arrayToolBars[VIDEO_TOOLBAR]->addAction( m_arrayActions[VIDEO_BACKWARD_ACT] );
|
||||
m_arrayToolBars[VIDEO_TOOLBAR]->addWidget( m_pcFrameSlider );
|
||||
m_arrayToolBars[VIDEO_TOOLBAR]->addAction( m_arrayActions[VIDEO_FORWARD_ACT] );
|
||||
m_arrayToolBars[VIDEO_TOOLBAR]->addWidget( new QLabel );
|
||||
m_pcFrameNumInfo = new WidgetFrameNumber;
|
||||
m_arrayToolBars[VIDEO_TOOLBAR]->addWidget( m_pcFrameNumInfo );
|
||||
|
||||
addToolBar( Qt::TopToolBarArea, m_arrayToolBars[VIDEO_TOOLBAR] );
|
||||
m_arrayActions[VIDEO_LOCK_ACT]->setVisible( false );
|
||||
}
|
||||
|
||||
Void plaYUVerApp::createDockWidgets()
|
||||
{
|
||||
// Properties Dock Window
|
||||
m_arraySideBars.resize( TOTAL_DOCK );
|
||||
|
||||
m_pcStreamProperties = new StreamPropertiesSideBar( this );
|
||||
m_arraySideBars[STREAM_DOCK] = new QDockWidget( tr( "Stream Information" ), this );
|
||||
m_arraySideBars[STREAM_DOCK]->setAllowedAreas( Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea );
|
||||
m_arraySideBars[STREAM_DOCK]->setWidget( m_pcStreamProperties );
|
||||
addDockWidget( Qt::RightDockWidgetArea, m_arraySideBars[STREAM_DOCK] );
|
||||
connect( m_arraySideBars[STREAM_DOCK], SIGNAL( visibilityChanged(bool) ), this, SLOT( updateStreamProperties() ) );
|
||||
|
||||
m_pcFrameProperties = new FramePropertiesSideBar( this, &m_bIsPlaying );
|
||||
m_arraySideBars[FRAME_DOCK] = new QDockWidget( tr( "Frame Information" ), this );
|
||||
m_arraySideBars[FRAME_DOCK]->setAllowedAreas( Qt::LeftDockWidgetArea | Qt::RightDockWidgetArea );
|
||||
m_arraySideBars[FRAME_DOCK]->setWidget( m_pcFrameProperties );
|
||||
addDockWidget( Qt::RightDockWidgetArea, m_arraySideBars[FRAME_DOCK] );
|
||||
connect( m_arraySideBars[FRAME_DOCK], SIGNAL( visibilityChanged(bool) ), this, SLOT( updateStreamProperties() ) );
|
||||
|
||||
QMainWindow::tabifyDockWidget( m_arraySideBars[FRAME_DOCK], m_arraySideBars[STREAM_DOCK] );
|
||||
//QMainWindow::setTabPosition(Qt::RightDockWidgetArea, QTabWidget::North);
|
||||
|
||||
addDockWidget( Qt::RightDockWidgetArea, m_appModuleQuality->createDock() );
|
||||
addDockWidget( Qt::RightDockWidgetArea, m_appModuleVideo->createDock() );
|
||||
addDockWidget( Qt::RightDockWidgetArea, m_appModuleQuality->createDock() );
|
||||
}
|
||||
|
||||
Void plaYUVerApp::createStatusBar()
|
||||
{
|
||||
m_appModuleVideo->createStatusBarMessage();
|
||||
//statusBar()->addPermanentWidget( m_appModuleVideo->createStatusBarMessage() );
|
||||
statusBar()->showMessage( tr( "Ready" ) );
|
||||
}
|
||||
|
||||
@@ -1405,40 +990,43 @@ Void plaYUVerApp::updateRecentFileActions()
|
||||
|
||||
Void plaYUVerApp::readSettings()
|
||||
{
|
||||
Settings settings;
|
||||
QPoint pos = settings.mainWindowPos();
|
||||
QSize size = settings.mainWindowSize();
|
||||
QSettings appSettings;
|
||||
|
||||
QPoint pos = appSettings.value( "MainWindow/Position", QPoint( 200, 200 ) ).toPoint();
|
||||
QSize size = appSettings.value( "MainWindow/Size", QSize( 500, 400 ) ).toSize();
|
||||
move( pos );
|
||||
resize( size );
|
||||
m_cLastOpenPath = settings.lastOpenPath();
|
||||
m_appTool = ( ViewArea::eTool )settings.getSelectedTool();
|
||||
setTool( m_appTool );
|
||||
m_arrayActions[VIDEO_LOOP_ACT]->setChecked( settings.getRepeat() );
|
||||
|
||||
m_aRecentFileStreamInfo = settings.getRecentFileList();
|
||||
m_cLastOpenPath = appSettings.value( "MainWindow/LastOpenPath", QDir::homePath() ).toString();
|
||||
|
||||
m_appTool = ( ViewArea::eTool )appSettings.value( "MainWindow/SelectedTool", ViewArea::NavigationTool ).toInt();
|
||||
setTool( m_appTool );
|
||||
|
||||
QVariant value = appSettings.value( "MainWindow/RecentFileList" );
|
||||
m_aRecentFileStreamInfo = value.value<PlaYUVerStreamInfoVector>();
|
||||
updateRecentFileActions();
|
||||
|
||||
Bool visibleStreamProp, visibleFrameProp, visibleQualityMeasure;
|
||||
settings.getDockVisibility( visibleStreamProp, visibleFrameProp, visibleQualityMeasure );
|
||||
if( !visibleStreamProp )
|
||||
m_arraySideBars[STREAM_DOCK]->close();
|
||||
if( !visibleFrameProp )
|
||||
m_arraySideBars[FRAME_DOCK]->close();
|
||||
if( !visibleQualityMeasure )
|
||||
m_arraySideBars[QUALITY_DOCK]->close();
|
||||
|
||||
m_appModuleVideo->readSettings();
|
||||
m_appModuleQuality->readSettings();
|
||||
m_appModuleExtensions->readSettings();
|
||||
}
|
||||
|
||||
Void plaYUVerApp::writeSettings()
|
||||
{
|
||||
Settings settings;
|
||||
settings.setMainWindowPos( pos() );
|
||||
settings.setMainWindowSize( size() );
|
||||
settings.setLastOpenPath( m_cLastOpenPath );
|
||||
settings.setSelectedTool( ( Int )m_appTool );
|
||||
settings.setRecentFileList( m_aRecentFileStreamInfo );
|
||||
settings.setDockVisibility( m_pcStreamProperties->isVisible(), m_pcFrameProperties->isVisible(), true );
|
||||
settings.setPlayingSettings( m_arrayActions[VIDEO_LOOP_ACT]->isChecked() );
|
||||
QSettings appSettings;
|
||||
|
||||
appSettings.setValue( "MainWindow/Position", pos() );
|
||||
appSettings.setValue( "MainWindow/Size", size() );
|
||||
appSettings.setValue( "MainWindow/LastOpenPath", m_cLastOpenPath );
|
||||
appSettings.setValue( "MainWindow/SelectedTool", ( Int )m_appTool );
|
||||
|
||||
QVariant var;
|
||||
var.setValue<PlaYUVerStreamInfoVector>( m_aRecentFileStreamInfo );
|
||||
appSettings.setValue( "MainWindow/RecentFileList", var );
|
||||
|
||||
m_appModuleVideo->writeSettings();
|
||||
m_appModuleQuality->writeSettings();
|
||||
m_appModuleExtensions->writeSettings();
|
||||
}
|
||||
|
||||
} // NAMESPACE
|
||||
Reference in new issue
Block a user