QUndoView Class
The QUndoView class displays the contents of a QUndoStack. 更多...
头文件: | #include <QUndoView> |
qmake: | QT += widgets |
开始支持版本: | Qt 4.2 |
基类: | QListView |
属性
- cleanIcon : QIcon
- emptyLabel : QString
- 13 个属性继承自 QListView
- 16 个属性继承自 QAbstractItemView
- 3 个属性继承自 QAbstractScrollArea
- 6 个属性继承自 QFrame
- 59 个属性继承自 QWidget
- 1 个属性继承自 QObject
公有函数
QUndoView(QWidget *parent = Q_NULLPTR) | |
QUndoView(QUndoStack *stack, QWidget *parent = Q_NULLPTR) | |
QUndoView(QUndoGroup *group, QWidget *parent = Q_NULLPTR) | |
~QUndoView() | |
QIcon | cleanIcon() const |
QString | emptyLabel() const |
QUndoGroup * | group() const |
void | setCleanIcon(const QIcon &icon) |
void | setEmptyLabel(const QString &label) |
QUndoStack * | stack() const |
- 32 个公有函数继承自 QListView
- 59 个公有函数继承自 QAbstractItemView
- 20 个公有函数继承自 QAbstractScrollArea
- 14 个公有函数继承自 QFrame
- 214 个公有函数继承自 QWidget
- 32 个公有函数继承自 QObject
- 14 个公有函数继承自 QPaintDevice
公有槽函数
- 9 个公有槽函数继承自 QAbstractItemView
- 19 个公有槽函数继承自 QWidget
- 1 个公有槽函数继承自 QObject
其他继承的成员
- 1 个信号继承自 QListView
- 7 个信号继承自 QAbstractItemView
- 3 个信号继承自 QWidget
- 2 个信号继承自 QObject
- 1 个公有变量继承自 QObject
- 5 个静态公有成员继承自 QWidget
- 10 个静态公有成员继承自 QObject
- 28 个受保护的函数继承自 QListView
- 37 个受保护的函数继承自 QAbstractItemView
- 20 个受保护的函数继承自 QAbstractScrollArea
- 4 个受保护的函数继承自 QFrame
- 35 个受保护的函数继承自 QWidget
- 9 个受保护的函数继承自 QObject
- 1 个受保护的函数继承自 QPaintDevice
- 9 个受保护的槽函数继承自 QAbstractItemView
- 1 个受保护的槽函数继承自 QWidget
- 2 个受保护的变量继承自 QObject
- 1 protected type inherited from QPaintDevice
详细描述
The QUndoView class displays the contents of a QUndoStack.
QUndoView is a QListView which displays the list of commands pushed on an undo stack. The most recently executed command is always selected. Selecting a different command results in a call to QUndoStack::setIndex(), rolling the state of the document backwards or forward to the new command.
The stack can be set explicitly with setStack(). Alternatively, a QUndoGroup object can be set with setGroup(). The view will then update itself automatically whenever the active stack of the group changes.
属性
cleanIcon : QIcon
This property holds the icon used to represent the clean state.
A stack may have a clean state set with QUndoStack::setClean(). This is usually the state of the document at the point it was saved. QUndoView can display an icon in the list of commands to show the clean state. If this property is a null icon, no icon is shown. The default value is the null icon.
访问函数:
QIcon | cleanIcon() const |
void | setCleanIcon(const QIcon &icon) |
emptyLabel : QString
This property holds the label used for the empty state.
The empty label is the topmost element in the list of commands, which represents the state of the document before any commands were pushed on the stack. The default is the string "<empty>".
访问函数:
QString | emptyLabel() const |
void | setEmptyLabel(const QString &label) |
成员函数
QUndoView::QUndoView(QWidget *parent = Q_NULLPTR)
Constructs a new view with parent parent.
QUndoView::QUndoView(QUndoStack *stack, QWidget *parent = Q_NULLPTR)
Constructs a new view with parent parent and sets the observed stack to stack.
QUndoView::QUndoView(QUndoGroup *group, QWidget *parent = Q_NULLPTR)
Constructs a new view with parent parent and sets the observed group to group.
The view will update itself autmiatically whenever the active stack of the group changes.
QUndoView::~QUndoView()
Destroys this view.
QUndoGroup *QUndoView::group() const
Returns the group displayed by this view.
If the view is not looking at group, this function returns 0.
[slot]
void QUndoView::setGroup(QUndoGroup *group)
Sets the group displayed by this view to group. If group is 0, the view will be empty.
The view will update itself autmiatically whenever the active stack of the group changes.
[slot]
void QUndoView::setStack(QUndoStack *stack)
Sets the stack displayed by this view to stack. If stack is 0, the view will be empty.
If the view was previously looking at a QUndoGroup, the group is set to 0.
QUndoStack *QUndoView::stack() const
Returns the stack currently displayed by this view. If the view is looking at a QUndoGroup, this the group's active stack.