VPTissue Reference Manual
SimShell::Gui::Controller::WorkspaceController Class Reference

Controller for workspace. More...

#include <WorkspaceController.h>

Inheritance diagram for SimShell::Gui::Controller::WorkspaceController:
Inheritance graph
Collaboration diagram for SimShell::Gui::Controller::WorkspaceController:
Collaboration graph

Public Member Functions

 WorkspaceController (std::shared_ptr< Ws::IWorkspaceFactory > f, AppController *m)
 
QAction * GetActionNewProject () const
 
QAction * GetActionRefreshWorkspace () const
 
QDockWidgetGetPreferencesDock () const
 
QMenuGetPreferencesMenu () const
 
virtual boost::property_tree::ptree GetPTreeState () const
 
WorkspaceViewGetView () const
 
virtual bool IsOpened () const
 
bool Open (const std::string &path)
 
 operator bool () const
 
std::shared_ptr< Ws::IWorkspaceoperator* ()
 
std::shared_ptr< const Ws::IWorkspaceoperator* () const
 
Ws::IWorkspaceoperator-> ()
 
const Ws::IWorkspaceoperator-> () const
 
ProjectControllerProject ()
 
const ProjectControllerProject () const
 
virtual void SetPTreeState (const boost::property_tree::ptree &)
 
- Public Member Functions inherited from SimShell::Gui::HasUnsavedChangesPrompt
 HasUnsavedChangesPrompt (std::string &&title)
 
bool PromptClose (QWidget *parent=nullptr)
 Display dialog window containing a list (or tree) of widgets that contain unsaved changes. More...
 
- Public Member Functions inherited from SimShell::Gui::HasUnsavedChanges
 HasUnsavedChanges (std::string &&title)
 
virtual ~HasUnsavedChanges ()
 Virtual destructor.
 
ChildrenType::iterator begin ()
 Get iterator to first child.
 
ChildrenType::const_iterator begin () const
 Get iterator to first child.
 
ChildrenType::iterator end ()
 Get iterator to one position after last child.
 
ChildrenType::const_iterator end () const
 Get iterator to one position after last child.
 
void ForceClose ()
 Force this object and its children to go back to unopened state so it can be safely deleted.
 
const std::string & GetTitle ()
 Get title of this object.
 
bool IsClean () const
 
bool Save ()
 Try to save this widget's (and its children's) changes. More...
 
bool SaveAndClose ()
 Try to save this object (and its children) and, if successful, close them all.
 

Protected Member Functions

virtual void InternalForceClose ()
 
virtual bool InternalIsClean () const
 
virtual void InternalPreForceClose ()
 
virtual bool InternalSave ()
 
- Protected Member Functions inherited from SimShell::Gui::HasUnsavedChanges
void AddChild (ChildrenType::value_type &&v)
 Add child.
 
void SetChildren (ChildrenType &&c)
 Set children.
 

Additional Inherited Members

- Public Types inherited from SimShell::Gui::HasUnsavedChanges
typedef std::vector< HasUnsavedChanges * > ChildrenType
 

Detailed Description

Controller for workspace.

Simple state machine that has 2 states: "opened" and "closed". In opened state, it is owner of a workspace object. Owner of WorkspaceView and a dock windows containing workspace preferences.

The "opened" state also has a sub-state machine called ProjectController.

Definition at line 53 of file WorkspaceController.h.

Member Function Documentation

ptree SimShell::Gui::Controller::WorkspaceController::GetPTreeState ( ) const
virtual
See also
IHasPTreeState

Implements SimShell::Gui::IHasPTreeState.

Definition at line 77 of file WorkspaceController.cpp.

void SimShell::Gui::Controller::WorkspaceController::InternalForceClose ( )
protectedvirtual
See also
HasUnsavedChanges

Implements SimShell::Gui::HasUnsavedChanges.

Definition at line 124 of file WorkspaceController.cpp.

bool SimShell::Gui::Controller::WorkspaceController::InternalIsClean ( ) const
protectedvirtual
See also
HasUnsavedChanges

Implements SimShell::Gui::HasUnsavedChanges.

Definition at line 131 of file WorkspaceController.cpp.

void SimShell::Gui::Controller::WorkspaceController::InternalPreForceClose ( )
protectedvirtual
See also
HasUnsavedChanges

Reimplemented from SimShell::Gui::HasUnsavedChanges.

Definition at line 136 of file WorkspaceController.cpp.

bool SimShell::Gui::Controller::WorkspaceController::InternalSave ( )
protectedvirtual
See also
HasUnsavedChanges

Implements SimShell::Gui::HasUnsavedChanges.

Definition at line 141 of file WorkspaceController.cpp.

bool SimShell::Gui::Controller::WorkspaceController::IsOpened ( ) const
virtual
See also
HasUnsavedChanges

Implements SimShell::Gui::HasUnsavedChanges.

Definition at line 146 of file WorkspaceController.cpp.

SimShell::Gui::Controller::WorkspaceController::operator bool ( ) const
Returns
Whether we are in opened state.

Definition at line 210 of file WorkspaceController.cpp.

void SimShell::Gui::Controller::WorkspaceController::SetPTreeState ( const boost::property_tree::ptree &  )
virtual
See also
IHasPTreeState

Implements SimShell::Gui::IHasPTreeState.

Definition at line 192 of file WorkspaceController.cpp.


The documentation for this class was generated from the following files: