Public Types | Public Slots | Public Member Functions | List of all members
pqAutoSaveBehavior Class Reference

: 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
 

Detailed Description

: 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.

Member Enumeration Documentation

◆ StateFormat

enum pqAutoSaveBehavior::StateFormat : unsigned int
strong
Enumerator
PVSM 
Python 

Definition at line 37 of file pqAutoSaveBehavior.h.

Constructor & Destructor Documentation

◆ pqAutoSaveBehavior()

pqAutoSaveBehavior::pqAutoSaveBehavior ( QObject *  parent = nullptr)

◆ ~pqAutoSaveBehavior()

pqAutoSaveBehavior::~pqAutoSaveBehavior ( )
override

Member Function Documentation

◆ saveState

static void pqAutoSaveBehavior::saveState ( )
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()

◆ getStateDirectory

static QDir pqAutoSaveBehavior::getStateDirectory ( )
staticslot

Return the directory where to write the state.

Uses user-defined directory (from settings) or standard one if empty. See pqCoreUtilities::getParaViewApplicationDataDirectory()

◆ formatToExtension

static QString pqAutoSaveBehavior::formatToExtension ( StateFormat  format)
staticslot

Return the extension for the given format See StateFormat.

Default to pvsm

◆ autoSaveSettingEnabled

static bool pqAutoSaveBehavior::autoSaveSettingEnabled ( )
staticslot

Return true if the AutoSave settings is enabled.

◆ setAutoSaveSetting

static void pqAutoSaveBehavior::setAutoSaveSetting ( bool  enable)
staticslot

Set the AutoSave Setting to "enable".

◆ getStateFormat

static StateFormat pqAutoSaveBehavior::getStateFormat ( )
staticslot

Return the file format for the statefile, as defined in the settings.

Default to StateFormat::PVSM.


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