QUndoView Class Reference

[ QtGui module]

QUndoView 类显示内容为 QUndoStack . 更多...

继承 QListView .

方法


详细描述

QUndoView 类显示内容为 QUndoStack .

QUndoView 是 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.

堆栈可以被明确设置采用 setStack ()。另外, QUndoGroup 对象可以被设置采用 setGroup (). The view will then update itself automatically whenever the active stack of the group 改变。


方法文档编制

QUndoView.__init__ ( self , QWidget   parent  = None)

parent argument, if not None, causes self to be owned by Qt instead of PyQt.

构造新视图采用父级 parent .

QUndoView.__init__ ( self , QUndoStack   stack , QWidget   parent  = None)

parent argument, if not None, causes self to be owned by Qt instead of PyQt.

构造新视图采用父级 parent and sets the observed stack to stack .

QUndoView.__init__ ( self , QUndoGroup   group , QWidget   parent  = None)

parent argument, if not None, causes self to be owned by Qt instead of PyQt.

构造新视图采用父级 parent and sets the observed group to group .

The view will update itself autmiatically whenever the active stack of the group changes.

QIcon QUndoView.cleanIcon ( self )

QString QUndoView.emptyLabel ( self )

QUndoGroup QUndoView.group ( self )

Returns the group displayed by this view.

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

另请参阅 setGroup () and setStack ().

QUndoView.setCleanIcon ( self , QIcon   icon )

QUndoView.setEmptyLabel ( self , QString  label )

QUndoView.setGroup ( self , QUndoGroup   group )

This method is also a Qt slot with the C++ signature void setGroup(QUndoGroup*) .

Sets the group displayed by this view to group 。若 group is 0, the view will be empty.

The view will update itself autmiatically whenever the active stack of the group changes.

另请参阅 group () 和 setStack ().

QUndoView.setStack ( self , QUndoStack   stack )

This method is also a Qt slot with the C++ signature void setStack(QUndoStack*) .

Sets the stack displayed by this view to stack 。若 stack is 0, the view will be empty.

If the view was previously looking at a QUndoGroup , the group is set to 0.

另请参阅 stack () 和 setGroup ().

QUndoStack QUndoView.stack ( self )

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

另请参阅 setStack () and setGroup ().