![]() |
Mapper
0.9.0
API documentation
|
Provides information about document storage locations. More...
#include <storage_location.h>
Public Types | |
enum | Hint { HintNormal, HintApplication, HintReadOnly, HintNoAccess, HintInvalid } |
Various hints about locations. More... | |
Public Member Functions | |
StorageLocation (const QString &path, Hint hint) noexcept | |
Constructs a new location. More... | |
StorageLocation (const StorageLocation &) noexcept(qstring_is_nothrow_copy_constructible)=default | |
Default copy constructor. More... | |
StorageLocation (StorageLocation &&) noexcept(qstring_is_nothrow_move_constructible)=default | |
Default move constructor. More... | |
StorageLocation & | operator= (const StorageLocation &) noexcept(qstring_is_nothrow_copy_assignable)=default |
StorageLocation & | operator= (StorageLocation &&) noexcept(qstring_is_nothrow_copy_assignable)=default |
QString | path () const |
Returns the path of this location. More... | |
Hint | hint () const |
Returns the hint for this location. More... | |
QString | hintText () const |
Returns the text representing the hint for this location. More... | |
Static Public Member Functions | |
static QString | fileHintTextTemplate (Hint hint) |
Returns a text template for giving the hint for the given path. More... | |
static std::shared_ptr< const std::vector< StorageLocation > > | knownLocations () |
Returns the known locations for documents. More... | |
static void | refresh () |
Forces a new scan of locations on the next call to knownLocations(). More... | |
Provides information about document storage locations.
Various hints about locations.
Enumerator | |
---|---|
HintNormal | Normal location. |
HintApplication | Location which might get cleaned unexpectedly. |
HintReadOnly | Read-only location. |
HintNoAccess | Location which requires to establish AppPermissions::StorageAccess. |
HintInvalid | Not a valid location at all. |
|
inlinenoexcept |
Constructs a new location.
|
defaultnoexcept |
Default copy constructor.
|
defaultnoexcept |
Default move constructor.
Returns a text template for giving the hint for the given path.
This function returns an empty string for HintNormal.
|
inline |
Returns the hint for this location.
This function returns an empty string for HintNormal.
QString OpenOrienteering::StorageLocation::hintText | ( | ) | const |
Returns the text representing the hint for this location.
|
static |
Returns the known locations for documents.
The returned shared-ptr will always have an object, even if it is an empty list.
|
defaultnoexcept |
|
defaultnoexcept |
|
inline |
Returns the path of this location.
|
static |
Forces a new scan of locations on the next call to knownLocations().