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

Use Core class to relay project loaded events to potential consumers

parent c7ec08aa
...@@ -100,6 +100,8 @@ Core::onProjectLoaded( Project* project ) ...@@ -100,6 +100,8 @@ Core::onProjectLoaded( Project* project )
{ {
m_automaticBackup->setProject( project ); m_automaticBackup->setProject( project );
m_recentProjects->setProject( project ); m_recentProjects->setProject( project );
emit projectLoaded( project );
} }
Settings* Settings*
......
...@@ -36,10 +36,14 @@ namespace Backend ...@@ -36,10 +36,14 @@ namespace Backend
class IBackend; class IBackend;
} }
#include <QObject>
#include <Tools/Singleton.hpp> #include <Tools/Singleton.hpp>
class Core : public Singleton<Core> class Core : public QObject, public Singleton<Core>
{ {
Q_OBJECT
public: public:
Backend::IBackend* backend(); Backend::IBackend* backend();
EffectsEngine* effectsEngine(); EffectsEngine* effectsEngine();
...@@ -50,9 +54,12 @@ class Core : public Singleton<Core> ...@@ -50,9 +54,12 @@ class Core : public Singleton<Core>
void onProjectLoaded( Project* project ); void onProjectLoaded( Project* project );
signals:
void projectLoaded( Project* project );
private: private:
Core(); Core();
~Core(); virtual ~Core();
Backend::IBackend* m_backend; Backend::IBackend* m_backend;
EffectsEngine* m_effectsEngine; EffectsEngine* m_effectsEngine;
Settings* m_settings; Settings* m_settings;
......
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