20#ifndef LIBREPCB_CORE_LIBRARY_H
21#define LIBREPCB_CORE_LIBRARY_H
26#include "../types/simplestring.h"
27#include "../types/uuid.h"
54 const ElementName& name_en_US,
const QString& description_en_US,
55 const QString& keywords_en_US);
59 template <typename ElementType>
78 virtual void save()
override;
80 template <
typename ElementType>
89 bool abortBeforeMigration = false);
91 return QStringLiteral(
"lib");
94 return QStringLiteral(
"library");
101 Library(std::unique_ptr<TransactionalDirectory> directory,
The LibraryBaseElement class.
Definition librarybaseelement.h:48
The Library class represents a library directory.
Definition library.h:46
void setIcon(const QByteArray &png) noexcept
Definition library.h:72
void setManufacturer(const SimpleString &value) noexcept
Definition library.h:73
void setUrl(const QUrl &url) noexcept
Definition library.h:68
QUrl mUrl
Definition library.h:105
SimpleString mManufacturer
Definition library.h:108
void setDependencies(const QSet< Uuid > &deps) noexcept
Definition library.h:69
const SimpleString & getManufacturer() const noexcept
Definition library.h:65
static std::unique_ptr< Library > open(std::unique_ptr< TransactionalDirectory > directory, bool abortBeforeMigration=false)
Definition library.cpp:169
QByteArray mIcon
Definition library.h:107
const QSet< Uuid > & getDependencies() const noexcept
Definition library.h:62
virtual void save() override
Definition library.cpp:117
QStringList searchForElements() const noexcept
Definition library.cpp:142
QSet< Uuid > mDependencies
Definition library.h:106
static QString getLongElementName() noexcept
Definition library.h:93
Library(const Library &other)=delete
QPixmap getIconAsPixmap() const noexcept
Definition library.cpp:107
~Library() noexcept
Definition library.cpp:85
const QUrl & getUrl() const noexcept
Definition library.h:61
virtual void serialize(SExpression &root) const override
Serialize into librepcb::SExpression node.
Definition library.cpp:201
QString getElementsDirectoryName() const noexcept
Definition library.cpp:93
const QByteArray & getIcon() const noexcept
Definition library.h:63
virtual void moveTo(TransactionalDirectory &dest) override
Definition library.cpp:128
static QString getShortElementName() noexcept
Definition library.h:90
The SExpression class.
Definition sexpression.h:69
Helper class to access a subdirectory of TransactionalFileSystem.
Definition transactionaldirectory.h:51
The Uuid class is a replacement for QUuid to get UUID strings without {} braces.
Definition uuid.h:56
The Version class represents a version number in the format "1.42.7".
Definition version.h:58
Definition occmodel.cpp:76
type_safe::constrained_type< QString, SimpleStringConstraint, SimpleStringVerifier > SimpleString
Definition simplestring.h:79
type_safe::constrained_type< QString, ElementNameConstraint, ElementNameVerifier > ElementName
Definition elementname.h:84