Sur cette page

Utils::Action Class

class Utils::Action

La classe Action est destinée aux actions qui agissent sur un paramètre « actuel » de type chaîne de caractères (généralement un nom de fichier), par exemple « Enregistrer le fichier %1 ». En savoir plus…

Header: #include <Action>

Fonctions publiques

QString emptyText() const
Utils::Action::EnablingMode enablingMode() const
QString parameterText() const
void setEmptyText(const QString &)
void setEnablingMode(Utils::Action::EnablingMode m)
void setParameterText(const QString &)

Description détaillée

L'action comporte 2 états :

  • <aucun paramètre actuel> : affiche « Faire XX » (texte vide)
  • <paramètre présent> : affiche « Faire XX avec %1 ».

Fournit un champ permettant de définir le paramètre, ce qui modifie l’affichage et l’état d’activation en conséquence. Le texte transmis doit déjà être traduit ; parameterText doit contenir un %1 à l’endroit où le paramètre doit être inséré.

Copyright © The Qt Company Ltd. and other contributors. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU 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.