Add repeat and video lock to settings

This commit is contained in:
jfmcarreira committed 2014-05-09 05:28:27 +01:00
1 parent 681e8c0d6b
commit b96bf37227
3 files changed
+36 -13

No files matched your search

+19 -3
View File
@@ -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()
+14 -10
View File
@@ -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;
+3
View File
@@ -1073,6 +1073,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()
@@ -1081,6 +1083,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