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

The WSI_LibraryLocaleOrder class contains a list of locales which should be used for all (translatable) strings in library elements (in the specified order) More...

#include <wsi_librarylocaleorder.h>

+ Inheritance diagram for WSI_LibraryLocaleOrder:
+ Collaboration diagram for WSI_LibraryLocaleOrder:

Public Member Functions

 WSI_LibraryLocaleOrder ()=delete
 
 WSI_LibraryLocaleOrder (const WSI_LibraryLocaleOrder &other)=delete
 
 WSI_LibraryLocaleOrder (const SExpression &node)
 
 ~WSI_LibraryLocaleOrder () noexcept
 
const QStringList & getLocaleOrder () 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_LibraryLocaleOrderoperator= (const WSI_LibraryLocaleOrder &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 btnUpClicked () noexcept
 
void btnDownClicked () noexcept
 
void btnAddClicked () noexcept
 
void btnRemoveClicked () noexcept
 
void updateListWidgetItems () noexcept
 

Private Attributes

QStringList mList
 The list of locales (like "de_CH") in the right order. More...
 
QStringList mListTmp
 
QScopedPointer< QWidget > mWidget
 
QScopedPointer< QListWidget > mListWidget
 
QScopedPointer< QComboBox > mComboBox
 
QScopedPointer< QToolButton > mBtnUp
 
QScopedPointer< QToolButton > mBtnDown
 
QScopedPointer< QToolButton > mBtnAdd
 
QScopedPointer< QToolButton > mBtnRemove
 

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_LibraryLocaleOrder class contains a list of locales which should be used for all (translatable) strings in library elements (in the specified order)

Author
ubruhin
Date
2014-10-05

Constructor & Destructor Documentation

WSI_LibraryLocaleOrder ( const SExpression node)
explicit

+ Here is the call graph for this function:

~WSI_LibraryLocaleOrder ( )
noexcept

Member Function Documentation

const QStringList& getLocaleOrder ( ) 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.

+ Here is the call graph for this function:

void apply ( )
overridevirtualnoexcept

Implements WSI_Base.

void revert ( )
overridevirtualnoexcept

Implements WSI_Base.

+ Here is the call graph for this function:

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_LibraryLocaleOrder& operator= ( const WSI_LibraryLocaleOrder rhs)
delete
void btnUpClicked ( )
privatenoexcept

+ Here is the caller graph for this function:

void btnDownClicked ( )
privatenoexcept

+ Here is the caller graph for this function:

void btnAddClicked ( )
privatenoexcept

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void btnRemoveClicked ( )
privatenoexcept

+ Here is the caller graph for this function:

void updateListWidgetItems ( )
privatenoexcept

+ Here is the caller graph for this function:

Member Data Documentation

QStringList mList
private

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

The locale which should be used first is at index 0 of the list. If no translation strings are found for all locales in this list, the fallback locale "en_US" will be used automatically, so the list do not have to contain "en_US". An empty list is also valid, then the fallback locale "en_US" will be used.

QStringList mListTmp
private
QScopedPointer<QWidget> mWidget
private
QScopedPointer<QListWidget> mListWidget
private
QScopedPointer<QComboBox> mComboBox
private
QScopedPointer<QToolButton> mBtnUp
private
QScopedPointer<QToolButton> mBtnDown
private
QScopedPointer<QToolButton> mBtnAdd
private
QScopedPointer<QToolButton> mBtnRemove
private

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