[][src]Struct qt_core::QStandardPaths

#[repr(C)]pub struct QStandardPaths { /* fields omitted */ }

The QStandardPaths class provides methods for accessing standard paths.

C++ class: QStandardPaths.

C++ documentation:

The QStandardPaths class provides methods for accessing standard paths.

This class contains functions to query standard locations on the local filesystem, for common tasks such as user-specific directories or system-wide configuration directories.

Methods

impl QStandardPaths[src]

pub unsafe fn copy_from(
    &self,
    other: impl CastInto<Ref<QStandardPaths>>
) -> Ref<QStandardPaths>
[src]

The QStandardPaths class provides methods for accessing standard paths.

Calls C++ function: QStandardPaths& QStandardPaths::operator=(const QStandardPaths& other).

C++ documentation:

The QStandardPaths class provides methods for accessing standard paths.

This class contains functions to query standard locations on the local filesystem, for common tasks such as user-specific directories or system-wide configuration directories.

pub unsafe fn display_name(type_: StandardLocation) -> CppBox<QString>[src]

Returns a localized display name for the given location type or an empty QString if no relevant location can be found.

Calls C++ function: static QString QStandardPaths::displayName(QStandardPaths::StandardLocation type).

C++ documentation:

Returns a localized display name for the given location type or an empty QString if no relevant location can be found.

pub unsafe fn enable_test_mode(test_mode: bool)[src]

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

Calls C++ function: static void QStandardPaths::enableTestMode(bool testMode).

C++ documentation:

This function is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.

pub unsafe fn find_executable_2a(
    executable_name: impl CastInto<Ref<QString>>,
    paths: impl CastInto<Ref<QStringList>>
) -> CppBox<QString>
[src]

Finds the executable named executableName in the paths specified by paths, or the system paths if paths is empty.

Calls C++ function: static QString QStandardPaths::findExecutable(const QString& executableName, const QStringList& paths = …).

C++ documentation:

Finds the executable named executableName in the paths specified by paths, or the system paths if paths is empty.

On most operating systems the system path is determined by the PATH environment variable.

The directories where to search for the executable can be set in the paths argument. To search in both your own paths and the system paths, call findExecutable twice, once with paths set and once with paths empty.

Symlinks are not resolved, in order to preserve behavior for the case of executables whose behavior depends on the name they are invoked with.

Note: On Windows, the usual executable extensions (from the PATHEXT environment variable) are automatically appended, so that for instance findExecutable("foo") will find foo.exe or foo.bat if present.

Returns the absolute file path to the executable, or an empty string if not found.

pub unsafe fn find_executable_1a(
    executable_name: impl CastInto<Ref<QString>>
) -> CppBox<QString>
[src]

Finds the executable named executableName in the paths specified by paths, or the system paths if paths is empty.

Calls C++ function: static QString QStandardPaths::findExecutable(const QString& executableName).

C++ documentation:

Finds the executable named executableName in the paths specified by paths, or the system paths if paths is empty.

On most operating systems the system path is determined by the PATH environment variable.

The directories where to search for the executable can be set in the paths argument. To search in both your own paths and the system paths, call findExecutable twice, once with paths set and once with paths empty.

Symlinks are not resolved, in order to preserve behavior for the case of executables whose behavior depends on the name they are invoked with.

Note: On Windows, the usual executable extensions (from the PATHEXT environment variable) are automatically appended, so that for instance findExecutable("foo") will find foo.exe or foo.bat if present.

Returns the absolute file path to the executable, or an empty string if not found.

pub unsafe fn is_test_mode_enabled() -> bool[src]

Calls C++ function: static bool QStandardPaths::isTestModeEnabled().

pub unsafe fn locate_3a(
    type_: StandardLocation,
    file_name: impl CastInto<Ref<QString>>,
    options: QFlags<LocateOption>
) -> CppBox<QString>
[src]

Tries to find a file or directory called fileName in the standard locations for type.

Calls C++ function: static QString QStandardPaths::locate(QStandardPaths::StandardLocation type, const QString& fileName, QFlags<QStandardPaths::LocateOption> options = …).

C++ documentation:

Tries to find a file or directory called fileName in the standard locations for type.

The full path to the first file or directory (depending on options) found is returned. If no such file or directory can be found, an empty string is returned.

pub unsafe fn locate_2a(
    type_: StandardLocation,
    file_name: impl CastInto<Ref<QString>>
) -> CppBox<QString>
[src]

Tries to find a file or directory called fileName in the standard locations for type.

Calls C++ function: static QString QStandardPaths::locate(QStandardPaths::StandardLocation type, const QString& fileName).

C++ documentation:

Tries to find a file or directory called fileName in the standard locations for type.

The full path to the first file or directory (depending on options) found is returned. If no such file or directory can be found, an empty string is returned.

pub unsafe fn locate_all_3a(
    type_: StandardLocation,
    file_name: impl CastInto<Ref<QString>>,
    options: QFlags<LocateOption>
) -> CppBox<QStringList>
[src]

Tries to find all files or directories called fileName in the standard locations for type.

Calls C++ function: static QStringList QStandardPaths::locateAll(QStandardPaths::StandardLocation type, const QString& fileName, QFlags<QStandardPaths::LocateOption> options = …).

C++ documentation:

Tries to find all files or directories called fileName in the standard locations for type.

The options flag allows to specify whether to look for files or directories.

Returns the list of all the files that were found.

pub unsafe fn locate_all_2a(
    type_: StandardLocation,
    file_name: impl CastInto<Ref<QString>>
) -> CppBox<QStringList>
[src]

Tries to find all files or directories called fileName in the standard locations for type.

Calls C++ function: static QStringList QStandardPaths::locateAll(QStandardPaths::StandardLocation type, const QString& fileName).

C++ documentation:

Tries to find all files or directories called fileName in the standard locations for type.

The options flag allows to specify whether to look for files or directories.

Returns the list of all the files that were found.

pub unsafe fn new_copy(
    other: impl CastInto<Ref<QStandardPaths>>
) -> Ref<QStandardPaths>
[src]

The QStandardPaths class provides methods for accessing standard paths.

Calls C++ function: [constructor] void QStandardPaths::QStandardPaths(const QStandardPaths& other).

C++ documentation:

The QStandardPaths class provides methods for accessing standard paths.

This class contains functions to query standard locations on the local filesystem, for common tasks such as user-specific directories or system-wide configuration directories.

pub unsafe fn set_test_mode_enabled(test_mode: bool)[src]

If testMode is true, this enables a special "test mode" in QStandardPaths, which changes writable locations to point to test directories, in order to prevent auto tests from reading from or writing to the current user's configuration.

Calls C++ function: static void QStandardPaths::setTestModeEnabled(bool testMode).

C++ documentation:

If testMode is true, this enables a special "test mode" in QStandardPaths, which changes writable locations to point to test directories, in order to prevent auto tests from reading from or writing to the current user's configuration.

This affects the locations into which test programs might write files: GenericDataLocation, DataLocation, ConfigLocation, GenericConfigLocation, AppConfigLocation, GenericCacheLocation, CacheLocation. Other locations are not affected.

On Unix, XDG_DATA_HOME is set to ~/.qttest/share, XDG_CONFIG_HOME is set to ~/.qttest/config, and XDG_CACHE_HOME is set to ~/.qttest/cache.

On macOS, data goes to ~/.qttest/Application Support, cache goes to ~/.qttest/Cache, and config goes to ~/.qttest/Preferences.

On Windows, everything goes to a "qttest" directory under Application Data.

pub unsafe fn standard_locations(type_: StandardLocation) -> CppBox<QStringList>[src]

Returns all the directories where files of type belong.

Calls C++ function: static QStringList QStandardPaths::standardLocations(QStandardPaths::StandardLocation type).

C++ documentation:

Returns all the directories where files of type belong.

The list of directories is sorted from high to low priority, starting with writableLocation() if it can be determined. This list is empty if no locations for type are defined.

See also writableLocation().

pub unsafe fn static_meta_object() -> Ref<QMetaObject>[src]

Returns a reference to the staticMetaObject field.

pub unsafe fn writable_location(type_: StandardLocation) -> CppBox<QString>[src]

Returns the directory where files of type should be written to, or an empty string if the location cannot be determined.

Calls C++ function: static QString QStandardPaths::writableLocation(QStandardPaths::StandardLocation type).

C++ documentation:

Returns the directory where files of type should be written to, or an empty string if the location cannot be determined.

Note: The storage location returned can be a directory that does not exist; i.e., it may need to be created by the system or the user.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.