VPTissue Reference Manual
SimShell::Gui::PTreeContainerPreferencesObserver Class Reference

PTreeContainer meant for displaying/editing preferences ptrees that can also be modified elsewhere in the code. More...

#include <PTreeContainerPreferencesObserver.h>

Inheritance diagram for SimShell::Gui::PTreeContainerPreferencesObserver:
Inheritance graph
Collaboration diagram for SimShell::Gui::PTreeContainerPreferencesObserver:
Collaboration graph

Public Member Functions

 PTreeContainerPreferencesObserver (const QString &title, QWidget *parent=nullptr)
 
virtual ~PTreeContainerPreferencesObserver ()
 Virtual destructor.
 
void Update (const Ws::Event::PreferencesChanged &)
 Call this method to update the maintained ptree. More...
 
- Public Member Functions inherited from SimShell::Gui::PTreeContainer
 PTreeContainer (QString const &title, QWidget *parent=0)
 
QDockWidgetGetDock () const
 Get the associated dock widget, containing the ptree editor.
 
std::string GetEditPath () const
 Get the current edit path. More...
 
PTreeMenuGetMenu () const
 Get the associated menu.
 
virtual boost::property_tree::ptree GetPTreeState () const
 
virtual bool IsOpened () const
 
bool Open (boost::property_tree::ptree const &pt, QString const &edit_path="")
 Open ptree with given edit path. More...
 
void Redo ()
 
void SetOnlyEditData (bool)
 If true, the user can't insert, move, delete or edit keys. More...
 
virtual void SetPTreeState (const boost::property_tree::ptree &)
 
void Undo ()
 
- 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.
 

Additional Inherited Members

- Public Types inherited from SimShell::Gui::HasUnsavedChanges
typedef std::vector< HasUnsavedChanges * > ChildrenType
 
- Signals inherited from SimShell::Gui::PTreeContainer
void Applied (boost::property_tree::ptree const &)
 
void StatusChanged (QString const &)
 
- Protected Member Functions inherited from SimShell::Gui::PTreeContainer
virtual void InternalForceClose ()
 
virtual bool InternalIsClean () const
 
virtual bool InternalSave ()
 
- Protected Member Functions inherited from SimShell::Gui::HasUnsavedChanges
void AddChild (ChildrenType::value_type &&v)
 Add child.
 
virtual void InternalPreForceClose ()
 Additional things to do before closing children of this widget.
 
void SetChildren (ChildrenType &&c)
 Set children.
 

Detailed Description

PTreeContainer meant for displaying/editing preferences ptrees that can also be modified elsewhere in the code.

This class can act as an observer for Ws::Event::PreferencesChanged events.

See also
Update

Definition at line 34 of file PTreeContainerPreferencesObserver.h.

Member Function Documentation

void SimShell::Gui::PTreeContainerPreferencesObserver::Update ( const Ws::Event::PreferencesChanged e)

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