Movatterモバイル変換


[0]ホーム

URL:


We bake cookies in your browser for a better experience. Using this site means that you consent.Read More

Menu

Qt Documentation

QUndoView Class

TheQUndoView class displays the contents of aQUndoStack.More...

Header:#include <QUndoView>
Since: Qt 4.2
Inherits:QListView

Properties

Public Functions

QUndoView(QWidget * parent = 0)
QUndoView(QUndoStack * stack, QWidget * parent = 0)
QUndoView(QUndoGroup * group, QWidget * parent = 0)
~QUndoView()
QIconcleanIcon() const
QStringemptyLabel() const
QUndoGroup *group() const
voidsetCleanIcon(const QIcon & icon)
voidsetEmptyLabel(const QString & label)
QUndoStack *stack() const

Public Slots

voidsetGroup(QUndoGroup * group)
voidsetStack(QUndoStack * stack)

Additional Inherited Members

Detailed Description

TheQUndoView class displays the contents of aQUndoStack.

QUndoView is aQListView 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 toQUndoStack::setIndex(), rolling the state of the document backwards or forward to the new command.

The stack can be set explicitly withsetStack(). Alternatively, aQUndoGroup object can be set withsetGroup(). The view will then update itself automatically whenever the active stack of the group changes.

Property Documentation

cleanIcon :QIcon

This property holds the icon used to represent the clean state.

A stack may have a clean state set withQUndoStack::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.

Access functions:

QIconcleanIcon() const
voidsetCleanIcon(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>".

Access functions:

QStringemptyLabel() const
voidsetEmptyLabel(const QString & label)

Member Function Documentation

QUndoView::QUndoView(QWidget * parent = 0)

Constructs a new view with parentparent.

QUndoView::QUndoView(QUndoStack * stack,QWidget * parent = 0)

Constructs a new view with parentparent and sets the observed stack tostack.

QUndoView::QUndoView(QUndoGroup * group,QWidget * parent = 0)

Constructs a new view with parentparent and sets the observed group togroup.

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.

See alsosetGroup() andsetStack().

[slot]void QUndoView::setGroup(QUndoGroup * group)

Sets the group displayed by this view togroup. Ifgroup is 0, the view will be empty.

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

See alsogroup() andsetStack().

[slot]void QUndoView::setStack(QUndoStack * stack)

Sets the stack displayed by this view tostack. Ifstack is 0, the view will be empty.

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

See alsostack() andsetGroup().

QUndoStack * QUndoView::stack() const

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

See alsosetStack() andsetGroup().

© 2016 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of theGNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.


[8]ページ先頭

©2009-2025 Movatter.jp