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

Project class is now part of Core, and is no longer a singleton

parent 5c33d274
......@@ -25,6 +25,7 @@
#include "Commands.h"
#include "Project/Project.h"
#include "Main/Core.h"
#include "Media/Clip.h"
#include "Workflow/ClipHelper.h"
#include "EffectsEngine/EffectHelper.h"
......@@ -34,7 +35,7 @@
void
Commands::trigger( QUndoCommand* command )
{
Project::getInstance()->undoStack()->push( command );
Core::getInstance()->currentProject()->undoStack()->push( command );
}
Commands::Generic::Generic() :
......@@ -42,7 +43,7 @@ Commands::Generic::Generic() :
{
//This is connected using a direct connection to ensure the view can be refreshed
//just after the signal has been emited.
connect( Project::getInstance()->undoStack(), SIGNAL( retranslateRequired() ),
connect( Core::getInstance()->currentProject()->undoStack(), SIGNAL( retranslateRequired() ),
this, SLOT( retranslate() ), Qt::DirectConnection );
}
......
......@@ -22,6 +22,7 @@
#include "EffectsEngine/EffectHelper.h"
#include "EffectsEngine/EffectUser.h"
#include "Main/Core.h"
#include "Project/Project.h"
#include "Workflow/MainWorkflow.h"
......@@ -31,8 +32,8 @@ EffectHelper::EffectHelper( EffectInstance *effectInstance, qint64 begin, qint64
m_effectInstance( effectInstance ),
m_target( NULL )
{
if ( Project::getInstance()->workflow()->getLengthFrame() > 0 )
m_end = Project::getInstance()->workflow()->getLengthFrame();
if ( Core::getInstance()->currentProject()->workflow()->getLengthFrame() > 0 )
m_end = Core::getInstance()->currentProject()->workflow()->getLengthFrame();
else
m_end = Effect::TrackEffectDefaultLength;
}
......
......@@ -318,13 +318,13 @@ MainWindow::initVlmcPreferences()
void
MainWindow::on_actionSave_triggered()
{
Project::getInstance()->save();
Core::getInstance()->currentProject()->save();
}
void
MainWindow::on_actionSave_As_triggered()
{
Project::getInstance()->saveAs();
Core::getInstance()->currentProject()->saveAs();
}
void
......@@ -335,7 +335,7 @@ MainWindow::on_actionLoad_Project_triggered()
"", tr( "VLMC project file(*.vlmc)" ) );
if ( fileName.isEmpty() == true )
return ;
Project::load( fileName );
Core::getInstance()->loadProject( fileName );
}
void
......@@ -517,7 +517,7 @@ void
MainWindow::createProjectPreferences()
{
delete m_projectPreferences;
m_projectPreferences = new SettingsDialog( Project::getInstance()->settings(), tr( "Project preferences" ), this );
m_projectPreferences = new SettingsDialog( Core::getInstance()->currentProject()->settings(), tr( "Project preferences" ), this );
m_projectPreferences->addCategory( "general", QT_TRANSLATE_NOOP( "Settings", "General" ), QIcon( ":/images/vlmc" ) );
m_projectPreferences->addCategory( "video", QT_TRANSLATE_NOOP( "Settings", "Video" ), QIcon( ":/images/video" ) );
m_projectPreferences->addCategory( "audio", QT_TRANSLATE_NOOP( "Settings", "Audio" ), QIcon( ":/images/audio" ) );
......@@ -567,7 +567,7 @@ MainWindow::on_actionAbout_triggered()
bool
MainWindow::checkVideoLength()
{
if ( Project::getInstance()->workflow()->getLengthFrame() <= 0 )
if ( Core::getInstance()->currentProject()->workflow()->getLengthFrame() <= 0 )
{
QMessageBox::warning( NULL, tr ( "VLMC Renderer" ), tr( "There is nothing to render." ) );
return false;
......@@ -580,7 +580,7 @@ MainWindow::renderVideo( const QString& outputFileName, quint32 width, quint32 h
{
if ( m_fileRenderer )
delete m_fileRenderer;
m_fileRenderer = new WorkflowFileRenderer( m_backend, Project::getInstance()->workflow() );
m_fileRenderer = new WorkflowFileRenderer( m_backend, Core::getInstance()->currentProject()->workflow() );
WorkflowFileRendererDialog *dialog = new WorkflowFileRendererDialog( m_fileRenderer, width, height );
dialog->setModal( true );
......@@ -601,7 +601,7 @@ MainWindow::renderVideo( const QString& outputFileName, quint32 width, quint32 h
bool
MainWindow::renderVideoSettings( bool shareOnInternet )
{
Project::getInstance()->workflowRenderer()->stop();
Core::getInstance()->currentProject()->workflowRenderer()->stop();
RendererSettings *settings = new RendererSettings( shareOnInternet );
......@@ -736,7 +736,7 @@ MainWindow::saveSettings()
settings->setValue( "private/MainWindowState", saveState() );
settings->setValue( "private/CleanQuit", true );
settings->save();
Project::getInstance()->save();
Core::getInstance()->currentProject()->save();
return true;
}
......@@ -772,13 +772,13 @@ MainWindow::cleanStateChanged( bool isClean )
void
MainWindow::on_actionUndo_triggered()
{
Project::getInstance()->undoStack()->undo();
Core::getInstance()->currentProject()->undoStack()->undo();
}
void
MainWindow::on_actionRedo_triggered()
{
Project::getInstance()->undoStack()->redo();
Core::getInstance()->currentProject()->undoStack()->redo();
}
void
......@@ -803,7 +803,7 @@ MainWindow::restoreSession()
QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes );
if ( res == QMessageBox::Yes )
{
if ( Project::getInstance()->loadEmergencyBackup() == true )
if ( Core::getInstance()->restoreProject() == true )
ret = true;
else
QMessageBox::warning( this, tr( "Can't restore project" ), tr( "VLMC didn't manage to restore your project. We apology for the inconvenience" ) );
......
......@@ -101,7 +101,7 @@ private:
/**
* \brief Will check if there is any video on the Project Timeline.
* \return true, if ( Project::getInstance()->workflow()->getLengthFrame() > 0 )
* \return true, if ( Core::getInstance()->currentProject()->workflow()->getLengthFrame() > 0 )
* else false
*/
bool checkVideoLength();
......
......@@ -23,6 +23,7 @@
#include "WorkflowFileRendererDialog.h"
#include "Main/Core.h"
#include "Project/Project.h"
#include "vlmc.h"
#include "Workflow/MainWorkflow.h"
......@@ -68,7 +69,7 @@ WorkflowFileRendererDialog::updatePreview( const uchar* buff )
void
WorkflowFileRendererDialog::frameChanged( qint64 frame )
{
qint64 totalFrames = Project::getInstance()->workflow()->getLengthFrame();
qint64 totalFrames = Core::getInstance()->currentProject()->workflow()->getLengthFrame();
if ( frame <= totalFrames )
{
......
......@@ -157,7 +157,7 @@ void
ImportController::importMedia( const QString &filePath )
{
vlmcDebug() << "Importing" << filePath;
if ( Project::getInstance()->library()->mediaAlreadyLoaded( filePath ) == true ||
if ( Core::getInstance()->currentProject()->library()->mediaAlreadyLoaded( filePath ) == true ||
m_temporaryMedias->mediaAlreadyLoaded( filePath ) == true )
return ;
......@@ -242,7 +242,7 @@ ImportController::accept()
{
if ( clip->getMedia()->source()->length() == 0 )
invalidMedias = true;
Project::getInstance()->library()->addClip( clip );
Core::getInstance()->currentProject()->library()->addClip( clip );
}
if ( invalidMedias == true )
handleInvalidMedias();
......
......@@ -230,7 +230,7 @@ MediaCellView::mouseMoveEvent( QMouseEvent* event )
void
MediaCellView::deleteButtonClicked( QWidget*, QMouseEvent* )
{
if ( Project::getInstance()->workflow()->contains( m_clip->uuid() ) == true )
if ( Core::getInstance()->currentProject()->workflow()->contains( m_clip->uuid() ) == true )
{
QMessageBox msgBox;
msgBox.setText( tr( "This clip or some of its children are contained in the timeline." ) );
......
......@@ -25,6 +25,7 @@
#include "Project/Project.h"
#include "Media/Clip.h"
#include "Library/Library.h"
#include "Main/Core.h"
#include "Media/Media.h"
#include "MediaCellView.h"
#include "MediaListView.h"
......@@ -166,7 +167,7 @@ MediaLibrary::dropEvent( QDropEvent *event )
return;
}
Q_ASSERT( Project::getInstance()->library() != NULL );
Q_ASSERT( Core::getInstance()->currentProject()->library() != NULL );
foreach ( const QUrl &url, fileList )
{
......@@ -175,13 +176,13 @@ MediaLibrary::dropEvent( QDropEvent *event )
if ( fileName.isEmpty() )
continue;
Media *media = Project::getInstance()->library()->addMedia( fileName );
Media *media = Core::getInstance()->currentProject()->library()->addMedia( fileName );
if ( media != NULL )
{
Clip* clip = new Clip( media );
media->setBaseClip( clip );
Project::getInstance()->library()->addClip( clip );
Core::getInstance()->currentProject()->library()->addClip( clip );
event->accept();
}
else
......
......@@ -22,6 +22,7 @@
#include <QList>
#include "Main/Core.h"
#include "Project/Project.h"
#include "TracksView.h"
#include "GraphicsTrack.h"
......@@ -35,7 +36,7 @@ GraphicsTrack::GraphicsTrack( Workflow::TrackType type, quint32 trackNumber,
m_type = type;
m_trackNumber = trackNumber;
m_enabled = true;
m_trackWorkflow = Project::getInstance()->workflow()->track( type, trackNumber );
m_trackWorkflow = Core::getInstance()->currentProject()->workflow()->track( type, trackNumber );
setSizePolicy( QSizePolicy::Expanding, QSizePolicy::Fixed );
setContentsMargins( 0, 0, 0, 0 );
......@@ -64,9 +65,9 @@ GraphicsTrack::setTrackEnabled( bool enabled )
m_enabled = enabled;
if( enabled )
Project::getInstance()->workflow()->unmuteTrack( m_trackNumber, m_type );
Core::getInstance()->currentProject()->workflow()->unmuteTrack( m_trackNumber, m_type );
else
Project::getInstance()->workflow()->muteTrack( m_trackNumber, m_type );
Core::getInstance()->currentProject()->workflow()->muteTrack( m_trackNumber, m_type );
}
bool
......
......@@ -105,7 +105,7 @@ TracksScene::askRemoveSelectedItems()
}
}
Project::getInstance()->undoStack()->beginMacro( "Remove clip(s)" );
Core::getInstance()->currentProject()->undoStack()->beginMacro( "Remove clip(s)" );
QList<QGraphicsItem*> items = selectedItems();
for (int i = 0; i < items.size(); ++i )
......@@ -132,5 +132,5 @@ TracksScene::askRemoveSelectedItems()
}
}
Project::getInstance()->undoStack()->endMacro();
Core::getInstance()->currentProject()->undoStack()->endMacro();
}
......@@ -375,7 +375,7 @@ void
TracksView::clipDragEnterEvent( QDragEnterEvent *event )
{
const QString fullId = QString( event->mimeData()->data( "vlmc/uuid" ) );
Clip *clip = Project::getInstance()->library()->clip( fullId );
Clip *clip = Core::getInstance()->currentProject()->library()->clip( fullId );
if ( clip == NULL )
return;
bool hasVideo = clip->getMedia()->source()->hasVideo();
......@@ -799,7 +799,7 @@ TracksView::dropEvent( QDropEvent *event )
if ( m_dragAudioItem != NULL || m_dragVideoItem != NULL )
{
Project::getInstance()->undoStack()->beginMacro( "Add clip" );
Core::getInstance()->currentProject()->undoStack()->beginMacro( "Add clip" );
if ( m_dragAudioItem )
{
......@@ -835,7 +835,7 @@ TracksView::dropEvent( QDropEvent *event )
m_dragVideoItem = NULL;
}
Project::getInstance()->undoStack()->endMacro();
Core::getInstance()->currentProject()->undoStack()->endMacro();
m_lastKnownTrack = NULL;
}
......@@ -1183,7 +1183,7 @@ TracksView::mouseReleaseEvent( QMouseEvent *event )
}
}
else
Project::getInstance()->undoStack()->beginMacro( "Move clip" );
Core::getInstance()->currentProject()->undoStack()->beginMacro( "Move clip" );
m_actionItem->triggerMove( target, targetPos );
// Update the linked item too
if ( m_actionItem->groupItem() )
......@@ -1194,7 +1194,7 @@ TracksView::mouseReleaseEvent( QMouseEvent *event )
}
if ( effectItem == NULL )
Project::getInstance()->undoStack()->endMacro();
Core::getInstance()->currentProject()->undoStack()->endMacro();
m_actionItem->m_oldTrack = m_actionItem->track()->trackWorkflow();
m_actionRelativeX = -1;
......
......@@ -20,6 +20,7 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include "Main/Core.h"
#include "OpenPage.h"
#include "project/GuiProjectManager.h"
#include "ProjectWizard.h"
......@@ -54,7 +55,7 @@ bool
OpenPage::validatePage()
{
if ( WelcomePage::projectPath().isEmpty() == false )
return Project::load( WelcomePage::projectPath() );
return Core::getInstance()->loadProject( WelcomePage::projectPath() );
return false;
}
......
......@@ -101,8 +101,8 @@ ProjectWizard::accept()
{
Settings* preferences = Core::getInstance()->settings();
Project::create( field( "projectName" ).toString(), field( "projectPath" ).toString() );
Settings* projectPreferences = Project::getInstance()->settings();
Core::getInstance()->newProject( field( "projectName" ).toString(), field( "projectPath" ).toString() );
Settings* projectPreferences = Core::getInstance()->currentProject()->settings();
preferences->setValue( "vlmc/DefaultProjectLocation", field( "workspace" ) );
......@@ -119,7 +119,7 @@ ProjectWizard::accept()
void
ProjectWizard::reject()
{
if ( Project::isProjectLoaded() )
if ( Core::getInstance()->isProjectLoaded() == true )
return QWizard::reject();
qApp->quit();
}
......@@ -40,6 +40,7 @@
#include "Project/Workspace.h"
Core::Core()
: m_currentProject( NULL )
{
m_backend = Backend::getBackend();
m_effectsEngine = new EffectsEngine;
......@@ -60,6 +61,7 @@ Core::Core()
Core::~Core()
{
delete m_currentProject;
delete m_workspace;
delete m_automaticBackup;
delete m_settings;
......@@ -98,13 +100,49 @@ Core::automaticBackup()
return m_automaticBackup;
}
void
Core::onProjectLoaded( Project* project )
bool
Core::loadProject(const QString& fileName)
{
m_automaticBackup->setProject( project );
m_recentProjects->setProject( project );
if ( fileName.isEmpty() == true )
return false;
QFile* projectFile = new QFile( fileName );
if ( projectFile->exists() == false )
return false;
//FIXME: What if the project was unsaved, and the user wants to cancel the operation?
delete m_currentProject;
//FIXME: Doesn't check for proper project loading
m_currentProject = new Project( projectFile );
m_automaticBackup->setProject( m_currentProject );
m_recentProjects->setProject( m_currentProject );
emit projectLoading( m_currentProject );
return true;
}
bool Core::newProject(const QString& projectName, const QString& projectPath)
{
delete m_currentProject;
//FIXME: Doesn't check for proper project creation
m_currentProject = new Project( projectName, projectPath );
return true;
}
emit projectLoading( project );
bool
Core::restoreProject()
{
//FIXME: This doesn't make sense when no GUI is attached, so I'm not sure it fits in the Core class.
Q_ASSERT( m_currentProject == NULL );
QFile* backupFile = Project::emergencyBackupFile();
if ( backupFile == NULL )
return false;
//FIXME: This lacks error handling
m_currentProject = new Project( backupFile );
return true;
}
bool Core::isProjectLoaded()
{
return m_currentProject != NULL;
}
Settings*
......@@ -119,3 +157,8 @@ Core::workspace()
{
return m_workspace;
}
Project* Core::currentProject()
{
return m_currentProject;
}
......@@ -53,8 +53,12 @@ class Core : public QObject, public Singleton<Core>
RecentProjects* recentProjects();
AutomaticBackup* automaticBackup();
Workspace* workspace();
Project* currentProject();
void onProjectLoaded( Project* project );
bool loadProject( const QString& fileName );
bool newProject( const QString& projectName, const QString& projectPath );
bool restoreProject();
bool isProjectLoaded();
signals:
/**
......@@ -77,6 +81,7 @@ class Core : public QObject, public Singleton<Core>
RecentProjects* m_recentProjects;
AutomaticBackup* m_automaticBackup;
Workspace* m_workspace;
Project* m_currentProject;
friend class Singleton<Core>;
};
......
......@@ -96,7 +96,7 @@ VLMCGuimain( int argc, char **argv )
if ( argc > ( i + 1 ) && ( arg == "--project" || arg == "-p" ) )
{
Project::load( argv[i+1] );
Core::getInstance()->loadProject( argv[i+1] );
project = true;
break;
}
......@@ -183,7 +183,7 @@ VLMCCoremain( int argc, char **argv )
#ifndef WITH_GUI
ConsoleRenderer renderer;
ProjectManager *pm = Project::getInstance();
ProjectManager *pm = Core::getInstance()->currentProject();
QCoreApplication::connect( pm, SIGNAL( projectLoaded() ), &renderer, SLOT( startRender() ) );
pm->loadProject( app.arguments()[1] );
......
......@@ -22,6 +22,7 @@
#include "config.h"
#include "Main/Core.h"
#include "Workflow/Types.h"
#include "Tools/VlmcDebug.h"
#include "Project/Project.h"
......@@ -52,7 +53,7 @@ signalHandler( int sig )
{
signal( sig, SIG_DFL );
Project::getInstance()->emergencyBackup();
Core::getInstance()->currentProject()->emergencyBackup();
#ifdef WITH_CRASHHANDLER_GUI
CrashHandler* ch = new CrashHandler( sig );
......
......@@ -46,12 +46,15 @@
const QString Project::unNamedProject = Project::tr( "Untitled Project" );
const QString Project::backupSuffix = "~";
Project::Project()
: m_projectFile( NULL )
Project::Project( QFile* projectFile )
: m_projectFile( projectFile )
, m_isClean( true )
, m_libraryCleanState( true )
, m_projectManagerUi( NULL )
{
//FIXME: This will be invalidated by the loadProject() method if a backup file is found.
m_isClean = projectFile->fileName().endsWith( Project::backupSuffix ) == false;
m_settings = new Settings( QString() );
m_undoStack = new QUndoStack;
m_workflow = new MainWorkflow;
......@@ -59,10 +62,31 @@ Project::Project()
m_workflowRenderer = new WorkflowRenderer( Backend::getBackend(), m_workflow );
initSettings();
connectComponents();
loadProject();
}
Project::Project( const QString& projectName, const QString& projectPath )
: m_projectFile( NULL )
, m_projectName( projectName )
, m_isClean( false )
, m_libraryCleanState( false )
, m_projectManagerUi( NULL )
{
m_settings = new Settings( QString() );
m_undoStack = new QUndoStack;
m_workflow = new MainWorkflow;
m_library = new Library( Core::getInstance()->workspace() );
m_workflowRenderer = new WorkflowRenderer( Backend::getBackend(), m_workflow );
initSettings();
connectComponents();
m_projectFile = new QFile( projectPath + "/project.vlmc" );
save();
emit projectLoaded( projectName, m_projectFile->fileName() );
}
Project::~Project()
{
closeProject();
delete m_projectFile;
delete m_library;
delete m_workflow;
......@@ -103,53 +127,12 @@ Project::settings()
//////////////////////////////////////////////////////////////////////////////////////////
bool
Project::load( const QString& fileName )
{
Project* self = getInstance();
if ( fileName.isEmpty() == true )
return false;
QFile projectFile( fileName );
if ( projectFile.exists() == false )
return false;
if ( self->closeProject() == false )
return false;
Project::destroyInstance();
// Now let's start over with a clean state.
self = getInstance();
Core::getInstance()->onProjectLoaded( self );
self->loadProject( fileName );
return true;
}
bool
Project::create(const QString& projectName, const QString& projectPath )
Project::loadProject()
{
Project* self = getInstance();
if ( self->closeProject() == false )
return false;
Project::destroyInstance();
self = Project::getInstance();
self->newProject( projectName, projectPath );
Core::getInstance()->onProjectLoaded( self );
return true;
}
bool
Project::isProjectLoaded()
{
return m_instance != NULL;
}
Q_ASSERT( m_projectFile != NULL );
bool
Project::loadProject( const QString &fileName )
{
QString fileToLoad = checkBackupFile( fileName );
QString fileToLoad = checkBackupFile( m_projectFile->fileName() );
m_projectFile = new QFile( fileToLoad );
QDomDocument doc;
if ( m_projectFile->open( QFile::ReadOnly ) == false ||
......@@ -179,16 +162,6 @@ Project::loadProject( const QString &fileName )
return true;
}
void
Project::newProject( const QString &projectName, const QString& projectPath )
{
m_projectName = projectName;
//Current project file has already been delete/nulled by closeProject()
m_projectFile = new QFile( projectPath + "/project.vlmc" );
save();
emit projectLoaded( projectName, m_projectFile->fileName() );
}
void
Project::connectComponents()
{
......@@ -198,7 +171,7 @@ Project::connectComponents()
connect( this, SIGNAL( projectSaved() ), m_undoStack, SLOT( setClean() ) );
//We have to wait for the library to be loaded before loading the workflow
//FIXME
//connect( Project::getInstance()->library(), SIGNAL( projectLoaded() ), this, SLOT( loadWorkflow() ) );
//connect( Core::getInstance()->currentProject()->library(), SIGNAL( projectLoaded() ), this, SLOT( loadWorkflow() ) );
registerLoadSave( m_settings );
registerLoadSave( m_library );
registerLoadSave( m_workflow );
......@@ -208,12 +181,9 @@ Project::connectComponents()
bool
Project::closeProject()
{
/*
* This (project file being NULL) is only expected to happen when we load the first
* project from the wizard, or through the command line parameter
*/
if ( m_projectFile == NULL )
return true;
Q_ASSERT( m_projectFile != NULL );
//FIXME: This is now called from the destructor, so we can't stop the project closing.
if ( m_projectManagerUi != NULL )
{
IProjectUiCb::SaveMode mode = m_projectManagerUi->shouldSaveBeforeClose();
......@@ -226,7 +196,7 @@ Project::closeProject()
m_projectFile = NULL;
m_isClean = true;
m_projectName = QString();
Project::getInstance()->undoStack()->clear();
Core::getInstance()->currentProject()->undoStack()->clear();
emit projectUpdated( name() );
return true;
}
......@@ -369,17 +339,12 @@ Project::registerLoadSave( ILoadSave* loadSave )
return true;
}
bool
Project::loadEmergencyBackup()
QFile* Project::emergencyBackupFile()
{
const QString lastProject = Core::getInstance()->settings()->value( "private/EmergencyBackup" )->get().toString();
if ( QFile::exists( lastProject ) == true )
{
loadProject( lastProject );
m_isClean = false;
return true;
}
return false;
if ( lastProject.isEmpty() == true )
return NULL;
return new QFile( lastProject );
}
void
......
......@@ -28,7 +28,6 @@
#include <QObject>
#include "ILoadSave.h"
#include "Tools/Singleton.hpp"
class QDomDocument;
class QFile;
......@@ -44,7 +43,7 @@ class ProjectManager;
class Settings;
class WorkflowRenderer;
class Project : public QObject, public Singleton<Project>
class Project : public QObject
{
Q_OBJECT
public:
......@@ -52,21 +51,21 @@ class Project : public QObject, public Singleton<Project>
static const QString backupSuffix;
public:
// Main entry point for loading a project
static bool load( const QString& fileName );
static bool create(const QString& projectName, const QString& projectPath );
static bool isProjectLoaded();
Q_DISABLE_COPY( Project );
Project( QFile* projectFile );
Project( const QString& projectName, const QString& projectPath );
virtual ~Project();
void save();
void saveAs();
bool loadEmergencyBackup();
void emergencyBackup();
bool registerLoadSave( ILoadSave* loadSave );
private:
Q_DISABLE_COPY( Project );
Project();
~Project();
public:
static QFile* emergencyBackupFile();
private:
/**
* @brief Check for a project backup file, and load the appropriate file,
* according to the user input.
......@@ -75,7 +74,7 @@ class Project : public QObject, public Singleton<Project>
* if an outdated project backup is found, the used is asked if she wants to delete
* it.
*/
bool loadProject( const QString& fileName );
bool loadProject();
/**
* @brief connectComponents Connects project specific components' signals & slots
*/
......@@ -153,8 +152,6 @@ class Project : public QObject, public Singleton<Project>
QUndoStack* m_undoStack;
Settings* m_settings;
WorkflowRenderer* m_workflowRenderer;
friend class Singleton<Project>;
};
#endif // PROJECT_H
......@@ -50,15 +50,15 @@ class QDomElement;
#define VLMC_GET_STRINGLIST( key ) Core::getInstance()->settings()->value( key )->get().toStringList()
#define VLMC_GET_BYTEARRAY( key ) Core::getInstance()->settings()->value( key )->get().toByteArray()