Utils::PathChooser Class
class Utils::PathChooserLa classe PathChooser est un contrôle qui permet à l'utilisateur de choisir un chemin d'accès. Ce contrôle se compose d'une zone de QLineEdit s et d'un bouton « Parcourir » ; il peut également, en option, effectuer des substitutions de variables. En savoir plus...
| Header: | #include <PathChooser> |
Types publics
| enum | Kind { ExistingDirectory, Directory, File, SaveFile, ExistingCommand, …, Any } |
Fonctions publiques
| Utils::FilePath | baseDirectory() const |
| QStringList | commandVersionArguments() const |
| Utils::PathChooser::Kind | expectedKind() const |
| Utils::FilePath | filePath() const |
| bool | isReadOnly() const |
| QString | promptDialogFilter() const |
| QString | promptDialogTitle() const |
| void | setBaseDirectory(const Utils::Lazy<Utils::FilePath> &base) |
| void | setCommandVersionArguments(const QStringList &arguments) |
| void | setExpectedKind(Utils::PathChooser::Kind expected) |
| void | setPromptDialogFilter(const QString &filter) |
| void | setPromptDialogTitle(const QString &title) |
| void | setReadOnly(bool b) |
Slots publics
| void | setFilePath(const Utils::FilePath &) |
| void | setPath(const QString &) |
Signaux
| void | textChanged(const QString &text) |
Description détaillée
Cette classe comporte une logique de validation destinée à être intégrée dans QWizardPage.
Documentation sur les types de membres
enum PathChooser::Kind
L'énumération `Kind` décrit le type de chemin qu'une ` PathChooser ` considère comme valide.
| Constante | Valeur | Description |
|---|---|---|
Utils::PathChooser::ExistingDirectory | 0 | Un répertoire existant |
Utils::PathChooser::Directory | 1 | Un répertoire qui n'a pas besoin d'exister |
Utils::PathChooser::File | 2 | Un fichier existant |
Utils::PathChooser::SaveFile | 3 | Un fichier qui n'a pas besoin d'exister |
Utils::PathChooser::ExistingCommand | 4 | Un fichier exécutable qui doit exister au moment de la sélection |
Utils::PathChooser::Command | 5 | Un fichier exécutable qui peut exister ou non au moment de la sélection (par exemple, le résultat d'une compilation) |
Utils::PathChooser::Any | 6 | Aucune restriction sur le chemin sélectionné |
Voir également setExpectedKind() et expectedKind().
Documentation des fonctions membres
Utils::PathChooser::Kind PathChooser::expectedKind() const
Renvoie le type de chemin que l'PathChooser e considère comme valide pour la sélection.
Voir également Utils::PathChooser::Kind et setExpectedKind().
void PathChooser::setExpectedKind(Utils::PathChooser::Kind expected)
Définit le type de chemin d'accès que l'PathChooser me considérera comme valide pour la sélection sur expected.
Voir également Utils::PathChooser::Kind et expectedKind().
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.