Commit 8be771a5 authored by Hugo Beauzee-Luyssen's avatar Hugo Beauzee-Luyssen
Browse files

Changed project default name

parent 4e571068
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include "SettingsManager.h" #include "SettingsManager.h"
#include "ProjectSettingsDefault.h" #include "ProjectSettingsDefault.h"
#include "ProjectManager.h"
void ProjectSettingsDefault::load( const QString& part ) void ProjectSettingsDefault::load( const QString& part )
{ {
...@@ -66,9 +67,7 @@ void ProjectSettingsDefault::loadVideoDefaults( const QString& part ) ...@@ -66,9 +67,7 @@ void ProjectSettingsDefault::loadVideoDefaults( const QString& part )
void ProjectSettingsDefault::loadProjectDefaults( const QString& part ) void ProjectSettingsDefault::loadProjectDefaults( const QString& part )
{ {
SettingsManager* setMan = SettingsManager::getInstance(); SettingsManager* setMan = SettingsManager::getInstance();
QVariant defaultName = "project"; setMan->setValue( part, "ProjectName", ProjectManager::unNamedProject );
setMan->setValue( part, "ProjectName", defaultName );
return ; return ;
} }
......
...@@ -30,6 +30,8 @@ ...@@ -30,6 +30,8 @@
#include "MainWorkflow.h" #include "MainWorkflow.h"
#include "SettingsManager.h" #include "SettingsManager.h"
const QString ProjectManager::unNamedProject = tr( "<Unnamed project>" );
ProjectManager::ProjectManager() : m_projectFile( NULL ), m_needSave( false ) ProjectManager::ProjectManager() : m_projectFile( NULL ), m_needSave( false )
{ {
QSettings s; QSettings s;
...@@ -83,7 +85,7 @@ void ProjectManager::loadTimeline() ...@@ -83,7 +85,7 @@ void ProjectManager::loadTimeline()
void ProjectManager::parseProjectNode( const QDomElement &node ) void ProjectManager::parseProjectNode( const QDomElement &node )
{ {
QDomElement projectNameNode = node.firstChildElement( "ProjectName" ); QDomElement projectNameNode = node.firstChildElement( "ProjectName" );
m_projectName = projectNameNode.attribute( "value", tr( "<Unnamed project>" ) ); m_projectName = projectNameNode.attribute( "value", ProjectManager::unNamedProject );
} }
void ProjectManager::loadProject( const QString& fileName ) void ProjectManager::loadProject( const QString& fileName )
......
...@@ -35,6 +35,8 @@ class ProjectManager : public QObject, public Singleton<ProjectManager> ...@@ -35,6 +35,8 @@ class ProjectManager : public QObject, public Singleton<ProjectManager>
Q_OBJECT Q_OBJECT
Q_DISABLE_COPY( ProjectManager ); Q_DISABLE_COPY( ProjectManager );
public: public:
static const QString unNamedProject;
void loadProject( const QString& fileName ); void loadProject( const QString& fileName );
void newProject( const QString& projectName ); void newProject( const QString& projectName );
QString loadProjectFile(); QString loadProjectFile();
......
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