The SetAutoNumContextCommand class Undo/redo wrapper around one of QETProject's add*AutoNum() setters (conductor/element/folio numerotation counters). Placing an auto-numbered item advances one of these counters as a side effect; without this command the counter change sits outside the undo stack entirely, so undoing the placement removes the visible number but leaves the counter advanced, silently burning it.
More...
#include <setautonumcontextcommand.h>
Inherits QUndoCommand.
The SetAutoNumContextCommand class Undo/redo wrapper around one of QETProject's add*AutoNum() setters (conductor/element/folio numerotation counters). Placing an auto-numbered item advances one of these counters as a side effect; without this command the counter change sits outside the undo stack entirely, so undoing the placement removes the visible number but leaves the counter advanced, silently burning it.
◆ Setter
◆ SetAutoNumContextCommand()
SetAutoNumContextCommand::SetAutoNumContextCommand.
- Parameters
-
| setter | the QETProject setter to call on undo/redo (addConductorAutoNum/addElementAutoNum/addFolioAutoNum, bound to a project) |
| key | the numerotation context's name/key |
| old_context | the context's value before this placement |
| new_context | the context's value after this placement |
| parent | parent undo command |
◆ redo()
| void SetAutoNumContextCommand::redo |
( |
| ) |
|
|
override |
◆ undo()
| void SetAutoNumContextCommand::undo |
( |
| ) |
|
|
override |
◆ m_key
| QString SetAutoNumContextCommand::m_key |
|
private |
◆ m_new_context
◆ m_old_context
◆ m_setter
| Setter SetAutoNumContextCommand::m_setter |
|
private |
The documentation for this class was generated from the following files: