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

The ProjectSettings class. More...

#include <projectsettings.h>

+ Inheritance diagram for ProjectSettings:
+ Collaboration diagram for ProjectSettings:

Signals

void settingsChanged ()
 

Public Member Functions

 ProjectSettings (Project &project, bool restore, bool readOnly, bool create)
 
 ~ProjectSettings () noexcept
 
ProjectgetProject () const noexcept
 
const QStringList & getLocaleOrder () const noexcept
 
const QStringList & getNormOrder () const noexcept
 
void setLocaleOrder (const QStringList &locales) noexcept
 
void setNormOrder (const QStringList &norms) noexcept
 
void restoreDefaults () noexcept
 
void triggerSettingsChanged () noexcept
 
bool save (bool toOriginal, QStringList &errors) noexcept
 
- 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

 ProjectSettings ()
 
 ProjectSettings (const ProjectSettings &other)
 
ProjectSettingsoperator= (const ProjectSettings &rhs)
 
void serialize (SExpression &root) const override
 Serialize the object into an existing S-Expression node. More...
 

Private Attributes

ProjectmProject
 a reference to the Project object (from the ctor) More...
 
FilePath mLibraryPath
 the "lib" directory of the project More...
 
FilePath mFilepath
 
SmartSExprFilemFile
 
QStringList mLocaleOrder
 The list of locales (like "de_CH") in the right order. More...
 
QStringList mNormOrder
 the list of norms in the right order More...
 

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 ProjectSettings class.

Author
ubruhin
Date
2015-03-22

Constructor & Destructor Documentation

ProjectSettings ( Project project,
bool  restore,
bool  readOnly,
bool  create 
)
explicit

+ Here is the call graph for this function:

~ProjectSettings ( )
noexcept
ProjectSettings ( )
private
ProjectSettings ( const ProjectSettings other)
private

Member Function Documentation

Project& getProject ( ) const
inlinenoexcept
const QStringList& getLocaleOrder ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

const QStringList& getNormOrder ( ) const
inlinenoexcept

+ Here is the caller graph for this function:

void setLocaleOrder ( const QStringList &  locales)
inlinenoexcept

+ Here is the caller graph for this function:

void setNormOrder ( const QStringList &  norms)
inlinenoexcept

+ Here is the caller graph for this function:

void restoreDefaults ( )
noexcept

+ Here is the caller graph for this function:

void triggerSettingsChanged ( )
noexcept

+ Here is the caller graph for this function:

bool save ( bool  toOriginal,
QStringList &  errors 
)
noexcept

+ Here is the call graph for this function:

void settingsChanged ( )
signal

+ Here is the caller graph for this function:

ProjectSettings& operator= ( const ProjectSettings rhs)
private
void serialize ( SExpression root) const
overrideprivatevirtual

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:

Member Data Documentation

Project& mProject
private

a reference to the Project object (from the ctor)

FilePath mLibraryPath
private

the "lib" directory of the project

FilePath mFilepath
private
SmartSExprFile* mFile
private
QStringList mLocaleOrder
private

The list of locales (like "de_CH") in the right order.

QStringList mNormOrder
private

the list of norms in the right order


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