VPTissue Reference Manual
|
Stand-alone Property Tree editor. More...
#include <PTreeEditor.h>
Public Member Functions | |
PTreeEditor (QWidget *parent=0) | |
virtual bool | IsOpened () const |
Test whether app is in opened state. | |
bool | OpenPath (std::string const &path) |
Open file. More... | |
bool | SavePath (std::string const &path) |
Save opened file to a given path. More... | |
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 | closeEvent (QCloseEvent *event) |
Re-implemented from QMainWindow. More... | |
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 |
Stand-alone Property Tree editor.
Definition at line 51 of file PTreeEditor.h.
|
protectedvirtual |
Re-implemented from QMainWindow.
Closes file if file is opened, possibly displaying 'save changes?'-dialog. Event is accepted only if this results in the application remaining in an unopened state.
Definition at line 198 of file PTreeEditor.cpp.
|
protectedvirtual |
Implements SimShell::Gui::HasUnsavedChanges.
Definition at line 207 of file PTreeEditor.cpp.
|
protectedvirtual |
Implements SimShell::Gui::HasUnsavedChanges.
Definition at line 220 of file PTreeEditor.cpp.
|
protectedvirtual |
Implements SimShell::Gui::HasUnsavedChanges.
Definition at line 225 of file PTreeEditor.cpp.
bool SimPT_Shell::Gui::PTreeEditor::OpenPath | ( | std::string const & | path | ) |
Open file.
If a file is already opened, it is closed first.
path | Path to file to open. |
Definition at line 237 of file PTreeEditor.cpp.
bool SimPT_Shell::Gui::PTreeEditor::SavePath | ( | std::string const & | path | ) |
Save opened file to a given path.
If no file is opened, nothing happens.
path | Path to save file to. |
Definition at line 415 of file PTreeEditor.cpp.