1 #ifndef GUI_PROJECTCONTROLLER_H_INCLUDED
2 #define GUI_PROJECTCONTROLLER_H_INCLUDED
39 class PTreeContainerPreferencesObserver;
41 namespace Controller {
61 QAction* GetActionClose()
const;
63 QMenu* GetExportMenu()
const;
65 const std::string& GetOpenedFileName()
const;
67 const std::string& GetOpenedProjectName()
const;
71 QMenu* GetParametersMenu()
const;
75 QMenu* GetPreferencesMenu()
const;
80 QMenu* GetSimulationMenu()
const;
84 QMenu* GetViewersMenu()
const;
92 bool Set(
const std::string& project_name,
const std::shared_ptr<Ws::IProject>& project);
101 operator bool()
const;
117 void SLOT_ApplyParameters(
const boost::property_tree::ptree&);
118 void SLOT_ApplyPreferences(
const boost::property_tree::ptree&);
123 void InitBaseClasses();
133 std::string m_project_name;
134 std::string m_file_name;
135 std::shared_ptr<Ws::IProject> m_project;
136 std::shared_ptr<Viewer::IViewerNode> m_root_viewer;
137 std::shared_ptr<ProjectActions::ExportActions> m_export_actions;
138 std::shared_ptr<ProjectActions::ViewerActions> m_viewer_actions;
141 std::shared_ptr<PTreeContainer> m_container_parameters;
142 std::shared_ptr<PTreeContainerPreferencesObserver> m_container_preferences;
145 QAction* m_a_close_project;
148 QMenu* m_m_simulation;
160 #endif // end_of_inclde_guard
virtual bool IsOpened() const
Helper class to enable or disable a collection of QAction and QMenu objects at once.
virtual void InternalPreForceClose()
HasUnsavedChanges with the ability of displaying a "save-discard-cancel" dialog to the user before cl...
EnabledActions interface.
void SetPTreeState(const boost::property_tree::ptree &)
virtual bool InternalIsClean() const
virtual bool InternalSave()
see the online Qt documentation
Interface for objects that have non-critical state (metadata) information representable as a ptree...
boost::property_tree::ptree GetPTreeState() const
SessionController header.
see the online Qt documentation
virtual Timings GetTimings() const
Timings in duration units specified above.
Simple state machine with 3 states: "disabled", "enabled-not-running" and "enabled-running".
void SetRunning(bool)
Set simulation running.
see the online Qt documentation
virtual void InternalForceClose()
Namespace for generic graphical shell for simulators.
Utility class to for timing.
HasUnsavedChangesPrompt interface.