Utils::FilePathAspect Class
class Utils::FilePathAspectАспект «путь к файлу» представляет собой поверхностную оболочку вокруг объекта « Utils::StringAspect », который представляет файл в файловой системе. Подробнее...
| Header: | #include <FilePathAspect> |
| Inherits: | Utils::TypedAspect |
Публичные функции
| Utils::FilePath | effectiveBinary() const |
| void | makeCheckable(Utils::CheckBoxPlacement checkBoxPlacement, const QString &checkerLabel, const Utils::Key &checkerKey) |
| void | setExpectedKind(const Utils::PathChooser::Kind expectedKind) |
| void | setValue(const Utils::FilePath &filePath, Utils::BaseAspect::Announcement howToAnnounce = DoEmit) |
| Utils::FilePath | operator()() const |
Переопределённые общедоступные функции
| virtual void | fromMap(const Utils::Store &map) override |
| virtual void | toMap(Utils::Store &map) const override |
Подробное описание
По умолчанию отображается с использованием Utils::PathChooser.
Визуальное представление часто содержит метку перед отображением фактического значения.
См. также « Utils::StringAspect ».
Документация по функциям-членам
Utils::FilePath FilePathAspect::effectiveBinary() const
Возвращает полный путь к команде set. Имеет значение только в том случае, если ожидаемый тип — Command или ExistingCommand, а текущий путь к файлу представляет собой исполняемый файл, указанный без пути. При необходимости выполняется поиск в переменной PATH.
[override virtual] void FilePathAspect::fromMap(const Utils::Store &map)
Переопределяет: BaseAspect::fromMap(const Utils::Store &map).
void FilePathAspect::makeCheckable(Utils::CheckBoxPlacement checkBoxPlacement, const QString &checkerLabel, const Utils::Key &checkerKey)
Добавляет в поле ввода строки флажок с текстом « checkerLabel » в соответствии с checkBoxPlacement.
Состояние флажка сохраняется при использовании непустого значения checkerKey.
void FilePathAspect::setExpectedKind(const Utils::PathChooser::Kind expectedKind)
Устанавливает expectedKind в качестве ожидаемого типа для окон выбора пути.
См. также Utils::PathChooser::setExpectedKind().
void FilePathAspect::setValue(const Utils::FilePath &filePath, Utils::BaseAspect::Announcement howToAnnounce = DoEmit)
Устанавливает значение данного аспекта «путь к файлу» равным filePath.
Если для параметра ` howToAnnounce ` установлено значение ` DoEmit`, генерируется сигнал ` valueChanged `.
Примечание: При этом не выполняется никакой проверки того, действительно ли значение представляет собой путь к файлу.
[override virtual] void FilePathAspect::toMap(Utils::Store &map) const
Переопределяет: BaseAspect::toMap(Utils::Store &map) const.
Utils::FilePath FilePathAspect::operator()() const
Возвращает значение этого аспекта в формате Utils::FilePath.
Примечание: Здесь для преобразования просто используется выражение « FilePath::fromUserInput() ». При этом не выполняется никакой проверки того, является ли данное значение действительным путем к файлу.
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.