BornAgain
1.19.0
Simulate and fit neutron and x-ray scattering at grazing incidence
|
Default undo stack implementation. More...
Classes | |
struct | UndoStackImpl |
Public Member Functions | |
UndoStack () | |
~UndoStack () override | |
void | beginMacro (const std::string &name) override |
bool | canRedo () const override |
bool | canUndo () const override |
void | clear () override |
int | count () const override |
void | endMacro () override |
void | execute (std::shared_ptr< AbstractItemCommand > command) override |
Executes the command, then pushes it in the stack for possible undo. More... | |
int | index () const override |
bool | isActive () const override |
void | redo () override |
void | setUndoLimit (int limit) override |
void | undo () override |
Static Public Member Functions | |
static QUndoStack * | qtUndoStack (UndoStackInterface *stack_interface) |
Returns underlying QUndoStack if given object can be casted to UndoStack instance. More... | |
Private Attributes | |
std::unique_ptr< UndoStackImpl > | p_impl |
Default undo stack implementation.
Internally relies on QUndoStack. It serves two goals: a) hides Qt usage b) simplifies future refactoring toward Qt-independent libmvvm_model library.
Definition at line 30 of file undostack.h.
UndoStack::UndoStack | ( | ) |
Definition at line 27 of file undostack.cpp.
|
overridedefault |
|
overridevirtual |
Implements ModelView::UndoStackInterface.
Definition at line 94 of file undostack.cpp.
References RealSpace::Particles::name(), and p_impl.
|
overridevirtual |
Implements ModelView::UndoStackInterface.
Definition at line 48 of file undostack.cpp.
References p_impl.
Referenced by TEST_F().
|
overridevirtual |
Implements ModelView::UndoStackInterface.
Definition at line 43 of file undostack.cpp.
References p_impl.
Referenced by TEST_F().
|
overridevirtual |
Implements ModelView::UndoStackInterface.
Definition at line 73 of file undostack.cpp.
References p_impl.
|
overridevirtual |
Implements ModelView::UndoStackInterface.
Definition at line 58 of file undostack.cpp.
References p_impl.
Referenced by TEST_F().
|
overridevirtual |
Implements ModelView::UndoStackInterface.
Definition at line 99 of file undostack.cpp.
References p_impl.
|
overridevirtual |
Executes the command, then pushes it in the stack for possible undo.
Implements ModelView::UndoStackInterface.
Definition at line 29 of file undostack.cpp.
References p_impl.
Referenced by TEST_F().
|
overridevirtual |
Implements ModelView::UndoStackInterface.
Definition at line 53 of file undostack.cpp.
References p_impl.
Referenced by TEST_F().
|
overridevirtual |
Implements ModelView::UndoStackInterface.
Definition at line 38 of file undostack.cpp.
References p_impl.
|
static |
Returns underlying QUndoStack if given object can be casted to UndoStack instance.
This method is used to "convert" current instance to Qt implementation, and use it with other Qt widgets, if necessary.
Definition at line 87 of file undostack.cpp.
|
overridevirtual |
Implements ModelView::UndoStackInterface.
Definition at line 68 of file undostack.cpp.
References p_impl.
Referenced by TEST_F().
|
overridevirtual |
Implements ModelView::UndoStackInterface.
Definition at line 78 of file undostack.cpp.
References p_impl.
|
overridevirtual |
Implements ModelView::UndoStackInterface.
Definition at line 63 of file undostack.cpp.
References p_impl.
Referenced by TEST_F().
|
private |
Definition at line 55 of file undostack.h.
Referenced by beginMacro(), canRedo(), canUndo(), clear(), count(), endMacro(), execute(), index(), isActive(), redo(), setUndoLimit(), and undo().