#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) |
|
strong |
| ApplicationCache::ApplicationCache | ( | ) |
References setPeriod(), and Weekly.
| void ApplicationCache::applyUserSettings | ( | ) |
ApplicationCache::applyUserSettings Set period and limit according to user settings.
References Gui::Dialog::ApplicationCacheSettings::getCacheSizeLimit(), Gui::Dialog::ApplicationCacheSettings::getCheckPeriod(), setLimit(), setPeriod(), and toBytes().
Referenced by Gui::Application::checkForPreviousCrashes().
| bool ApplicationCache::performAction | ( | qint64 | total | ) |
ApplicationCache::performAction If the cache size total is higher than the limit then show a dialog to the user.
| total |
References Gui::getMainWindow(), App::Application::getUserCachePath(), and toString().
Referenced by Gui::Application::checkForPreviousCrashes().
| bool ApplicationCache::periodicCheckOfSize | ( | ) | const |
ApplicationCache::periodicCheckOfSize Checks if the periodic check should be performed now.
References App::Application::Config(), and App::Application::getExecutableName().
Referenced by Gui::Application::checkForPreviousCrashes().
| void ApplicationCache::setLimit | ( | qint64 | value | ) |
ApplicationCache::setLimit Set the limit in bytes to perform a check.
| value |
Referenced by applyUserSettings().
| void ApplicationCache::setPeriod | ( | ApplicationCache::Period | period | ) |
ApplicationCache::setPeriod Set the period to check for the cache size.
| period |
References Always, Daily, Monthly, Never, Weekly, and Yearly.
Referenced by ApplicationCache(), and applyUserSettings().
| qint64 ApplicationCache::size | ( | ) | const |
ApplicationCache::size Determines the size of the cache.
References App::Application::getUserCachePath().
Referenced by Gui::Application::checkForPreviousCrashes(), gzip_utf8.GzipFile::close(), PathScripts.PostUtils.GCodeEditorDialog::done(), toString(), and gzip_utf8.GzipFile::write().
|
static |
Referenced by applyUserSettings().
|
static |
References size(), and toString().
Referenced by performAction(), and toString().