Utils::PathChooser Class
class Utils::PathChooserA classe PathChooser é um controle que permite ao usuário escolher um caminho. O controle é composto por um campo de seleção de caminho ( QLineEdit ) e um botão “Procurar” (Browse), e pode, opcionalmente, realizar a substituição de variáveis. Mais...
| Header: | #include <PathChooser> |
Tipos públicos
| enum | Kind { ExistingDirectory, Directory, File, SaveFile, ExistingCommand, …, Any } |
Funções públicas
| 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 públicos
| void | setFilePath(const Utils::FilePath &) |
| void | setPath(const QString &) |
Sinais
| void | textChanged(const QString &text) |
Descrição detalhada
Esta classe possui alguma lógica de validação para ser incorporada em QWizardPage.
Documentação dos tipos de membros
enum PathChooser::Kind
A enumeração `Kind` descreve o tipo de caminho que um ` PathChooser ` considera válido.
| Constante | Valor | Descrição |
|---|---|---|
Utils::PathChooser::ExistingDirectory | 0 | Um diretório existente |
Utils::PathChooser::Directory | 1 | Um diretório que não precisa existir |
Utils::PathChooser::File | 2 | Um arquivo existente |
Utils::PathChooser::SaveFile | 3 | Um arquivo que não precisa existir |
Utils::PathChooser::ExistingCommand | 4 | Um arquivo executável que deve existir no momento da seleção |
Utils::PathChooser::Command | 5 | Um arquivo executável que pode ou não existir no momento da seleção (por exemplo, resultado de uma compilação) |
Utils::PathChooser::Any | 6 | Nenhuma restrição ao caminho selecionado |
Veja também setExpectedKind() e expectedKind().
Documentação da função membro
Utils::PathChooser::Kind PathChooser::expectedKind() const
Retorna o tipo de caminho que o PathChooser considera válido para seleção.
Veja também Utils::PathChooser::Kind e setExpectedKind().
void PathChooser::setExpectedKind(Utils::PathChooser::Kind expected)
Define o tipo de caminho que o PathChooser considerará válido para selecionar em expected.
Veja também Utils::PathChooser::Kind e 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.