BornAgain  1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
ModelView::UndoStackInterface Class Referenceabstract

Interface class for undo/redo stack. More...

Inheritance diagram for ModelView::UndoStackInterface:
[legend]

Public Member Functions

virtual ~UndoStackInterface ()=default
 
virtual void beginMacro (const std::string &name)=0
 
virtual bool canRedo () const =0
 
virtual bool canUndo () const =0
 
virtual void clear ()=0
 
virtual int count () const =0
 
virtual void endMacro ()=0
 
virtual void execute (std::shared_ptr< AbstractItemCommand > command)=0
 Executes the command, then pushes it in the stack for possible undo. More...
 
virtual int index () const =0
 
virtual bool isActive () const =0
 
virtual void redo ()=0
 
virtual void setUndoLimit (int limit)=0
 
virtual void undo ()=0
 

Detailed Description

Interface class for undo/redo stack.

Definition at line 29 of file undostackinterface.h.

Constructor & Destructor Documentation

◆ ~UndoStackInterface()

virtual ModelView::UndoStackInterface::~UndoStackInterface ( )
virtualdefault

Member Function Documentation

◆ beginMacro()

virtual void ModelView::UndoStackInterface::beginMacro ( const std::string &  name)
pure virtual

◆ canRedo()

virtual bool ModelView::UndoStackInterface::canRedo ( ) const
pure virtual

Implemented in ModelView::UndoStack.

Referenced by TEST_F().

◆ canUndo()

virtual bool ModelView::UndoStackInterface::canUndo ( ) const
pure virtual

Implemented in ModelView::UndoStack.

Referenced by TEST_F().

◆ clear()

virtual void ModelView::UndoStackInterface::clear ( )
pure virtual

◆ count()

virtual int ModelView::UndoStackInterface::count ( ) const
pure virtual

Implemented in ModelView::UndoStack.

Referenced by TEST_F().

◆ endMacro()

◆ execute()

virtual void ModelView::UndoStackInterface::execute ( std::shared_ptr< AbstractItemCommand command)
pure virtual

Executes the command, then pushes it in the stack for possible undo.

Current design relies on shared pointer. This is done a) to retrieve result of the command from another place b) to adapt the command for QUndoStack c) to bypass QUndoStack behavior which wants to have an ownership

Implemented in ModelView::UndoStack.

◆ index()

virtual int ModelView::UndoStackInterface::index ( ) const
pure virtual

Implemented in ModelView::UndoStack.

Referenced by TEST_F().

◆ isActive()

virtual bool ModelView::UndoStackInterface::isActive ( ) const
pure virtual

Implemented in ModelView::UndoStack.

◆ redo()

virtual void ModelView::UndoStackInterface::redo ( )
pure virtual

◆ setUndoLimit()

virtual void ModelView::UndoStackInterface::setUndoLimit ( int  limit)
pure virtual

Implemented in ModelView::UndoStack.

◆ undo()

virtual void ModelView::UndoStackInterface::undo ( )
pure virtual

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