![]() |
VPTissue Reference Manual
|
PTreeContainer meant for displaying/editing preferences ptrees that can also be modified elsewhere in the code. More...
#include <PTreeContainerPreferencesObserver.h>


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) | |
| QDockWidget * | GetDock () const |
| Get the associated dock widget, containing the ptree editor. | |
| std::string | GetEditPath () const |
| Get the current edit path. More... | |
| PTreeMenu * | GetMenu () 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. | |
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.
Definition at line 34 of file PTreeContainerPreferencesObserver.h.
| void SimShell::Gui::PTreeContainerPreferencesObserver::Update | ( | const Ws::Event::PreferencesChanged & | e | ) |
Call this method to update the maintained ptree.
Typically, you want to register this method as a callback for Ws::Event::PreferencesChanged events.
Definition at line 33 of file PTreeContainerPreferencesObserver.cpp.
References SimShell::Gui::HasUnsavedChanges::ForceClose(), SimShell::Ws::Event::PreferencesChanged::GetPreferences(), SimShell::Gui::PTreeContainer::GetPTreeState(), SimShell::Gui::HasUnsavedChanges::IsClean(), SimShell::Gui::PTreeContainer::Open(), and SimShell::Gui::PTreeContainer::SetPTreeState().
