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::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)
根据checkBoxPlacement 的说明,向行编辑框添加一个带有checkerLabel 的复选框。
当使用非空的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.