Commit 9ed26624 authored by Hugo Beauzée-Luyssen's avatar Hugo Beauzée-Luyssen

Fix usage of flags

parent d9cffbec
......@@ -58,12 +58,12 @@ ProjectManager::ProjectManager() : m_projectFile( NULL ), m_needSave( false )
SettingValue *width = VLMC_CREATE_PROJECT_VAR( SettingValue::Int, "video/VideoProjectWidth", 480,
QT_TRANSLATE_NOOP( "PreferenceWidget", "Video width" ),
QT_TRANSLATE_NOOP( "PreferenceWidget", "Width resolution of the output video" ),
SettingValue::Flags( SettingValue::Clamped | SettingValue::EightMultiple ) );
SettingValue::Clamped | SettingValue::EightMultiple );
width->setLimits( 32, 2048 );
SettingValue *height = VLMC_CREATE_PROJECT_VAR( SettingValue::Int, "video/VideoProjectHeight", 320,
QT_TRANSLATE_NOOP( "PreferenceWidget", "Video height" ),
QT_TRANSLATE_NOOP( "PreferenceWidget", "Height resolution of the output video" ),
SettingValue::Flag( SettingValue::Clamped | SettingValue::EightMultiple ) );
SettingValue::Clamped | SettingValue::EightMultiple );
height->setLimits( 32, 2048 );
VLMC_CREATE_PROJECT_STRING( "video/AspectRatio", "16/9",
QT_TRANSLATE_NOOP("PreferenceWidget", "Video aspect ratio" ),
......@@ -71,17 +71,17 @@ ProjectManager::ProjectManager() : m_projectFile( NULL ), m_needSave( false )
SettingValue *sampleRate = VLMC_CREATE_PROJECT_VAR( SettingValue::Double, "audio/AudioSampleRate", 44100,
QT_TRANSLATE_NOOP( "PreferenceWidget", "Audio samplerate" ),
QT_TRANSLATE_NOOP( "PreferenceWidget", "Output project audio samplerate" ),
SettingValue::Flag( SettingValue::Clamped ) );
SettingValue::Clamped );
sampleRate->setLimits( 11025, 48000 );
SettingValue *audioChannel = VLMC_CREATE_PROJECT_VAR( SettingValue::Int, "audio/NbChannels", 2,
QT_TRANSLATE_NOOP("PreferenceWidget", "Audio channels" ),
QT_TRANSLATE_NOOP("PreferenceWidget", "Number of audio channels" ),
SettingValue::Flag( SettingValue::Clamped ) );
SettingValue::Clamped );
audioChannel->setLimits( 2, 2 );
VLMC_CREATE_PROJECT_VAR( SettingValue::String, "general/ProjectName", unNamedProject,
QT_TRANSLATE_NOOP( "PreferenceWidget", "Project name" ),
QT_TRANSLATE_NOOP( "PreferenceWidget", "The project name" ),
SettingValue::Flag( SettingValue::NotEmpty ) );
SettingValue::NotEmpty );
VLMC_CREATE_PRIVATE_PROJECT_STRING( "general/Workspace", "" );
......
......@@ -251,7 +251,7 @@ SettingValue*
SettingsManager::createVar( SettingValue::Type type, const QString &key,
const QVariant &defaultValue, const char *name,
const char *desc, SettingsManager::Type varType /*= Vlmc*/,
QFlags<SettingValue::Flag> flags /*= SettingValue::Nothing*/ )
SettingValue::Flags flags /*= SettingValue::Nothing*/ )
{
QWriteLocker wlock( &m_rwLock );
......
......@@ -71,7 +71,7 @@ SettingsManager::getInstance()->createVar( type, key, defaultValue, name, \
SettingsManager::getInstance()->createVar( type, key, defaultValue, name, \
desc, SettingsManager::Vlmc, flags );
/// Vlmc preferences maccros
/// Vlmc preferences macros
#define VLMC_CREATE_PREFERENCE_INT( key, defaultValue, name, desc ) \
VLMC_CREATE_PREFERENCE( SettingValue::Int, key, defaultValue, name, desc, SettingValue::Nothing )
#define VLMC_CREATE_PREFERENCE_STRING( key, defaultValue, name, desc ) \
......@@ -87,7 +87,7 @@ SettingsManager::getInstance()->createVar( type, key, defaultValue, name, \
#define VLMC_CREATE_PREFERENCE_PATH( key, defaultValue, name, desc ) \
VLMC_CREATE_PREFERENCE( SettingValue::Path, key, defaultValue, name, desc, SettingValue::Nothing )
//Convenience maccros :
/// Convenience macros :
#define VLMC_CREATE_PRIVATE_PREFERENCE_STRING( key, defaultValue ) \
VLMC_CREATE_PREFERENCE( SettingValue::String, key, defaultValue, "", "", SettingValue::Private )
#define VLMC_CREATE_PRIVATE_PREFERENCE_INT( key, defaultValue ) \
......@@ -131,7 +131,7 @@ class SettingsManager : public QObject, public Singleton<SettingsManager>
const QVariant &defaultValue,
const char *name, const char *desc,
Type varType = Vlmc,
QFlags<SettingValue::Flag> flags = SettingValue::Nothing );
SettingValue::Flags flags = SettingValue::Nothing );
bool watchValue( const QString &key,
QObject* receiver,
const char *method,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment