Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Toutes les fonctions  ·  Vues d'ensemble  · 

QUndoView Class Reference
[QtGui module]

The QUndoView class displays the contents of a QUndoStack. More...

 #include <QUndoView>

Inherits QListView.

This class was introduced in Qt 4.2.

Properties

Public Functions

Public Slots

Additional Inherited Members


Detailed Description

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.


Property Documentation

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.

Access functions:

  • 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>".

Access functions:

  • QString emptyLabel () const
  • void setEmptyLabel ( const QString & label )

Member Function Documentation

QUndoView::QUndoView ( QWidget * parent = 0 )

Constructs a new view with parent parent.

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

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

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

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.

See also setGroup() and setStack().

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

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.

See also group() and setStack().

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

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.

See also stack() and setGroup().

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.

See also setStack() and setGroup().

Publicité

Best Of

Actualités les plus lues

Semaine
Mois
Année
  1. « Quelque chose ne va vraiment pas avec les développeurs "modernes" », un développeur à "l'ancienne" critique la multiplication des bibliothèques 94
  2. Apercevoir la troisième dimension ou l'utilisation multithreadée d'OpenGL dans Qt, un article des Qt Quarterly traduit par Guillaume Belz 0
  3. Pourquoi les programmeurs sont-ils moins payés que les gestionnaires de programmes ? Manquent-ils de pouvoir de négociation ? 47
  4. Les développeurs ignorent-ils trop les failles découvertes dans leur code ? Prenez-vous en compte les remarques des autres ? 17
  5. Les développeurs détestent-ils les antivirus ? Un programmeur manifeste sa haine envers ces solutions de sécurité 12
  6. Quelles nouveautés de C++11 Visual C++ doit-il rapidement intégrer ? Donnez-nous votre avis 10
  7. Qt Commercial : Digia organise un webinar gratuit le 27 mars sur la conception d'interfaces utilisateur et d'applications avec le framework 0
Page suivante

Le blog Digia au hasard

Logo

Une nouvelle ère d'IHM 3D pour les automobiles

Le blog Digia est l'endroit privilégié pour la communication sur l'édition commerciale de Qt, où des réponses publiques sont apportées aux questions les plus posées au support. Lire l'article.

Communauté

Ressources

Liens utiles

Contact

  • Vous souhaitez rejoindre la rédaction ou proposer un tutoriel, une traduction, une question... ? Postez dans le forum Contribuez ou contactez-nous par MP ou par email (voir en bas de page).

Qt dans le magazine

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 4.5
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web