Gui::Dialog::ApplicationCache Class Reference

#include <DlgSettingsCacheDirectory.h>

Public Types

enum class  Period {
  Always , Daily , Weekly , Monthly ,
  Yearly , Never
}
 

Public Member Functions

 ApplicationCache ()
 
void applyUserSettings ()
 ApplicationCache::applyUserSettings Set period and limit according to user settings. More...
 
bool performAction (qint64)
 ApplicationCache::performAction If the cache size total is higher than the limit then show a dialog to the user. More...
 
bool periodicCheckOfSize () const
 ApplicationCache::periodicCheckOfSize Checks if the periodic check should be performed now. More...
 
void setLimit (qint64)
 ApplicationCache::setLimit Set the limit in bytes to perform a check. More...
 
void setPeriod (Period)
 ApplicationCache::setPeriod Set the period to check for the cache size. More...
 
qint64 size () const
 ApplicationCache::size Determines the size of the cache. More...
 

Static Public Member Functions

static qint64 toBytes (unsigned int)
 
static QString toString (qint64 size)
 

Member Enumeration Documentation

◆ Period

Enumerator
Always 
Daily 
Weekly 
Monthly 
Yearly 
Never 

Constructor & Destructor Documentation

◆ ApplicationCache()

ApplicationCache::ApplicationCache ( )

References setPeriod(), and Weekly.

Member Function Documentation

◆ applyUserSettings()

◆ performAction()

bool ApplicationCache::performAction ( qint64  total)

ApplicationCache::performAction If the cache size total is higher than the limit then show a dialog to the user.

Parameters
total

References Gui::getMainWindow(), App::Application::getUserCachePath(), and toString().

Referenced by Gui::Application::checkForPreviousCrashes().

◆ periodicCheckOfSize()

bool ApplicationCache::periodicCheckOfSize ( ) const

ApplicationCache::periodicCheckOfSize Checks if the periodic check should be performed now.

Returns

References App::Application::Config(), and App::Application::getExecutableName().

Referenced by Gui::Application::checkForPreviousCrashes().

◆ setLimit()

void ApplicationCache::setLimit ( qint64  value)

ApplicationCache::setLimit Set the limit in bytes to perform a check.

Parameters
value

Referenced by applyUserSettings().

◆ setPeriod()

void ApplicationCache::setPeriod ( ApplicationCache::Period  period)

ApplicationCache::setPeriod Set the period to check for the cache size.

Parameters
period

References Always, Daily, Monthly, Never, Weekly, and Yearly.

Referenced by ApplicationCache(), and applyUserSettings().

◆ size()

◆ toBytes()

qint64 ApplicationCache::toBytes ( unsigned int  sizeInMB)
static

Referenced by applyUserSettings().

◆ toString()

QString ApplicationCache::toString ( qint64  size)
static

References size(), and toString().

Referenced by performAction(), and toString().


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