FilePathAspect 类
class Utils::FilePathAspectFilePathAspect 是对 Utils::StringAspect 的包装,用于表示文件系统中的文件。了解更多...
头文件 | #include <FilePathAspect> |
继承 | 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
返回设置命令的完整路径。只有当预期类型是 Command
或 ExistingCommand
,并且当前文件路径是未提供路径的执行文件时才有意义。如果需要,则执行 PATH 中的查找。
[覆盖虚拟]
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
信号。
注意:此函数不会对值是否实际上是文件路径进行任何检查。
[覆盖虚函数]
void FilePathAspect::toMap(Utils::Store &map) const
重新实现了: BaseAspect::toMap(Utils::Store &map) const。
Utils::FilePath FilePathAspect::operator()() const
返回此方面的值作为 Utils::FilePath
。
注意:此仅使用 FilePath::fromUserInput()
进行转换。它不会对值是否实际上是有效的文件路径进行检查。
©2024 Qt公司。本文件中包含的文档贡献是各自所有者的版权。本文件中提供的文档受GNU自由文档许可证版本1.3的条款许可,该许可证由自由软件基金会发布。Qt及其相关标志是Qt公司在芬兰及/或世界其他国家的商标。所有其他商标均为其各自所有者的财产。