Mapper  0.9.0
API documentation
Public Types | Public Member Functions | Static Public Member Functions | List of all members
OpenOrienteering::StorageLocation Class Reference

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...
 
StorageLocationoperator= (const StorageLocation &) noexcept(qstring_is_nothrow_copy_assignable)=default
 
StorageLocationoperator= (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...
 

Detailed Description

Provides information about document storage locations.

Member Enumeration Documentation

◆ Hint

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.

Constructor & Destructor Documentation

◆ StorageLocation() [1/3]

OpenOrienteering::StorageLocation::StorageLocation ( const QString path,
StorageLocation::Hint  hint 
)
inlinenoexcept

Constructs a new location.

◆ StorageLocation() [2/3]

OpenOrienteering::StorageLocation::StorageLocation ( const StorageLocation ) const
defaultnoexcept

Default copy constructor.

◆ StorageLocation() [3/3]

OpenOrienteering::StorageLocation::StorageLocation ( StorageLocation &&  ) const
defaultnoexcept

Default move constructor.

Member Function Documentation

◆ fileHintTextTemplate()

QString OpenOrienteering::StorageLocation::fileHintTextTemplate ( Hint  hint)
static

Returns a text template for giving the hint for the given path.

This function returns an empty string for HintNormal.

◆ hint()

StorageLocation::Hint OpenOrienteering::StorageLocation::hint ( ) const
inline

Returns the hint for this location.

This function returns an empty string for HintNormal.

◆ hintText()

QString OpenOrienteering::StorageLocation::hintText ( ) const

Returns the text representing the hint for this location.

◆ knownLocations()

std::shared_ptr< const std::vector< StorageLocation > > OpenOrienteering::StorageLocation::knownLocations ( )
static

Returns the known locations for documents.

The returned shared-ptr will always have an object, even if it is an empty list.

◆ operator=() [1/2]

StorageLocation& OpenOrienteering::StorageLocation::operator= ( const StorageLocation )
defaultnoexcept

◆ operator=() [2/2]

StorageLocation& OpenOrienteering::StorageLocation::operator= ( StorageLocation &&  )
defaultnoexcept

◆ path()

QString OpenOrienteering::StorageLocation::path ( ) const
inline

Returns the path of this location.

◆ refresh()

void OpenOrienteering::StorageLocation::refresh ( )
static

Forces a new scan of locations on the next call to knownLocations().


The documentation for this class was generated from the following files: