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.
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 .
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.
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>”.
Return type: | PySide.QtGui.QUndoGroup |
---|
Returns the group displayed by this view.
If the view is not looking at group, this function returns 0.
Parameters: | icon – 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.
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>”.
Parameters: | group – PySide.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.
Parameters: | stack – PySide.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.
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.