1 #ifndef GUI_WORKSPACECONTROLLER_H_INCLUDED
2 #define GUI_WORKSPACECONTROLLER_H_INCLUDED
36 class PTreeContainerPreferencesObserver;
38 class WorkspaceQtModel;
40 namespace Controller {
61 bool Open(
const std::string& path);
63 QAction* GetActionNewProject()
const;
65 QAction* GetActionRefreshWorkspace()
const;
69 QMenu* GetPreferencesMenu()
const;
84 virtual void SetPTreeState(
const boost::property_tree::ptree&);
87 operator bool()
const;
92 std::shared_ptr<Ws::IWorkspace> operator*();
93 std::shared_ptr<const Ws::IWorkspace> operator*()
const;
109 void SLOT_ApplyPreferences(
const boost::property_tree::ptree &);
110 void SLOT_NewProjectDialog();
111 void SLOT_RefreshWorkspace();
115 void InitBaseClasses();
119 std::shared_ptr<Ws::IWorkspaceFactory> m_factory;
123 std::shared_ptr<WorkspaceQtModel> m_model;
127 std::shared_ptr<PTreeContainerPreferencesObserver> m_container_preferences;
130 QAction* m_a_new_project;
131 QAction* m_a_refresh_workspace;
143 #endif // end_of_inclde_guard
virtual boost::property_tree::ptree GetPTreeState() const
Helper class to enable or disable a collection of QAction and QMenu objects at once.
HasUnsavedChanges with the ability of displaying a "save-discard-cancel" dialog to the user before cl...
EnabledActions interface.
Abstraction of project in workspace on file system.
Controller for workspace.
virtual void InternalPreForceClose()
Interface for workspace-like behavior.
Interface for IWorkspaceFactory.
virtual bool InternalSave()
see the online Qt documentation
Interface for objects that have non-critical state (metadata) information representable as a ptree...
virtual bool InternalIsClean() const
virtual void InternalForceClose()
see the online Qt documentation
virtual bool IsOpened() const
Interface for IWorkspace.
virtual void SetPTreeState(const boost::property_tree::ptree &)
ProjectController header.
Interface for HasUnsavedChanges.
see the online Qt documentation
TreeView widget that uses WorkspaceQtModel as a model.
Namespace for generic graphical shell for simulators.