qTox  Version: nightly | Commit: bc751c8e1cac455f9690654fcfe0f560d2d7dfdd
Public Types | Public Member Functions | Private Attributes | List of all members
Paths Class Reference

#include <paths.h>

Collaboration diagram for Paths:
Collaboration graph

Public Types

enum  Portable { Portable::Auto, Portable::Portable, Portable::NonPortable }
 

Public Member Functions

 Paths (Portable mode=Portable::Auto)
 
bool setPortable (bool portable)
 Set paths to passed portable or system wide. More...
 
bool isPortable () const
 Check if qTox is running in portable mode. More...
 
QString getSettingsDirPath () const
 Get path to directory, where the settings files are stored. More...
 
QString getAppDataDirPath () const
 Get path to directory, where the application data are stored. More...
 
QString getAppCacheDirPath () const
 Get path to directory, where the application cache are stored. More...
 
QString getUserNodesFilePath () const
 

Private Attributes

QString basePath
 
std::atomic_bool portable {false}
 

Detailed Description

Definition at line 28 of file paths.h.

Member Enumeration Documentation

◆ Portable

enum Paths::Portable
strong
Enumerator
Auto 
Portable 

Auto detect if portable or non-portable

NonPortable 

Force portable mode Force non-portable mode

Definition at line 31 of file paths.h.

Constructor & Destructor Documentation

◆ Paths()

Paths::Paths ( Portable  mode = Portable::Auto)

Definition at line 125 of file paths.cpp.

Member Function Documentation

◆ getAppCacheDirPath()

QString Paths::getAppCacheDirPath ( ) const

Get path to directory, where the application cache are stored.

Returns
Path to application cache, ends with a directory separator.
Note
To be removed when path migration is complete.

Definition at line 346 of file paths.cpp.

Here is the caller graph for this function:

◆ getAppDataDirPath()

QString Paths::getAppDataDirPath ( ) const

Get path to directory, where the application data are stored.

Returns
Path to application data, ends with a directory separator.
Note
To be removed when path migration is complete.

Definition at line 314 of file paths.cpp.

◆ getSettingsDirPath()

QString Paths::getSettingsDirPath ( ) const

Get path to directory, where the settings files are stored.

Returns
Path to settings directory, ends with a directory separator.
Note
To be removed when path migration is complete.

Definition at line 286 of file paths.cpp.

Here is the caller graph for this function:

◆ getUserNodesFilePath()

QString Paths::getUserNodesFilePath ( ) const

Definition at line 368 of file paths.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ isPortable()

bool Paths::isPortable ( ) const

Check if qTox is running in portable mode.

Returns
True if running in portable mode, false else.

Definition at line 149 of file paths.cpp.

Here is the caller graph for this function:

◆ setPortable()

bool Paths::setPortable ( bool  newPortable)

Set paths to passed portable or system wide.

Parameters
newPortable
Returns
True if portable mode changed, else false.

Definition at line 136 of file paths.cpp.

Here is the caller graph for this function:

Member Data Documentation

◆ basePath

QString Paths::basePath
private

Definition at line 58 of file paths.h.

◆ portable

std::atomic_bool Paths::portable {false}
private

Definition at line 59 of file paths.h.


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