ui: load project via MenuBar
This change adds a MenuBar to QtMainWindow and adds an action for opening a different project settings XML file. The message MessageLoadProject is thereon used to load a new project in the Application and clearing the Storage.
This commit is contained in:
@@ -5,23 +5,27 @@
|
||||
|
||||
#include "component/ComponentManager.h"
|
||||
#include "Project.h"
|
||||
#include "utility/messaging/MessageListener.h"
|
||||
#include "utility/messaging/type/MessageLoadProject.h"
|
||||
|
||||
class GuiFactory;
|
||||
class MainView;
|
||||
class Storage;
|
||||
|
||||
class Application
|
||||
class Application: public MessageListener<MessageLoadProject>
|
||||
{
|
||||
public:
|
||||
static std::shared_ptr<Application> create(GuiFactory* guiFactory);
|
||||
|
||||
~Application();
|
||||
|
||||
void loadProject();
|
||||
void loadProject(const std::string& projectSettingsFilePath);
|
||||
|
||||
private:
|
||||
Application();
|
||||
|
||||
virtual void handleMessage(MessageLoadProject* message);
|
||||
|
||||
std::shared_ptr<Project> m_project;
|
||||
std::shared_ptr<Storage> m_storage;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user