An undo/redo stack for map operations with a configurable maximum depth.
More...
#include <mapundostack.h>
|
| | MapUndoStack (QObject *parent=nullptr) |
| |
| int | maxUndoCount () const |
| | Returns the maximum number of undoable steps stored (0 = unlimited).
|
| |
| void | setMaxUndoCount (int count) |
| | Sets the maximum number of stored undo operations.
|
| |
| void | loadSettings () |
| | Convenience: loads the undo limit from QSettings (key "MapCanvas/undoLimit").
|
| |
| void | saveSettings () const |
| | Saves the current undo limit to QSettings.
|
| |
An undo/redo stack for map operations with a configurable maximum depth.
Extends QUndoStack to expose the undo limit as a Q_PROPERTY so it can be configured in the application settings and bound to UI controls.
The default limit is 50 operations. Set to 0 for unlimited.
Usage:
stack->push(new PanCommand(oldExtent, newExtent, canvas));
stack->undo();
An undo/redo stack for map operations with a configurable maximum depth.
Definition mapundostack.h:117
void setMaxUndoCount(int count)
Sets the maximum number of stored undo operations.
Definition mapundostack.cpp:53
◆ MapUndoStack()
| MapUndoStack::MapUndoStack |
( |
QObject * |
parent = nullptr | ) |
|
|
explicit |
◆ loadSettings()
| void MapUndoStack::loadSettings |
( |
| ) |
|
Convenience: loads the undo limit from QSettings (key "MapCanvas/undoLimit").
◆ maxUndoCount()
| int MapUndoStack::maxUndoCount |
( |
| ) |
const |
Returns the maximum number of undoable steps stored (0 = unlimited).
◆ maxUndoCountChanged
| void MapUndoStack::maxUndoCountChanged |
( |
int |
count | ) |
|
|
signal |
◆ saveSettings()
| void MapUndoStack::saveSettings |
( |
| ) |
const |
Saves the current undo limit to QSettings.
◆ setMaxUndoCount()
| void MapUndoStack::setMaxUndoCount |
( |
int |
count | ) |
|
Sets the maximum number of stored undo operations.
If the current stack depth exceeds the new limit, oldest commands are silently discarded.
- Parameters
-
| count | Maximum depth; 0 means unlimited. |
◆ maxUndoCount
| int MapUndoStack::maxUndoCount |
|
readwrite |
The documentation for this class was generated from the following files: