8#include <QtGui/private/qtguiglobal_p.h>
9#include <private/qobject_p.h>
10#include <QtCore/qlist.h>
11#include <QtCore/qstring.h>
13# include <QtGui/qaction.h>
44#if QT_CONFIG(undostack)
46class QUndoStackPrivate :
public QObjectPrivate
48 Q_DECLARE_PUBLIC(QUndoStack)
50 QUndoStackPrivate() : index(0), clean_index(0), group(
nullptr), undo_limit(0) {}
53
54
55
56
62 bool operator!=(
const ActionState &other)
const noexcept
64 return enabled != other.enabled || text != other.text;
68 QList<QUndoCommand*> command_list;
69 QList<QUndoCommand*> macro_stack;
74 ActionState undoActionState;
75 ActionState redoActionState;
77 void setIndex(
int idx,
bool clean);
78 bool checkUndoLimit();
81 static void setPrefixedText(QAction *action,
const QString &prefix,
const QString &defaultText,
const QString &text);
QList< QUndoCommand * > child_list
The QUndoCommand class is the base class of all commands stored on a QUndoStack.
The QUndoGroup class is a group of QUndoStack objects.
QT_REQUIRE_CONFIG(undogroup)
QT_REQUIRE_CONFIG(thread)