|
lmms
Cross-platform music production software
|
Enumerations | |
| enum class | Base { Absolute , ProjectDir , FactoryProjects , FactorySample , UserSample , UserVST , Preset , FactoryPresets , UserLADSPA , DefaultLADSPA , UserSoundfont , DefaultSoundfont , UserGIG , DefaultGIG , LocalDir } |
Functions | |
| QString | baseLocation (const Base base, bool *error) |
| QDir | baseQDir (const Base base, bool *error) |
| QString | basePrefix (const Base base) |
| Return the prefix used to denote this base in path strings. | |
| Base | baseLookup (const QString &input) |
| QString | serializePath (const QString &input) |
| QString | stripPrefix (const QString &input) |
| Remove the prefix from a path, iff there is one. | |
| QString | cleanName (const QString &input) |
| Get the filename for a path, handling prefixed paths correctly. | |
| QString | oldRelativeUpgrade (const QString &input) |
| Upgrade prefix-less relative paths to the new format. | |
| QString | toAbsolute (const QString &input, bool *error) |
| QString | relativeOrAbsolute (const QString &input, const Base base) |
| Make this path relative to a given base, return an absolute path if that fails. | |
| QString | toShortestRelative (const QString &input, bool allowLocal) |
| auto | stringToPath (std::string_view path) -> std::filesystem::path |
| Converts a UTF-8 encoded string to std::filesystem::path. | |
| auto | stringToPath (const QString &path) -> std::filesystem::path |
| Converts QString to std::filesystem::path. | |
| auto | pathToString (const std::filesystem::path &path) -> std::string |
| Converts std::filesystem::path to a UTF-8 encoded std::string. | |
Variables | |
| auto | relativeBases |
|
strong |
| QString LMMS_EXPORT lmms::PathUtil::baseLocation | ( | const Base | base, |
| bool * | error = nullptr ) |
Return the directory associated with a given base as a QString Optionally, if a pointer to boolean is given the method will use it to indicate whether the prefix could be resolved properly or not.
| Base LMMS_EXPORT lmms::PathUtil::baseLookup | ( | const QString & | input | ) |
Check the prefix of a path and return the base it corresponds to Defaults to Base::Absolute
| QString LMMS_EXPORT lmms::PathUtil::basePrefix | ( | const Base | base | ) |
Return the prefix used to denote this base in path strings.
| QDir LMMS_EXPORT lmms::PathUtil::baseQDir | ( | const Base | base, |
| bool * | error = nullptr ) |
Return the directory associated with a given base as a QDir. Optional pointer to boolean to indicate if the prefix could be resolved properly.
| QString LMMS_EXPORT lmms::PathUtil::cleanName | ( | const QString & | input | ) |
Get the filename for a path, handling prefixed paths correctly.
| QString LMMS_EXPORT lmms::PathUtil::oldRelativeUpgrade | ( | const QString & | input | ) |
Upgrade prefix-less relative paths to the new format.
| LMMS_EXPORT auto lmms::PathUtil::pathToString | ( | const std::filesystem::path & | path | ) | -> std::string |
Converts std::filesystem::path to a UTF-8 encoded std::string.
| QString LMMS_EXPORT lmms::PathUtil::relativeOrAbsolute | ( | const QString & | input, |
| const Base | base ) |
Make this path relative to a given base, return an absolute path if that fails.
| QString lmms::PathUtil::serializePath | ( | const QString & | input | ) |
| LMMS_EXPORT auto lmms::PathUtil::stringToPath | ( | const QString & | path | ) | -> std::filesystem::path |
Converts QString to std::filesystem::path.
| LMMS_EXPORT auto lmms::PathUtil::stringToPath | ( | std::string_view | path | ) | -> std::filesystem::path |
Converts a UTF-8 encoded string to std::filesystem::path.
| QString LMMS_EXPORT lmms::PathUtil::stripPrefix | ( | const QString & | input | ) |
Remove the prefix from a path, iff there is one.
| QString LMMS_EXPORT lmms::PathUtil::toAbsolute | ( | const QString & | input, |
| bool * | error = nullptr ) |
Make this path absolute. If a pointer to boolean is given it will indicate whether the path was converted successfully
| QString LMMS_EXPORT lmms::PathUtil::toShortestRelative | ( | const QString & | input, |
| bool | allowLocal = false ) |
Make this path relative to any base, choosing the shortest if there are multiple options. allowLocal defines whether local paths should be considered. Defaults to an absolute path if all bases fail.
| auto lmms::PathUtil::relativeBases |