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
qundoview.h
Go to the documentation of this file.
1// Copyright (C) 2016 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 QUNDOVIEW_H
5#define QUNDOVIEW_H
6
7#include <QtWidgets/qtwidgetsglobal.h>
8#include <QtWidgets/qlistview.h>
9#include <QtCore/qstring.h>
10
12
14
16class QUndoStack;
17class QUndoGroup;
18class QIcon;
19
20
21class Q_WIDGETS_EXPORT QUndoView : public QListView
22{
24 Q_DECLARE_PRIVATE(QUndoView)
25 Q_PROPERTY(QString emptyLabel READ emptyLabel WRITE setEmptyLabel)
26 Q_PROPERTY(QIcon cleanIcon READ cleanIcon WRITE setCleanIcon)
27
28public:
29 explicit QUndoView(QWidget *parent = nullptr);
30 explicit QUndoView(QUndoStack *stack, QWidget *parent = nullptr);
31#if QT_CONFIG(undogroup)
32 explicit QUndoView(QUndoGroup *group, QWidget *parent = nullptr);
33#endif
34 ~QUndoView();
35
36 QUndoStack *stack() const;
37#if QT_CONFIG(undogroup)
38 QUndoGroup *group() const;
39#endif
40
41 void setEmptyLabel(const QString &label);
42 QString emptyLabel() const;
43
44 void setCleanIcon(const QIcon &icon);
45 QIcon cleanIcon() const;
46
47public Q_SLOTS:
48 void setStack(QUndoStack *stack);
49#if QT_CONFIG(undogroup)
50 void setGroup(QUndoGroup *group);
51#endif
52
53private:
54 Q_DISABLE_COPY(QUndoView)
55};
56
58
59#endif // QUNDOVIEW_H
The QIcon class provides scalable icons in different modes and states.
Definition qicon.h:20
The QListView class provides a list or icon view onto a model.
Definition qlistview.h:17
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
The QUndoGroup class is a group of QUndoStack objects.
Definition qundogroup.h:20
The QUndoView class displays the contents of a QUndoStack.
Definition qundoview.h:22
The QWidget class is the base class of all user interface objects.
Definition qwidget.h:99
Combined button and popup list for selecting options.
GLboolean GLuint group
GLuint GLsizei const GLchar * label
[43]
#define QT_REQUIRE_CONFIG(feature)
#define Q_PROPERTY(...)
#define Q_OBJECT
#define Q_SLOTS
#define explicit