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

ProjectManager: Split UI/Core part

parent 6774966e
......@@ -86,9 +86,7 @@ MainWindow::MainWindow( Backend::IBackend* backend, QWidget *parent )
//Preferences
initVlmcPreferences();
//Creating the project manager so it can create all the project variables
GUIProjectManager::getInstance();
Project::getInstance()->projectManager()->setProjectManagerUi( new GUIProjectManager );
//All preferences have been created: restore them:
loadVlmcPreferences();
Core::getInstance()->settings()->setValue( "private/VlmcVersion", PROJECT_VERSION_MAJOR );
......@@ -116,7 +114,7 @@ MainWindow::MainWindow( Backend::IBackend* backend, QWidget *parent )
connect( this, SIGNAL( toolChanged( ToolButtons ) ),
m_timeline, SLOT( setTool( ToolButtons ) ) );
connect( GUIProjectManager::getInstance(), SIGNAL( projectUpdated( const QString&, bool ) ),
connect( Project::getInstance()->projectManager(), SIGNAL( projectUpdated( const QString&, bool ) ),
this, SLOT( projectUpdated( const QString&, bool ) ) );
// Undo/Redo
......@@ -160,7 +158,7 @@ MainWindow::showWizard()
{
if ( m_wizard == NULL )
{
m_wizard = new ProjectWizard( GUIProjectManager::getInstance(), this );
m_wizard = new ProjectWizard( Project::getInstance()->projectManager(), this );
m_wizard->setModal( true );
}
m_wizard->show();
......@@ -373,19 +371,19 @@ MainWindow::loadVlmcPreferencesCategory( const QString &subPart )
void
MainWindow::on_actionSave_triggered()
{
GUIProjectManager::getInstance()->saveProject();
Project::getInstance()->projectManager()->save();
}
void
MainWindow::on_actionSave_As_triggered()
{
GUIProjectManager::getInstance()->saveProject( true );
Project::getInstance()->projectManager()->saveAs();
}
void
MainWindow::on_actionLoad_Project_triggered()
{
GUIProjectManager::getInstance()->loadProject();
Project::getInstance()->projectManager()->loadProject();
}
void
......@@ -782,20 +780,17 @@ MainWindow::on_actionProject_Preferences_triggered()
bool
MainWindow::saveSettings()
{
GUIProjectManager *pm = GUIProjectManager::getInstance();
// ??????
clearTemporaryFiles();
if ( pm->askForSaveIfModified() )
{
Settings* settings = Core::getInstance()->settings();
// Save the current geometry
settings->setValue( "private/MainWindowGeometry", saveGeometry() );
// Save the current layout
settings->setValue( "private/MainWindowState", saveState() );
settings->setValue( "private/CleanQuit", true );
settings->save();
return true;
}
return false;
Settings* settings = Core::getInstance()->settings();
// Save the current geometry
settings->setValue( "private/MainWindowGeometry", saveGeometry() );
// Save the current layout
settings->setValue( "private/MainWindowState", saveState() );
settings->setValue( "private/CleanQuit", true );
settings->save();
Project::getInstance()->projectManager()->save();
return true;
}
void
......@@ -818,12 +813,6 @@ MainWindow::projectUpdated( const QString& projectName, bool savedStatus )
setWindowTitle( title );
}
void
MainWindow::on_actionClose_Project_triggered()
{
GUIProjectManager::getInstance()->closeProject();
}
void
MainWindow::on_actionUndo_triggered()
{
......@@ -858,7 +847,7 @@ MainWindow::restoreSession()
QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes );
if ( res == QMessageBox::Yes )
{
if ( GUIProjectManager::getInstance()->loadEmergencyBackup() == true )
if ( Project::getInstance()->projectManager()->loadEmergencyBackup() == 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" ) );
......
......@@ -152,7 +152,6 @@ private slots:
void on_actionSave_As_triggered();
void on_actionHelp_triggered();
void on_actionProject_Preferences_triggered();
void on_actionClose_Project_triggered();
void on_actionUndo_triggered();
void on_actionRedo_triggered();
void on_actionCrash_triggered();
......
......@@ -20,265 +20,62 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301, USA.
*****************************************************************************/
#include "GuiProjectManager.h"
#include "Main/Core.h"
#include "Main/Project.h"
#include "Library/Library.h"
#include "Workflow/MainWorkflow.h"
#include "Settings/Settings.h"
#include "Project/Workspace.h"
#include "timeline/Timeline.h"
#include <QDateTime>
#include <QFileDialog>
#include <QMessageBox>
#include <QTimer>
#include <QUndoStack>
GUIProjectManager::GUIProjectManager()
{
connect( this, SIGNAL( projectClosed() ), Project::getInstance()->library(), SLOT( clear() ) );
connect( this, SIGNAL( projectClosed() ), Project::getInstance()->workflow(), SLOT( clear() ) );
connect( Project::getInstance()->library(), SIGNAL( cleanStateChanged( bool ) ),
this, SLOT( cleanChanged( bool ) ) );
//Automatic save part :
m_timer = new QTimer( this );
connect( m_timer, SIGNAL( timeout() ), this, SLOT( autoSaveRequired() ) );
VLMC_CREATE_PREFERENCE_BOOL( "vlmc/AutomaticBackup", false,
QT_TRANSLATE_NOOP( "PreferenceWidget", "Automatic save" ),
QT_TRANSLATE_NOOP( "PreferenceWidget", "When this option is activated,"
"VLMC will automatically save your project "
"at a specified interval" ) );
Core::getInstance()->settings()->watchValue( "vlmc/AutomaticBackup", this,
SLOT( automaticSaveEnabledChanged(QVariant) ),
Qt::QueuedConnection );
VLMC_CREATE_PREFERENCE_INT( "vlmc/AutomaticBackupInterval", 5,
QT_TRANSLATE_NOOP( "PreferenceWidget", "Automatic save interval" ),
QT_TRANSLATE_NOOP( "PreferenceWidget", "This is the interval that VLMC will wait "
"between two automatic save" ) );
Core::getInstance()->settings()->watchValue( "vlmc/AutomaticBackupInterval", this,
SLOT( automaticSaveIntervalChanged(QVariant) ),
Qt::QueuedConnection );
automaticSaveEnabledChanged( VLMC_GET_BOOL( "vlmc/AutomaticBackup" ) );
Project::getInstance()->settings()->watchValue( "vlmc/ProjectName", this,
SLOT(projectNameChanged(QVariant) ) );
connect( Project::getInstance()->undoStack(), SIGNAL( cleanChanged( bool ) ),
this, SLOT( cleanChanged( bool ) ) );
connect( this, SIGNAL( projectSaved() ),
Project::getInstance()->undoStack(), SLOT( setClean() ) );
}
#include <QObject>
bool
GUIProjectManager::askForSaveIfModified()
{
if ( m_needSave == true )
{
QMessageBox msgBox;
msgBox.setText( tr( "The project has been modified." ) );
msgBox.setInformativeText( tr( "Do you want to save it?" ) );
msgBox.setStandardButtons( QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel );
msgBox.setDefaultButton( QMessageBox::Save );
int ret = msgBox.exec();
switch ( ret )
{
case QMessageBox::Save:
saveProject();
break ;
case QMessageBox::Discard:
break ;
case QMessageBox::Cancel:
default:
return false ;
}
}
return true;
}
#include "GuiProjectManager.h"
bool
GUIProjectManager::createNewProjectFile( bool saveAs )
{
if ( m_projectFile == NULL || saveAs == true )
{
QString defaultPath = VLMC_PROJECT_GET_STRING( "vlmc/Workspace" );
if ( defaultPath.length() == 0 )
defaultPath = VLMC_GET_STRING( "vlmc/DefaultProjectLocation" );
QString outputFileName =
QFileDialog::getSaveFileName( NULL, tr( "Enter the output file name" ),
defaultPath, tr( "VLMC project file(*.vlmc)" ) );
if ( outputFileName.length() == 0 )
return false;
if ( m_projectFile != NULL )
delete m_projectFile;
if ( outputFileName.endsWith( ".vlmc" ) == false )
outputFileName += ".vlmc";
m_projectFile = new QFile( outputFileName );
QFileInfo fInfo( outputFileName );
Project::getInstance()->settings()->setValue( "vlmc/Workspace", fInfo.absolutePath() );
appendToRecentProject( projectName() );
emit projectUpdated( projectName(), true );
}
return true;
}
void
GUIProjectManager::saveProject( bool saveAs /* = false */ )
GUIProjectManager::shouldLoadBackupFile()
{
//If the project is still unsaved, or if we want to
//save the project with a new name
if ( createNewProjectFile( saveAs ) == false )
return ;
ProjectManager::saveAs( outputFileName() );
return QMessageBox::question( NULL, QObject::tr( "Backup file" ),
QObject::tr( "A backup file exists for this project. "
"Do you want to load it?" ),
QMessageBox::Ok | QMessageBox::No ) == QMessageBox::Ok;
}
bool
GUIProjectManager::closeProject()
{
if ( askForSaveIfModified() == false )
return false;
bool ret = ProjectManager::closeProject();
//This one is for the mainwindow, to update the title bar
Project::getInstance()->undoStack()->clear();
emit projectUpdated( projectName(), true );
return ret;
}
void
GUIProjectManager::newProject( const QString &projectName, const QString &workspacePath )
{
if ( closeProject() == false )
return ;
m_projectName = projectName;
//Current project file has already been delete/nulled by ProjectManager::closeProject()
m_projectFile = new QFile( workspacePath + '/' + "project.vlmc" );
saveProject( false );
appendToRecentProject( projectName );
}
void
GUIProjectManager::autoSaveRequired()
GUIProjectManager::shouldDeleteOutdatedBackupFile()
{
if ( m_projectFile == NULL )
return ;
ProjectManager::__saveProject( createAutoSaveOutputFileName( m_projectFile->fileName() ) );
return QMessageBox::question( NULL, QObject::tr( "Backup file" ),
QObject::tr( "An outdated backup file was found. "
"Do you want to erase it?" ),
QMessageBox::Ok | QMessageBox::No ) == QMessageBox::Ok;
}
void
GUIProjectManager::automaticSaveEnabledChanged( const QVariant& val )
QString
GUIProjectManager::getProjectFile(const QString &defaultPath, bool isOpen)
{
bool enabled = val.toBool();
if ( enabled == true )
if ( isOpen )
{
int interval = VLMC_GET_INT( "vlmc/AutomaticBackupInterval" );
m_timer->start( interval * 1000 * 60 );
return QFileDialog::getOpenFileName( NULL, QObject::tr( "Please choose a project file" ),
defaultPath, QObject::tr( "VLMC project file(*.vlmc)" ) );
}
else
m_timer->stop();
}
void
GUIProjectManager::automaticSaveIntervalChanged( const QVariant& val )
{
bool enabled = VLMC_GET_BOOL( "vlmc/AutomaticBackup" );
if ( enabled == false )
return ;
m_timer->start( val.toInt() * 1000 * 60 );
}
bool
GUIProjectManager::needSave() const
{
return m_needSave;
return QFileDialog::getSaveFileName( NULL, QObject::tr( "Enter the output file name" ),
defaultPath, QObject::tr( "VLMC project file(*.vlmc)" ) );
}
void
GUIProjectManager::cleanChanged( bool val )
{
m_needSave = !val;
emit projectUpdated( projectName(), val );
}
void
GUIProjectManager::projectNameChanged( const QVariant& name )
{
m_projectName = name.toString();
emit projectUpdated( m_projectName, !m_needSave );
}
void
GUIProjectManager::failedToLoad( const QString &reason ) const
IProjectManagerUiCb::SaveMode
GUIProjectManager::shouldSaveBeforeClose()
{
QMessageBox::warning( NULL, tr( "Failed to load project file" ), reason );
}
void
GUIProjectManager::saveTimeline( QXmlStreamWriter &project )
{
Timeline::getInstance()->save( project );
}
void
GUIProjectManager::loadTimeline( const QDomElement &root )
{
Timeline::getInstance()->load( root );
}
void
GUIProjectManager::loadProject( const QString &fileName )
{
QFile projectFile( fileName );
//If for some reason this happens... better safe than sorry
if ( projectFile.exists() == false )
return ;
QString fileToLoad = fileName;
QString backupFilename = createAutoSaveOutputFileName( fileName );
QFile autoBackup( backupFilename );
if ( autoBackup.exists() == true )
QMessageBox msgBox;
msgBox.setText( QObject::tr( "The project has been modified." ) );
msgBox.setInformativeText( QObject::tr( "Do you want to save it?" ) );
msgBox.setStandardButtons( QMessageBox::Save | QMessageBox::Discard | QMessageBox::Cancel );
msgBox.setDefaultButton( QMessageBox::Save );
int ret = msgBox.exec();
switch ( ret )
{
QFileInfo projectFileInfo( projectFile );
QFileInfo autobackupFileInfo( autoBackup );
if ( autobackupFileInfo.lastModified() > projectFileInfo.lastModified() )
{
if ( QMessageBox::question( NULL, tr( "Backup file" ),
tr( "A backup file exists for this project. "
"Do you want to load it?" ),
QMessageBox::Ok | QMessageBox::No ) == QMessageBox::Ok )
{
fileToLoad = backupFilename;
}
}
else
{
if ( QMessageBox::question( NULL, tr( "Backup file" ),
tr( "An outdated backup file was found. "
"Do you want to erase it?" ),
QMessageBox::Ok | QMessageBox::No ) == QMessageBox::Ok )
{
autoBackup.remove();
}
}
case QMessageBox::Save:
return Save;
case QMessageBox::Discard:
return Discard;
case QMessageBox::Cancel:
default:
return Cancel;
}
ProjectManager::loadProject( fileToLoad );
}
void
GUIProjectManager::loadProject()
{
QString fileName =
QFileDialog::getOpenFileName( NULL, tr( "Please choose a project file" ),
VLMC_GET_STRING( "vlmc/DefaultProjectLocation" ),
tr( "VLMC project file(*.vlmc)" ) );
if ( fileName.length() <= 0 ) //If the user canceled.
return ;
loadProject( fileName );
}
......@@ -23,67 +23,15 @@
#ifndef GUIPROJECTMANAGER_H
#define GUIPROJECTMANAGER_H
#include <QXmlStreamWriter>
#include "Project/ProjectManager.h"
class QTimer;
class GUIProjectManager : public ProjectManager, public Singleton<GUIProjectManager>
class GUIProjectManager : public IProjectManagerUiCb
{
Q_OBJECT
public:
GUIProjectManager();
bool askForSaveIfModified();
void newProject( const QString& projectName, const QString &workspacePath );
/**
* \brief Save the project using the current project file.
*/
void saveProject( bool saveAs = false );
/**
* \brief Ask the project manager to close current project.
*
* This can fail, as the user will be asked if he wants to save the current project.
* If she selects discard, the project closing procedure is aborted.
* \return true if the project has been closed. false otherwise.
*/
bool closeProject();
bool needSave() const;
/**
* \brief Display the open file name dialog, and call the actual project loading
* method.
*/
void loadProject();
/**
* \brief Check for a project backup file, and load the appropriate file,
* according to the user input.
*
* if an outdated project backup is found, the used is asked if she wants to delete
* it.
* This is handled here as there's no use for this in non-GUI mode.
*/
void loadProject( const QString& fileName );
protected:
virtual void failedToLoad( const QString &reason ) const;
virtual void saveTimeline( QXmlStreamWriter &project );
virtual void loadTimeline( const QDomElement& root );
private:
bool createNewProjectFile( bool saveAs );
private:
QTimer* m_timer;
private slots:
void projectNameChanged( const QVariant& projectName );
void autoSaveRequired();
void cleanChanged( bool val );
void automaticSaveEnabledChanged( const QVariant& enabled );
void automaticSaveIntervalChanged( const QVariant& interval );
friend class Singleton<GUIProjectManager>;
virtual bool shouldLoadBackupFile();
virtual bool shouldDeleteOutdatedBackupFile();
virtual QString getProjectFile( const QString &defaultPath, bool isOpen );
virtual SaveMode shouldSaveBeforeClose();
};
#endif // GUIPROJECTMANAGER_H
......@@ -24,6 +24,7 @@
#include "project/GuiProjectManager.h"
#include "ProjectWizard.h"
#include "WelcomePage.h"
#include "Main/Project.h"
OpenPage::OpenPage( QWidget *parent ) :
QWizardPage(parent)
......@@ -52,7 +53,7 @@ OpenPage::changeEvent( QEvent *e )
bool
OpenPage::validatePage()
{
ProjectManager* pm = GUIProjectManager::getInstance();
ProjectManager* pm = Project::getInstance()->projectManager();
if ( !WelcomePage::projectPath().isEmpty() )
pm->loadProject( WelcomePage::projectPath() );
......
......@@ -102,11 +102,7 @@ ProjectWizard::accept()
{
Settings* preferences = Core::getInstance()->settings();
Settings* projectPreferences = Project::getInstance()->settings();
// m_projectManager->newProject( field( "projectName" ).toString(), field( "projectPath" ).toString() );
//FIXME: This doesn't ask the user if she wants to save the current project
vlmcCritical() << "This is broken";
m_projectManager->closeProject();
m_projectManager->saveAs( field( "projectPath" ).toString() );
m_projectManager->newProject( field( "projectName" ).toString(), field( "projectPath" ).toString() );
preferences->setValue( "vlmc/DefaultProjectLocation", field( "workspace" ) );
......
......@@ -118,7 +118,7 @@ void
WelcomePage::loadRecentsProjects()
{
m_ui.projectsListWidget->clear();
ProjectManager* pm = GUIProjectManager::getInstance();
ProjectManager* pm = Project::getInstance()->projectManager();
QStringList recents = pm->recentsProjects();
for ( int i = 0; i < recents.count(); ++i )
......@@ -176,7 +176,7 @@ WelcomePage::removeProject()
if ( project.isEmpty() )
return;
GUIProjectManager::getInstance()->removeProject( project );
Project::getInstance()->projectManager()->removeProject( project );
loadRecentsProjects(); // Reload recent projects
}
......
......@@ -26,6 +26,7 @@
#include "Library/Library.h"
#include "Workflow/MainWorkflow.h"
#include "Project/ProjectManager.h"
#include "Project/Workspace.h"
#include "Settings/Settings.h"
......@@ -36,10 +37,12 @@ Project::Project()
m_workflow = new MainWorkflow;
m_workspace = new Workspace( m_settings );
m_library = new Library( m_workspace );
m_projectManager = new ProjectManager;
}
Project::~Project()
{
delete m_projectManager;
delete m_library;
delete m_workspace;
delete m_workflow;
......@@ -76,3 +79,9 @@ Project::workspace()
{
return m_workspace;
}
ProjectManager*
Project::projectManager()
{
return m_projectManager;
}
......@@ -29,6 +29,7 @@ class QUndoStack;
class Library;
class MainWorkflow;
class ProjectManager;
class Settings;
class Workspace;
......@@ -44,6 +45,7 @@ public:
QUndoStack* undoStack();
Settings* settings();
Workspace* workspace();
ProjectManager* projectManager();
private:
Library* m_library;
......@@ -51,6 +53,7 @@ private:
QUndoStack* m_undoStack;
Settings* m_settings;
Workspace* m_workspace;
ProjectManager* m_projectManager;
friend class Singleton<Project>;
};
......
......@@ -32,6 +32,7 @@
#include "Workflow/Types.h"
#include "Renderer/ConsoleRenderer.h"
#include "Project/ProjectManager.h"
#include "Main/Project.h"
#include "Backend/IBackend.h"
#include "Gui/MainWindow.h"
......@@ -94,7 +95,7 @@ VLMCGuimain( int argc, char **argv )
if ( argc > ( i + 1 ) && ( arg == "--project" || arg == "-p" ) )
{
GUIProjectManager::getInstance()->loadProject( argv[i+1] );
Project::getInstance()->projectManager()->loadProject( argv[i+1] );
project = true;
break;
}
......@@ -181,7 +182,7 @@ VLMCCoremain( int argc, char **argv )
#ifndef WITH_GUI
ConsoleRenderer renderer;
ProjectManager *pm = ProjectManager::getInstance();
ProjectManager *pm = Project::getInstance()->projectManager();
QCoreApplication::connect( pm, SIGNAL( projectLoaded() ), &renderer, SLOT( startRender() ) );
pm->loadProject( app.arguments()[1] );
......
......@@ -24,6 +24,7 @@
#include "Workflow/Types.h"
#include "Tools/VlmcDebug.h"
#include "Main/Project.h"
#include <QMetaType>
#include <QTextStream>
......@@ -51,11 +52,7 @@ signalHandler( int sig )
{
signal( sig, SIG_DFL );
#ifdef WITH_GUI
GUIProjectManager::getInstance()->emergencyBackup();
#else
ProjectManager::getInstance()->emergencyBackup();
#endif
Project::getInstance()->projectManager()->emergencyBackup();
#ifdef WITH_CRASHHANDLER_GUI
CrashHandler* ch = new CrashHandler( sig );
......
......@@ -22,23 +22,26 @@
#include "config.h"
#include <QDir>
#include <QDomDocument>
#include <QUndoStack>
#include <QTimer>
#include <errno.h>
#include <signal.h>
#include "ProjectManager.h"
#include "Main/Core.h"
#include "Main/Project.h"
#include "Library/Library.h"
#include "Workflow/MainWorkflow.h"
#include "Gui/project/GuiProjectManager.h"
#include "Settings/Settings.h"
#include "Gui/timeline/Timeline.h"
#include "Tools/VlmcDebug.h"
#include "Renderer/WorkflowRenderer.h"
#include "Project/Workspace.h"
#include <QDir>
#include <QDomDocument>
#include <errno.h>
#include <signal.h>
#define SETTINGS_RECENTS "private/RecentsProjects"
#define SETTINGS_BACKUP "private/EmergencyBackup"
......@@ -46,8 +49,15 @@ const QString ProjectManager::unNamedProject = ProjectManager::tr( "Untitled P
const QString ProjectManager::unSavedProject = ProjectManager::tr( "Unsaved Project" );
const QString ProjectManager::backupSuffix = "~";
ProjectManager::ProjectManager() : m_projectFile( NULL ), m_needSave( false )
ProjectManager::ProjectManager()
: m_projectFile( NULL )
, m_needSave( false )
{
connect( this, SIGNAL( projectClosed() ), Project::getInstance()->library(), SLOT( clear() ) );
connect( this, SIGNAL( projectClosed() ), Project::getInstance()->workflow(), SLOT( clear() ) );
connect( Project::getInstance()->library(), SIGNAL( cleanStateChanged( bool ) ),
this, SLOT( cleanChanged( bool ) ) );
m_recentsProjects = VLMC_GET_STRINGLIST( SETTINGS_RECENTS );
//If the variable was empty, it will return a list with one empty string in it.
m_recentsProjects.removeAll( "" );
......@@ -87,6 +97,31 @@ ProjectManager::ProjectManager() : m_projectFile( NULL ), m_needSave( false )
VLMC_CREATE_PRIVATE_PROJECT_STRING( "vlmc/Workspace", "" );
m_timer = new QTimer( this );
connect( m_timer, SIGNAL( timeout() ), this, SLOT( autoSaveRequired() ) );
VLMC_CREATE_PREFERENCE_BOOL( "vlmc/AutomaticBackup", false,
QT_TRANSLATE_NOOP( "PreferenceWidget", "Automatic save" ),
QT_TRANSLATE_NOOP( "PreferenceWidget", "When this option is activated,"
"VLMC will automatically save your project "
"at a specified interval" ) );
Core::getInstance()->settings()->watchValue( "vlmc/AutomaticBackup", this,
SLOT( automaticSaveEnabledChanged(QVariant) ),
Qt::QueuedConnection );
VLMC_CREATE_PREFERENCE_INT( "vlmc/AutomaticBackupInterval", 5,
QT_TRANSLATE_NOOP( "PreferenceWidget", "Automatic save interval" ),
QT_TRANSLATE_NOOP( "PreferenceWidget", "This is the interval that VLMC will wait "
"between two automatic save" ) );
Core::getInstance()->settings()->watchValue( "vlmc/AutomaticBackupInterval", this,
SLOT( automaticSaveIntervalChanged(QVariant) ),
Qt::QueuedConnection );
Project::getInstance()->settings()->watchValue( "vlmc/ProjectName", this,
SLOT(projectNameChanged(QVariant) ) );
connect( Project::getInstance()->undoStack(), SIGNAL( cleanChanged( bool ) ),
this, SLOT( cleanChanged( bool ) ) );
connect( this, SIGNAL( projectSaved() ),
Project::getInstance()->undoStack(), SLOT( setClean() ) );
//We have to wait for the library to be loaded before loading the workflow
connect( Project::getInstance()->library(), SIGNAL( projectLoaded() ), this, SLOT( loadWorkflow() ) );
}
......@@ -97,6 +132,12 @@ ProjectManager::~ProjectManager()
delete m_projectFile;
}
void
ProjectManager::setProjectManagerUi( IProjectManagerUiCb *projectManagerUi )
{
m_projectManagerUi = projectManagerUi;
}
QStringList