Merge master into dev_DialogWindowSelector
This commit is contained in:
1 parent
6fc7001fa3
commit
1fe638a17f
4 files changed
+50
-15
No files matched your search
@@ -38,7 +38,7 @@ QPoint PlaYUVerSettings::mainWindowPos()
|
||||
return m_settings.value( "MainWindow/pos", QPoint( 200, 200 ) ).toPoint();
|
||||
}
|
||||
|
||||
void PlaYUVerSettings::setMainWindowPos( const QPoint & pos )
|
||||
Void PlaYUVerSettings::setMainWindowPos( const QPoint & pos )
|
||||
{
|
||||
m_settings.setValue( "MainWindow/pos", pos );
|
||||
}
|
||||
@@ -48,7 +48,7 @@ QSize PlaYUVerSettings::mainWindowSize()
|
||||
return m_settings.value( "MainWindow/size", QSize( 500, 400 ) ).toSize();
|
||||
}
|
||||
|
||||
void PlaYUVerSettings::setMainWindowSize( const QSize & size )
|
||||
Void PlaYUVerSettings::setMainWindowSize( const QSize & size )
|
||||
{
|
||||
m_settings.setValue( "MainWindow/size", size );
|
||||
}
|
||||
@@ -58,11 +58,27 @@ QString PlaYUVerSettings::lastOpenPath()
|
||||
return m_settings.value( "MainWindow/lastOpenPath", QDir::homePath() ).toString();
|
||||
}
|
||||
|
||||
void PlaYUVerSettings::setLastOpenPath( const QString & path )
|
||||
Void PlaYUVerSettings::setLastOpenPath( const QString & path )
|
||||
{
|
||||
m_settings.setValue( "MainWindow/lastOpenPath", path );
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - PLaying Settings - - - - - - - - - - - - - - - -
|
||||
|
||||
Bool PlaYUVerSettings::getRepeat()
|
||||
{
|
||||
return m_settings.value( "PLaying/Repeat", false ).toBool();
|
||||
}
|
||||
Bool PlaYUVerSettings::getVideoLock()
|
||||
{
|
||||
return m_settings.value( "PLaying/VideoLock", false ).toBool();
|
||||
}
|
||||
Void PlaYUVerSettings::setPlayingSettings( Bool repeat, Bool lock )
|
||||
{
|
||||
m_settings.setValue( "PLaying/Repeat", repeat );
|
||||
m_settings.setValue( "PLaying/VideoLock", lock );
|
||||
}
|
||||
|
||||
// - - - - - - - - - - - - - - Grid Settings - - - - - - - - - - - - - - - - - -
|
||||
|
||||
GridManager::Style PlaYUVerSettings::gridStyle()
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
#include "config.h"
|
||||
|
||||
#include <QtCore>
|
||||
|
||||
#include "TypeDef.h"
|
||||
#include "GridManager.h"
|
||||
|
||||
namespace plaYUVer
|
||||
@@ -42,26 +42,30 @@ public:
|
||||
|
||||
// - - - - - - - - - - Main Window Settings - - - - - - - - - - - - -
|
||||
QPoint mainWindowPos();
|
||||
void setMainWindowPos( const QPoint &v );
|
||||
Void setMainWindowPos( const QPoint &v );
|
||||
|
||||
QSize mainWindowSize();
|
||||
void setMainWindowSize( const QSize &v );
|
||||
Void setMainWindowSize( const QSize &v );
|
||||
|
||||
QString lastOpenPath();
|
||||
void setLastOpenPath( const QString &v );
|
||||
Void setLastOpenPath( const QString &v );
|
||||
|
||||
Bool getRepeat();
|
||||
Bool getVideoLock();
|
||||
Void setPlayingSettings( Bool repeat, Bool lock );
|
||||
|
||||
// - - - - - - - - - - - - Grid Settings - - - - - - - - - - - - - - -
|
||||
GridManager::Style gridStyle();
|
||||
void setGridStyle( GridManager::Style v );
|
||||
Void setGridStyle( GridManager::Style v );
|
||||
|
||||
QColor gridColor();
|
||||
void setGridColor( const QColor &v );
|
||||
Void setGridColor( const QColor &v );
|
||||
|
||||
int gridHSpacing();
|
||||
void setGridHSpacing( int v );
|
||||
Int gridHSpacing();
|
||||
Void setGridHSpacing( int v );
|
||||
|
||||
int gridVSpacing();
|
||||
void setGridVSpacing( int v );
|
||||
Int gridVSpacing();
|
||||
Void setGridVSpacing( int v );
|
||||
|
||||
private:
|
||||
QSettings m_settings;
|
||||
|
||||
@@ -297,6 +297,18 @@ void plaYUVerApp::updatePropertiesSelectedArea( QRect area )
|
||||
|
||||
// ----------------------- Playing Functions --------------------
|
||||
|
||||
UInt plaYUVerApp::getMaxFrameNumber()
|
||||
{
|
||||
UInt currFrames;
|
||||
UInt maxFrames = INT_MAX;
|
||||
for( Int i = 0; i < m_acPlayingSubWindows.size(); i++ )
|
||||
{
|
||||
currFrames = m_acPlayingSubWindows.at( i )->getInputStream()->getFrameNum();
|
||||
if( currFrames < maxFrames )
|
||||
maxFrames = currFrames;
|
||||
}
|
||||
return maxFrames;
|
||||
}
|
||||
Void plaYUVerApp::setTimerStatus()
|
||||
{
|
||||
Bool status = false;
|
||||
@@ -352,7 +364,7 @@ void plaYUVerApp::play()
|
||||
m_acPlayingSubWindows.append( m_pcCurrentSubWindow );
|
||||
m_pcCurrentSubWindow->seekAbsoluteEvent( m_acPlayingSubWindows.at( 0 )->getInputStream()->getCurrFrameNum() );
|
||||
m_pcCurrentSubWindow->play();
|
||||
m_pcFrameSlider->setMaximum( qMin( m_pcFrameSlider->maximum(), ( Int )m_pcCurrentSubWindow->getInputStream()->getFrameNum() - 1 ) );
|
||||
m_pcFrameSlider->setMaximum( getMaxFrameNumber() - 1 );
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -575,7 +587,6 @@ Void plaYUVerApp::zoomToFitAll()
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
void plaYUVerApp::scaleFrame( int ratio )
|
||||
{
|
||||
if( activeSubWindow() )
|
||||
@@ -1104,6 +1115,8 @@ Void plaYUVerApp::readSettings()
|
||||
move( pos );
|
||||
resize( size );
|
||||
m_cLastOpenPath = settings.lastOpenPath();
|
||||
m_arrayActions[VIDEO_LOOP_ACT]->setChecked( settings.getRepeat() );
|
||||
m_arrayActions[VIDEO_LOCK_ACT]->setChecked( settings.getVideoLock() );
|
||||
}
|
||||
|
||||
Void plaYUVerApp::writeSettings()
|
||||
@@ -1112,6 +1125,7 @@ Void plaYUVerApp::writeSettings()
|
||||
settings.setMainWindowPos( pos() );
|
||||
settings.setMainWindowSize( size() );
|
||||
settings.setLastOpenPath( m_cLastOpenPath );
|
||||
settings.setPlayingSettings( m_arrayActions[VIDEO_LOOP_ACT]->isChecked(), m_arrayActions[VIDEO_LOCK_ACT]->isChecked() );
|
||||
}
|
||||
|
||||
} // NAMESPACE
|
||||
@@ -122,6 +122,7 @@ private:
|
||||
Void zoomToFitAll();
|
||||
|
||||
//! Playing functions
|
||||
UInt getMaxFrameNumber();
|
||||
Void startPlay();
|
||||
Void setTimerStatus();
|
||||
Void updateCurrFrameNum();
|
||||
|
||||
Reference in new issue
Block a user