LMMS
Loading...
Searching...
No Matches
lmms::PathUtil Namespace Reference

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)

Variables

auto relativeBases

Enumeration Type Documentation

◆ Base

enum class lmms::PathUtil::Base
strong
Enumerator
Absolute 
ProjectDir 
FactoryProjects 
FactorySample 
UserSample 
UserVST 
Preset 
FactoryPresets 
UserLADSPA 
DefaultLADSPA 
UserSoundfont 
DefaultSoundfont 
UserGIG 
DefaultGIG 
LocalDir 

Function Documentation

◆ baseLocation()

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.

◆ baseLookup()

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

◆ basePrefix()

QString LMMS_EXPORT lmms::PathUtil::basePrefix ( const Base base)

Return the prefix used to denote this base in path strings.

◆ baseQDir()

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.

◆ cleanName()

QString LMMS_EXPORT lmms::PathUtil::cleanName ( const QString & input)

Get the filename for a path, handling prefixed paths correctly.

◆ oldRelativeUpgrade()

QString LMMS_EXPORT lmms::PathUtil::oldRelativeUpgrade ( const QString & input)

Upgrade prefix-less relative paths to the new format.

◆ relativeOrAbsolute()

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.

◆ serializePath()

QString lmms::PathUtil::serializePath ( const QString & input)

◆ stripPrefix()

QString LMMS_EXPORT lmms::PathUtil::stripPrefix ( const QString & input)

Remove the prefix from a path, iff there is one.

◆ toAbsolute()

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

◆ toShortestRelative()

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.

Variable Documentation

◆ relativeBases

auto lmms::PathUtil::relativeBases
Initial value:
@ UserLADSPA
Definition PathUtil.h:35
@ UserSoundfont
Definition PathUtil.h:35
@ UserGIG
Definition PathUtil.h:35
@ UserSample
Definition PathUtil.h:34
@ LocalDir
Definition PathUtil.h:36
@ ProjectDir
Definition PathUtil.h:34
@ FactoryPresets
Definition PathUtil.h:35
@ DefaultLADSPA
Definition PathUtil.h:35
@ DefaultSoundfont
Definition PathUtil.h:35
@ FactorySample
Definition PathUtil.h:34
@ UserVST
Definition PathUtil.h:34
@ Preset
Definition PathUtil.h:34
@ FactoryProjects
Definition PathUtil.h:34
@ DefaultGIG
Definition PathUtil.h:35