1 #ifndef PTREE_EDITOR_WINDOW_H_INCLUDED
2 #define PTREE_EDITOR_WINDOW_H_INCLUDED
25 #include <QMainWindow>
26 #include <boost/property_tree/ptree.hpp>
87 virtual void SetPTreeState(
const boost::property_tree::ptree&);
103 bool OpenPath(
const QString & edit_path);
110 bool OpenPTree(
const boost::property_tree::ptree&, QString
const& edit_path =
"");
130 boost::property_tree::ptree m_pt;
131 std::string m_edit_path;
132 bool m_only_edit_data;
137 QToolBar* m_toolbar_main;
139 QAction* m_action_show_toolbar_main;
142 static int const g_column_width;
148 #endif // end_of_inclde_guard
std::string GetEditPath() const
Get the current edit path.
bool OpenPTree(const boost::property_tree::ptree &, QString const &edit_path="")
Set ptree to show in editor.
virtual bool InternalIsClean() const
PTreeEditorWindow(QWidget *parent=nullptr)
virtual ~PTreeEditorWindow()
Virtual destructor.
void SetOnlyEditData(bool)
Set the "only edit values" option.
bool OpenPath(const QString &edit_path)
Set subtree to show in editor.
void StatusChanged(const QString &)
Emitted when the window has information available, for e.g. a statusbar.
Qt model reflecting hierarchical structure of a ptree.
void Undo()
Undo last manipulation by the user.
void Redo()
Redo last manipulation by the user.
Interface for objects that have non-critical state (metadata) information representable as a ptree...
virtual bool IsOpened() const
TreeView widget that presents an editable ptree to the user.
virtual QSize sizeHint() const
Reimplemented from QWidget.
bool IsOnlyEditData() const
Test whether the "only edit data" option is set.
see the online Qt documentation
virtual void InternalForceClose()
Interface for HasUnsavedChanges.
Abstract class that represents the ability be in closed or opened state, and, if the latter...
see the online Qt documentation
void ApplyTriggered(const boost::property_tree::ptree &pt)
Emitted when changes are applied to ptree.
virtual void SetPTreeState(const boost::property_tree::ptree &)
Namespace for generic graphical shell for simulators.
virtual bool InternalSave()
Small editor widget for a Boost Property Tree object.
void Apply()
Write changes to ptree object. Clean state is achieved as a side effect.
virtual boost::property_tree::ptree GetPTreeState() const