VPTissue Reference Manual
SimShell::Gui::PTreeView Class Reference

TreeView widget that presents an editable ptree to the user. More...

#include <PTreeView.h>

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

Signals

void CleanChanged (bool clean)
 Emitted whenever the view's internal undo stack state changes from clean to non-clean, or from non-clean to clean. More...
 
void Edited ()
 Emitted whenever the data contained in the model changes. More...
 
void StatusChanged (QString const &message)
 Emitted when view has some message to share with, for example, a statusbar. More...
 

Public Member Functions

 PTreeView (QWidget *parent=0)
 Constructor. More...
 
virtual ~PTreeView ()
 Virtual Destructor.
 
QAction * GetClearHighlightAction () const
 
QAction * GetCopyAction () const
 
QAction * GetCutAction () const
 
QAction * GetExpandAllAction () const
 
QAction * GetExpandNoneAction () const
 
QAction * GetFindDialogAction () const
 
QAction * GetInsertBeforeAction () const
 
QAction * GetInsertChildAction () const
 
QAction * GetMoveDownAction () const
 
QAction * GetMoveUpAction () const
 
QAction * GetPasteAction () const
 
QAction * GetRedoAction () const
 
QAction * GetRemoveAction () const
 
QAction * GetUndoAction () const
 
bool IsClean () const
 Test whether the view's internal undo stack is in a clean state. More...
 
bool IsOnlyEditData () const
 
void SetClean ()
 Set the view's internal undo stack's current state to be the clean state. More...
 
virtual void setModel (QAbstractItemModel *model)
 Reimplemented from QTreeView, also enables/disables certain actions.
 
void SetOnlyEditData (bool)
 
- Public Member Functions inherited from SimShell::Gui::MyTreeView
 MyTreeView (QWidget *parent=nullptr)
 
virtual boost::property_tree::ptree GetPTreeState () const
 
virtual void SetPTreeState (const boost::property_tree::ptree &)
 

Protected Member Functions

virtual void contextMenuEvent (QContextMenuEvent *)
 Reimplemented from QWidget. More...
 

Detailed Description

TreeView widget that presents an editable ptree to the user.

Actions exist for finding keys/data, undo/redo, cut/copy/paste, etc. Context menus are provided.

Definition at line 37 of file PTreeView.h.

Constructor & Destructor Documentation

SimShell::Gui::PTreeView::PTreeView ( QWidget parent = 0)

Constructor.

Parameters
parentParent of the window.

Definition at line 37 of file PTreeView.cpp.

References CleanChanged(), and Edited().

Member Function Documentation

void SimShell::Gui::PTreeView::CleanChanged ( bool  clean)
signal

Emitted whenever the view's internal undo stack state changes from clean to non-clean, or from non-clean to clean.

Parameters
cleanWhether the internal undo stack is clean.

Referenced by PTreeView().

Here is the caller graph for this function:

void SimShell::Gui::PTreeView::contextMenuEvent ( QContextMenuEvent *  event)
protectedvirtual

Reimplemented from QWidget.

Generates a context menu with some trivial actions, e.g. inserting a new item, moving, removing.

Definition at line 151 of file PTreeView.cpp.

void SimShell::Gui::PTreeView::Edited ( )
signal

Emitted whenever the data contained in the model changes.

This may happen when the user edits the data, or when an operation is un/redone.

Referenced by PTreeView().

Here is the caller graph for this function:

bool SimShell::Gui::PTreeView::IsClean ( ) const

Test whether the view's internal undo stack is in a clean state.

Returns
Whether the internal undo stack is in a clean state.

Definition at line 309 of file PTreeView.cpp.

Referenced by SimShell::Gui::PTreeEditorWindow::InternalIsClean(), SimShell::Gui::PTreeEditorWindow::InternalSave(), and SimShell::Gui::PTreeEditorWindow::OpenPath().

Here is the caller graph for this function:

void SimShell::Gui::PTreeView::SetClean ( )

Set the view's internal undo stack's current state to be the clean state.

IsClean() will test positive after this.

Definition at line 387 of file PTreeView.cpp.

Referenced by SimShell::Gui::PTreeEditorWindow::Apply().

Here is the caller graph for this function:

void SimShell::Gui::PTreeView::StatusChanged ( QString const &  message)
signal

Emitted when view has some message to share with, for example, a statusbar.

Parameters
messageText message that view wants to make available.

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