LibrePCB Developers Documentation
LibraryCategory Class Reference

The LibraryCategory class extends the LibraryBaseElement class with some attributes and methods which are used for all library category classes. More...

#include <librarycategory.h>

+ Inheritance diagram for LibraryCategory:
+ Collaboration diagram for LibraryCategory:

Public Member Functions

 LibraryCategory ()=delete
 
 LibraryCategory (const LibraryCategory &other)=delete
 
 LibraryCategory (const QString &shortElementName, const QString &longElementName, const Uuid &uuid, const Version &version, const QString &author, const ElementName &name_en_US, const QString &description_en_US, const QString &keywords_en_US)
 
 LibraryCategory (const QString &shortElementName, const QString &longElementName, std::unique_ptr< TransactionalDirectory > directory, const SExpression &root)
 
virtual ~LibraryCategory () noexcept
 
const tl::optional< Uuid > & getParentUuid () const noexcept
 
void setParentUuid (const tl::optional< Uuid > &parentUuid) noexcept
 
LibraryCategoryoperator= (const LibraryCategory &rhs)=delete
 
- Public Member Functions inherited from LibraryBaseElement
 LibraryBaseElement ()=delete
 
 LibraryBaseElement (const LibraryBaseElement &other)=delete
 
 LibraryBaseElement (const QString &shortElementName, const QString &longElementName, const Uuid &uuid, const Version &version, const QString &author, const ElementName &name_en_US, const QString &description_en_US, const QString &keywords_en_US)
 
 LibraryBaseElement (const QString &shortElementName, const QString &longElementName, bool dirnameMustBeUuid, std::unique_ptr< TransactionalDirectory > directory, const SExpression &root)
 
virtual ~LibraryBaseElement () noexcept
 
const TransactionalDirectorygetDirectory () const noexcept
 
TransactionalDirectorygetDirectory () noexcept
 
const UuidgetUuid () const noexcept
 
const VersiongetVersion () const noexcept
 
const QString & getAuthor () const noexcept
 
const QDateTime & getCreated () const noexcept
 
bool isDeprecated () const noexcept
 
const LocalizedNameMapgetNames () const noexcept
 
const LocalizedDescriptionMapgetDescriptions () const noexcept
 
const LocalizedKeywordsMapgetKeywords () const noexcept
 
QStringList getAllAvailableLocales () const noexcept
 
const QSet< SExpression > & getMessageApprovals () const noexcept
 
void setVersion (const Version &version) noexcept
 
void setAuthor (const QString &author) noexcept
 
void setDeprecated (bool deprecated) noexcept
 
void setNames (const LocalizedNameMap &names) noexcept
 
void setDescriptions (const LocalizedDescriptionMap &descriptions) noexcept
 
void setKeywords (const LocalizedKeywordsMap &keywords) noexcept
 
void setMessageApprovals (const QSet< SExpression > &approvals) noexcept
 
virtual RuleCheckMessageList runChecks () const
 
virtual void save ()
 
virtual void saveTo (TransactionalDirectory &dest)
 
virtual void moveTo (TransactionalDirectory &dest)
 
virtual void saveIntoParentDirectory (TransactionalDirectory &dest)
 
virtual void moveIntoParentDirectory (TransactionalDirectory &dest)
 
LibraryBaseElementoperator= (const LibraryBaseElement &rhs)=delete
 

Protected Member Functions

virtual void serialize (SExpression &root) const override
 Serialize into librepcb::SExpression node. More...
 
- Protected Member Functions inherited from LibraryBaseElement
virtual void serialize (SExpression &root) const
 Serialize into librepcb::SExpression node. More...
 
void serializeMessageApprovals (SExpression &root) const
 
void removeObsoleteMessageApprovals ()
 

Protected Attributes

tl::optional< UuidmParentUuid
 
- Protected Attributes inherited from LibraryBaseElement
const QString mShortElementName
 e.g. "lib", "cmpcat" More...
 
const QString mLongElementName
 e.g. "library", "component_category" More...
 
std::unique_ptr< TransactionalDirectorymDirectory
 
Uuid mUuid
 
Version mVersion
 
QString mAuthor
 
QDateTime mCreated
 
bool mIsDeprecated
 
LocalizedNameMap mNames
 
LocalizedDescriptionMap mDescriptions
 
LocalizedKeywordsMap mKeywords
 
QSet< SExpressionmMessageApprovals
 

Additional Inherited Members

- Static Public Member Functions inherited from LibraryBaseElement
template<typename ElementType >
static bool isValidElementDirectory (const FilePath &dir) noexcept
 
template<typename ElementType >
static bool isValidElementDirectory (const TransactionalDirectory &dir, const QString &path) noexcept
 
- Static Protected Member Functions inherited from LibraryBaseElement
static Version readFileFormat (const TransactionalDirectory &directory, const QString &fileName)
 

Detailed Description

The LibraryCategory class extends the LibraryBaseElement class with some attributes and methods which are used for all library category classes.

Constructor & Destructor Documentation

◆ LibraryCategory() [1/4]

LibraryCategory ( )
delete

◆ LibraryCategory() [2/4]

LibraryCategory ( const LibraryCategory other)
delete

◆ LibraryCategory() [3/4]

LibraryCategory ( const QString &  shortElementName,
const QString &  longElementName,
const Uuid uuid,
const Version version,
const QString &  author,
const ElementName name_en_US,
const QString &  description_en_US,
const QString &  keywords_en_US 
)

◆ LibraryCategory() [4/4]

LibraryCategory ( const QString &  shortElementName,
const QString &  longElementName,
std::unique_ptr< TransactionalDirectory directory,
const SExpression root 
)

◆ ~LibraryCategory()

~LibraryCategory ( )
virtualnoexcept

Member Function Documentation

◆ getParentUuid()

const tl::optional< Uuid > & getParentUuid ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ setParentUuid()

void setParentUuid ( const tl::optional< Uuid > &  parentUuid)
inlinenoexcept
+ Here is the caller graph for this function:

◆ operator=()

LibraryCategory & operator= ( const LibraryCategory rhs)
delete

◆ serialize()

void serialize ( SExpression root) const
overrideprotectedvirtual

Serialize into librepcb::SExpression node.

Parameters
rootRoot node to serialize into.

Reimplemented from LibraryBaseElement.

+ Here is the call graph for this function:

Member Data Documentation

◆ mParentUuid

tl::optional<Uuid> mParentUuid
protected

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