FilePathAspect Class

class Utils::FilePathAspect

A file path aspect is shallow wrapper around a Utils::StringAspect that represents a file in the file system. More...

Header: #include <FilePathAspect>
Inherits: Utils::TypedAspect

Public Functions

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

Reimplemented Public Functions

virtual void fromMap(const Utils::Store &map) override
virtual void toMap(Utils::Store &map) const override

Detailed Description

It is displayed by default using Utils::PathChooser.

The visual representation often contains a label in front of the display of the actual value.

See also Utils::StringAspect.

Member Function Documentation

[override virtual] void FilePathAspect::fromMap(const Utils::Store &map)

Reimplements: BaseAspect::fromMap(const Utils::Store &map).

void FilePathAspect::makeCheckable(Utils::CheckBoxPlacement checkBoxPlacement, const QString &checkerLabel, const Utils::Key &checkerKey)

Adds a check box with a checkerLabel according to checkBoxPlacement to the line edit.

The state of the check box is made persistent when using a non-emtpy checkerKey.

void FilePathAspect::setExpectedKind(const Utils::PathChooser::Kind expectedKind)

Sets expectedKind as expected kind for path chooser displays.

See also Utils::PathChooser::setExpectedKind().

void FilePathAspect::setValue(const Utils::FilePath &filePath, Utils::BaseAspect::Announcement howToAnnounce = DoEmit)

Sets the value of this file path aspect to value.

Note: This does not use any check that the value is actually a file path.

[override virtual] void FilePathAspect::toMap(Utils::Store &map) const

Reimplements: BaseAspect::toMap(Utils::Store &map) const.

Utils::FilePath FilePathAspect::operator()() const

Returns the value of this aspect as Utils::FilePath.

Note: This simply uses FilePath::fromUserInput() for the conversion. It does not use any check that the value is actually a valid file path.

© 2024 The Qt Company Ltd. 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.