LibrePCB Developers Documentation
PackageCategory Class Referencefinal

The PackageCategory class. More...

#include <packagecategory.h>

+ Inheritance diagram for PackageCategory:
+ Collaboration diagram for PackageCategory:

Public Member Functions

 PackageCategory ()=delete
 
 PackageCategory (const PackageCategory &other)=delete
 
 PackageCategory (const Uuid &uuid, const Version &version, const QString &author, const ElementName &name_en_US, const QString &description_en_US, const QString &keywords_en_US)
 
 ~PackageCategory () noexcept
 
PackageCategoryoperator= (const PackageCategory &rhs)=delete
 
- Public Member Functions inherited from LibraryCategory
 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
 

Static Public Member Functions

static std::unique_ptr< PackageCategoryopen (std::unique_ptr< TransactionalDirectory > directory, bool abortBeforeMigration=false)
 
static QString getShortElementName () noexcept
 
static QString getLongElementName () noexcept
 
- 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
 

Private Member Functions

 PackageCategory (std::unique_ptr< TransactionalDirectory > directory, const SExpression &root)
 

Additional Inherited Members

- Protected Member Functions inherited from LibraryCategory
virtual void serialize (SExpression &root) const override
 Serialize into librepcb::SExpression node. More...
 
- Protected Member Functions inherited from LibraryBaseElement
void serializeMessageApprovals (SExpression &root) const
 
void removeObsoleteMessageApprovals ()
 
- Static Protected Member Functions inherited from LibraryBaseElement
static Version readFileFormat (const TransactionalDirectory &directory, const QString &fileName)
 
- Protected Attributes inherited from LibraryCategory
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
 

Detailed Description

The PackageCategory class.

Constructor & Destructor Documentation

◆ PackageCategory() [1/4]

PackageCategory ( )
delete
+ Here is the caller graph for this function:

◆ PackageCategory() [2/4]

PackageCategory ( const PackageCategory other)
delete

◆ PackageCategory() [3/4]

PackageCategory ( const Uuid uuid,
const Version version,
const QString &  author,
const ElementName name_en_US,
const QString &  description_en_US,
const QString &  keywords_en_US 
)

◆ ~PackageCategory()

~PackageCategory ( )
noexcept

◆ PackageCategory() [4/4]

PackageCategory ( std::unique_ptr< TransactionalDirectory directory,
const SExpression root 
)
private

Member Function Documentation

◆ operator=()

PackageCategory& operator= ( const PackageCategory rhs)
delete

◆ open()

std::unique_ptr< PackageCategory > open ( std::unique_ptr< TransactionalDirectory directory,
bool  abortBeforeMigration = false 
)
static
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getShortElementName()

static QString getShortElementName ( )
inlinestaticnoexcept
+ Here is the caller graph for this function:

◆ getLongElementName()

static QString getLongElementName ( )
inlinestaticnoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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