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 friend bool operator==(
const ActionState &lhs,
const ActionState &rhs)
noexcept
63#ifdef __cpp_impl_three_way_comparison
66 {
return lhs.enabled == rhs.enabled && lhs.text == rhs.text; }
67 friend bool operator!=(
const ActionState &lhs,
const ActionState &rhs)
noexcept
68 {
return !(lhs == rhs); }
71 friend void qHash(
const ActionState &key, size_t seed) =
delete;
72 friend void qHash(
const ActionState &key) =
delete;
75 QList<QUndoCommand*> command_list;
76 QList<QUndoCommand*> macro_stack;
81 ActionState undoActionState;
82 ActionState redoActionState;
84 void setIndex(
int idx,
bool clean);
85 bool checkUndoLimit();
88 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)
Combined button and popup list for selecting options.
QT_REQUIRE_CONFIG(thread)