VPTissue Reference Manual
|
For a given ptree, constructs PTreeMenu, QDockWidget, PTreeEditorWindow. More...
#include <PTreeContainer.h>
Signals | |
void | Applied (boost::property_tree::ptree const &) |
void | StatusChanged (QString const &) |
Public Member Functions | |
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. | |
Protected Member Functions | |
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. | |
Additional Inherited Members | |
Public Types inherited from SimShell::Gui::HasUnsavedChanges | |
typedef std::vector< HasUnsavedChanges * > | ChildrenType |
For a given ptree, constructs PTreeMenu, QDockWidget, PTreeEditorWindow.
The ptree menu will reflect the hierarchical structure of the ptree. For each subtree in the ptree, the user can select it in the menu to open it in the editor. By default, the entire ptree is shown in the editor. The editor is encapsulated in a dock widget.
Definition at line 45 of file PTreeContainer.h.
std::string SimShell::Gui::PTreeContainer::GetEditPath | ( | ) | const |
Get the current edit path.
The edit path is the current subtree that is shown in the associated ptree editor. If the entire ptree is shown in the editor (=default behavior), the edit path is empty.
Definition at line 65 of file PTreeContainer.cpp.
|
virtual |
Implements SimShell::Gui::IHasPTreeState.
Definition at line 75 of file PTreeContainer.cpp.
Referenced by SimShell::Gui::PTreeContainerPreferencesObserver::Update().
|
protectedvirtual |
Implements SimShell::Gui::HasUnsavedChanges.
Definition at line 83 of file PTreeContainer.cpp.
|
protectedvirtual |
Implements SimShell::Gui::HasUnsavedChanges.
Definition at line 89 of file PTreeContainer.cpp.
|
protectedvirtual |
Implements SimShell::Gui::HasUnsavedChanges.
Definition at line 94 of file PTreeContainer.cpp.
|
virtual |
Implements SimShell::Gui::HasUnsavedChanges.
Definition at line 99 of file PTreeContainer.cpp.
bool SimShell::Gui::PTreeContainer::Open | ( | boost::property_tree::ptree const & | pt, |
QString const & | edit_path = "" |
||
) |
Open ptree with given edit path.
The edit path is a path pointing to a subtree. If the edit path is not empty, only the designated subtree will be shown in the editor.
Definition at line 104 of file PTreeContainer.cpp.
References SimShell::Gui::PTreeMenu::OpenPTree().
Referenced by SimShell::Gui::PTreeContainerPreferencesObserver::Update().
void SimShell::Gui::PTreeContainer::SetOnlyEditData | ( | bool | b | ) |
If true, the user can't insert, move, delete or edit keys.
This is the same as a read-only property: the user can still edit values in the 'data' column.
Definition at line 144 of file PTreeContainer.cpp.
Referenced by SimPT_Editor::PTreePanels::PTreePanels().
|
virtual |
Implements SimShell::Gui::IHasPTreeState.
Definition at line 132 of file PTreeContainer.cpp.
Referenced by SimShell::Gui::PTreeContainerPreferencesObserver::Update().