LibrePCB Developers Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
WSI_ProjectAutosaveInterval Class Referencefinal

The WSI_ProjectAutosaveInterval class represents the project autosave interval setting. More...

#include <wsi_projectautosaveinterval.h>

+ Inheritance diagram for WSI_ProjectAutosaveInterval:
+ Collaboration diagram for WSI_ProjectAutosaveInterval:

Public Member Functions

 WSI_ProjectAutosaveInterval ()=delete
 
 WSI_ProjectAutosaveInterval (const WSI_ProjectAutosaveInterval &other)=delete
 
 WSI_ProjectAutosaveInterval (const SExpression &node)
 
 ~WSI_ProjectAutosaveInterval () noexcept
 
unsigned int getInterval () const noexcept
 
QString getLabelText () const noexcept
 
QWidget * getWidget () const noexcept
 
void restoreDefault () noexceptoverride
 
void apply () noexceptoverride
 
void revert () noexceptoverride
 
void serialize (SExpression &root) const override
 Serialize the object into an existing S-Expression node. More...
 
WSI_ProjectAutosaveIntervaloperator= (const WSI_ProjectAutosaveInterval &rhs)=delete
 
- Public Member Functions inherited from WSI_Base
 WSI_Base () noexcept
 
 WSI_Base (const WSI_Base &other)=delete
 
virtual ~WSI_Base () noexcept
 
WSI_Baseoperator= (const WSI_Base &rhs)=delete
 
- Public Member Functions inherited from SerializableObject
 SerializableObject () noexcept
 
virtual ~SerializableObject () noexcept
 
SExpression serializeToDomElement (const QString &name) const
 Serialize the object to a new S-Expression node. More...
 

Private Member Functions

void spinBoxValueChanged (int value) noexcept
 

Private Attributes

uint mInterval
 the autosave interval [seconds] (0 = autosave disabled) More...
 
uint mIntervalTmp
 
QScopedPointer< QWidget > mWidget
 
QScopedPointer< QSpinBox > mSpinBox
 

Additional Inherited Members

- Static Public Member Functions inherited from SerializableObject
template<typename T >
static void serializeObjectContainer (SExpression &root, const T &container, const QString &itemName)
 
template<typename T >
static void serializePointerContainer (SExpression &root, const T &container, const QString &itemName)
 
template<typename T >
static void serializePointerContainerUuidSorted (SExpression &root, const T &container, const QString &itemName)
 

Detailed Description

The WSI_ProjectAutosaveInterval class represents the project autosave interval setting.

This setting is used by the class #project#Project for the autosave mechanism. A value of zero means that the autosave mechanism is disabled! A value greater than zero defines the time interval in seconds.

Author
ubruhin
Date
2014-10-04

Constructor & Destructor Documentation

WSI_ProjectAutosaveInterval ( const SExpression node)
explicit

+ Here is the call graph for this function:

Member Function Documentation

unsigned int getInterval ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

QString getLabelText ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

QWidget* getWidget ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

void restoreDefault ( )
overridevirtualnoexcept

Implements WSI_Base.

void apply ( )
overridevirtualnoexcept

Implements WSI_Base.

void revert ( )
overridevirtualnoexcept

Implements WSI_Base.

void serialize ( SExpression root) const
overridevirtual

Serialize the object into an existing S-Expression node.

This method inserts/appends all attributes and childs of the object to an existing S-Expression node. The content which already exists in the given S-Expression node will not be removed.

Note
The generated S-Expression node has always the format of the application's major version (it's not possible to generate DOMs of older versions).
Parameters
rootThe target DOM root node
Exceptions
ExceptionThis method throws an exception if an error occurs.

Implements SerializableObject.

+ Here is the call graph for this function:

WSI_ProjectAutosaveInterval& operator= ( const WSI_ProjectAutosaveInterval rhs)
delete
void spinBoxValueChanged ( int  value)
privatenoexcept

+ Here is the caller graph for this function:

Member Data Documentation

uint mInterval
private

the autosave interval [seconds] (0 = autosave disabled)

Default: 600 seconds

uint mIntervalTmp
private
QScopedPointer<QWidget> mWidget
private
QScopedPointer<QSpinBox> mSpinBox
private

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