Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qundostack_p.h
Go to the documentation of this file.
1// Copyright (C) 2020 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QUNDOSTACK_P_H
5#define QUNDOSTACK_P_H
6
7#include <QtGui/private/qtguiglobal_p.h>
8#include <private/qobject_p.h>
9#include <QtCore/qlist.h>
10#include <QtCore/qstring.h>
11#if QT_CONFIG(action)
12# include <QtGui/qaction.h>
13#endif
14
15#include "qundostack.h"
16
18class QUndoCommand;
19class QUndoGroup;
20
21//
22// W A R N I N G
23// -------------
24//
25// This file is not part of the Qt API. It exists purely as an
26// implementation detail. This header file may change from version to
27// version without notice, or even be removed.
28//
29// We mean it.
30//
31
33{
34public:
36 QList<QUndoCommand*> child_list;
39 int id;
41};
42
43#if QT_CONFIG(undostack)
44
45class QUndoStackPrivate : public QObjectPrivate
46{
47 Q_DECLARE_PUBLIC(QUndoStack)
48public:
49 QUndoStackPrivate() : index(0), clean_index(0), group(nullptr), undo_limit(0) {}
50
51 QList<QUndoCommand*> command_list;
52 QList<QUndoCommand*> macro_stack;
53 int index;
54 int clean_index;
56 int undo_limit;
57
58 void setIndex(int idx, bool clean);
59 bool checkUndoLimit();
60
61#ifndef QT_NO_ACTION
62 static void setPrefixedText(QAction *action, const QString &prefix, const QString &defaultText, const QString &text);
63#endif
64};
65
67#endif // QT_CONFIG(undostack)
68#endif // QUNDOSTACK_P_H
The QAction class provides an abstraction for user commands that can be added to different user inter...
Definition qaction.h:30
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
QList< QUndoCommand * > child_list
The QUndoGroup class is a group of QUndoStack objects.
Definition qundogroup.h:20
QString text
Combined button and popup list for selecting options.
static void setIndex(int *index, int candidate, int min, int max, bool isIncreasing)
Definition qmdiarea.cpp:175
GLuint index
[2]
GLenum GLuint id
[7]
GLboolean GLuint group