Utils::PathChooser Class
class Utils::PathChooserКласс PathChooser представляет собой элемент управления, позволяющий пользователю выбрать путь. Этот элемент управления состоит из поля ввода с выделением ( QLineEdit ) и кнопки «Обзор» (Browse), а также может, при необходимости, выполнять подстановку переменных. Подробнее...
| Header: | #include <PathChooser> |
Публичные типы
| enum | Kind { ExistingDirectory, Directory, File, SaveFile, ExistingCommand, …, Any } |
Публичные функции
| 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) |
Публичные слоты
| void | setFilePath(const Utils::FilePath &) |
| void | setPath(const QString &) |
Сигналы
| void | textChanged(const QString &text) |
Подробное описание
Этот класс содержит логику проверки, предназначенную для встраивания в QWizardPage.
Документация по типам-членам
enum PathChooser::Kind
Перечисление `Kind` описывает тип пути, который сервис PathChooser считает допустимым.
| Константа | Значение | Описание |
|---|---|---|
Utils::PathChooser::ExistingDirectory | 0 | Существующий каталог |
Utils::PathChooser::Directory | 1 | Каталог, который не обязательно должен существовать |
Utils::PathChooser::File | 2 | Существующий файл |
Utils::PathChooser::SaveFile | 3 | Файл, который не обязательно должен существовать |
Utils::PathChooser::ExistingCommand | 4 | Исполняемый файл, который должен существовать на момент выбора |
Utils::PathChooser::Command | 5 | Исполняемый файл, который может как существовать, так и не существовать на момент выбора (например, результат сборки) |
Utils::PathChooser::Any | 6 | Нет ограничений на выбранный путь |
См. также setExpectedKind() и expectedKind().
Документация по функциям-членам
Utils::PathChooser::Kind PathChooser::expectedKind() const
Возвращает тип пути, который PathChooser считает допустимым для выбора.
См. также Utils::PathChooser::Kind и setExpectedKind().
void PathChooser::setExpectedKind(Utils::PathChooser::Kind expected)
Устанавливает тип пути, который PathChooser будет считать допустимым для перехода на сайт expected.
См. также Utils::PathChooser::Kind и 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.