: pqAutoSaveBehavior save states automatically in the background. More...
#include <pqAutoSaveBehavior.h>
Inherits QObject.
Public Types | |
enum | StateFormat : unsigned int { StateFormat::PVSM = 0, StateFormat::Python = 1 } |
Public Slots | |
static void | saveState () |
Saves the state. More... | |
static QDir | getStateDirectory () |
Return the directory where to write the state. More... | |
static QString | formatToExtension (StateFormat format) |
Return the extension for the given format See StateFormat. More... | |
static bool | autoSaveSettingEnabled () |
Return true if the AutoSave settings is enabled. More... | |
static void | setAutoSaveSetting (bool enable) |
Set the AutoSave Setting to "enable". More... | |
static StateFormat | getStateFormat () |
Return the file format for the statefile, as defined in the settings. More... | |
Public Member Functions | |
pqAutoSaveBehavior (QObject *parent=nullptr) | |
~pqAutoSaveBehavior () override | |
: pqAutoSaveBehavior save states automatically in the background.
On every significant change, as a pipeline update or a rendering, it writes a new statefile and backup the previous one. The target directory can be defined in the settings. By default, the standard platform-dependent AppData directory is used. See pqCoreUtilities::getParaViewApplicationDataDirectory().
The file format can be chosen with the AutoSaveStateFormat
setting.
The features can be (de)activated through the AutoSave
setting.
Definition at line 28 of file pqAutoSaveBehavior.h.
|
strong |
Enumerator | |
---|---|
PVSM | |
Python |
Definition at line 37 of file pqAutoSaveBehavior.h.
pqAutoSaveBehavior::pqAutoSaveBehavior | ( | QObject * | parent = nullptr | ) |
|
override |
|
staticslot |
Saves the state.
First make a copy of the previous state as a .bak
file.
Uses format and directory from settings. Default to pvsm and pqCoreUtilities::getParaViewApplicationDataDirectory()
|
staticslot |
Return the directory where to write the state.
Uses user-defined directory (from settings) or standard one if empty. See pqCoreUtilities::getParaViewApplicationDataDirectory()
|
staticslot |
Return the extension for the given format See StateFormat.
Default to pvsm
|
staticslot |
Return true if the AutoSave settings is enabled.
|
staticslot |
Set the AutoSave Setting to "enable".
|
staticslot |
Return the file format for the statefile, as defined in the settings.
Default to StateFormat::PVSM.