Table Of Contents

Previous topic

QListView

Next topic

QListWidget

QUndoView

Inheritance diagram of QUndoView

Synopsis

Functions

Slots

Detailed Description

The PySide.QtGui.QUndoView class displays the contents of a PySide.QtGui.QUndoStack .

PySide.QtGui.QUndoView is a PySide.QtGui.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 PySide.QtGui.QUndoView.setStack() . Alternatively, a PySide.QtGui.QUndoGroup object can be set with PySide.QtGui.QUndoView.setGroup() . The view will then update itself automatically whenever the active stack of the group changes.

../../_images/qundoview.png
class PySide.QtGui.QUndoView(group[, parent=None])
class PySide.QtGui.QUndoView(stack[, parent=None])
class PySide.QtGui.QUndoView([parent=None])
Parameters:

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.

Constructs a new view with parent parent and sets the observed stack to stack .

Constructs a new view with parent parent .

PySide.QtGui.QUndoView.cleanIcon()
Return type:PySide.QtGui.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. PySide.QtGui.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.

PySide.QtGui.QUndoView.emptyLabel()
Return type:unicode

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>”.

PySide.QtGui.QUndoView.group()
Return type:PySide.QtGui.QUndoGroup

Returns the group displayed by this view.

If the view is not looking at group, this function returns 0.

PySide.QtGui.QUndoView.setCleanIcon(icon)
Parameters:iconPySide.QtGui.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. PySide.QtGui.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.

PySide.QtGui.QUndoView.setEmptyLabel(label)
Parameters:label – unicode

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>”.

PySide.QtGui.QUndoView.setGroup(group)
Parameters:groupPySide.QtGui.QUndoGroup

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.

PySide.QtGui.QUndoView.setStack(stack)
Parameters:stackPySide.QtGui.QUndoStack

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 PySide.QtGui.QUndoGroup , the group is set to 0.

PySide.QtGui.QUndoView.stack()
Return type:PySide.QtGui.QUndoStack

Returns the stack currently displayed by this view. If the view is looking at a PySide.QtGui.QUndoGroup , this the group’s active stack.