Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Toggle main menu visibility
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
// Qt-Security score:significant reason:default
4
5
#
ifndef
QUNDOVIEW_H
6
#
define
QUNDOVIEW_H
7
8
#
include
<
QtWidgets
/
qtwidgetsglobal
.
h
>
9
#
include
<
QtWidgets
/
qlistview
.
h
>
10
#
include
<
QtCore
/
qstring
.
h
>
11
12
QT_REQUIRE_CONFIG
(
undoview
);
13
14
QT_BEGIN_NAMESPACE
15
16
class
QUndoViewPrivate;
17
class
QUndoStack;
18
class
QUndoGroup;
19
class
QIcon;
20
21
22
class
Q_WIDGETS_EXPORT
QUndoView
:
public
QListView
23
{
24
Q_OBJECT
25
Q_DECLARE_PRIVATE(QUndoView)
26
Q_PROPERTY(QString emptyLabel READ emptyLabel WRITE setEmptyLabel)
27
Q_PROPERTY(QIcon cleanIcon READ cleanIcon WRITE setCleanIcon)
28
29
public
:
30
explicit
QUndoView(QWidget *parent =
nullptr
);
31
explicit
QUndoView(QUndoStack *stack, QWidget *parent =
nullptr
);
32
#
if
QT_CONFIG
(
undogroup
)
33
explicit
QUndoView(QUndoGroup *group, QWidget *parent =
nullptr
);
34
#
endif
35
~QUndoView();
36
37
QUndoStack *stack()
const
;
38
#
if
QT_CONFIG
(
undogroup
)
39
QUndoGroup *group()
const
;
40
#
endif
41
42
void
setEmptyLabel(
const
QString &label);
43
QString emptyLabel()
const
;
44
45
void
setCleanIcon(
const
QIcon &icon);
46
QIcon cleanIcon()
const
;
47
48
public
Q_SLOTS:
49
void
setStack(QUndoStack *stack);
50
#
if
QT_CONFIG
(
undogroup
)
51
void
setGroup(QUndoGroup *group);
52
#
endif
53
54
private
:
55
Q_DISABLE_COPY(QUndoView)
56
};
57
58
QT_END_NAMESPACE
59
60
#
endif
// QUNDOVIEW_H
QUndoModel
Definition
qundoview.cpp:19
QUndoModel::selectionModel
QItemSelectionModel * selectionModel() const
Definition
qundoview.cpp:67
QUndoModel::setCleanIcon
void setCleanIcon(const QIcon &icon)
Definition
qundoview.cpp:205
QUndoModel::emptyLabel
QString emptyLabel() const
Definition
qundoview.cpp:194
QUndoModel::data
virtual QVariant data(const QModelIndex &index, int role=Qt::DisplayRole) const override
Returns the data stored under the given role for the item referred to by the index.
Definition
qundoview.cpp:170
QUndoModel::setEmptyLabel
void setEmptyLabel(const QString &label)
Definition
qundoview.cpp:199
QUndoModel::stack
QUndoStack * stack() const
Definition
qundoview.cpp:72
QUndoModel::columnCount
virtual int columnCount(const QModelIndex &parent=QModelIndex()) const override
Returns the number of columns for the children of the given parent.
Definition
qundoview.cpp:165
QUndoModel::selectedIndex
QModelIndex selectedIndex() const
Definition
qundoview.cpp:127
QUndoModel::index
virtual QModelIndex index(int row, int column, const QModelIndex &parent=QModelIndex()) const override
Returns the index of the item in the model specified by the given row, column and parent index.
Definition
qundoview.cpp:132
QUndoModel::cleanIcon
QIcon cleanIcon() const
Definition
qundoview.cpp:211
QUndoModel::parent
virtual QModelIndex parent(const QModelIndex &child) const override
Definition
qundoview.cpp:149
QUndoModel::rowCount
virtual int rowCount(const QModelIndex &parent=QModelIndex()) const override
Returns the number of rows under the given parent.
Definition
qundoview.cpp:154
QUndoViewPrivate
Definition
qundoview.cpp:237
QUndoViewPrivate::init
void init()
Definition
qundoview.cpp:254
QUndoView
The QUndoView class displays the contents of a QUndoStack.
Definition
qundoview.h:23
QT_BEGIN_NAMESPACE
Combined button and popup list for selecting options.
Definition
qsequentialanimationgroup.cpp:47
QT_REQUIRE_CONFIG
QT_REQUIRE_CONFIG(undoview)
qtbase
src
widgets
util
qundoview.h
Generated on
for Qt by
1.18.0