LibrePCB Developers Documentation
Loading...
Searching...
No Matches
Organization Class Referencefinal

The Organization class represents a PCB manufacturer, assembly house etc. More...

#include <organization.h>

+ Inheritance diagram for Organization:
+ Collaboration diagram for Organization:

Signals

void pcbDesignRulesModified ()
 

Public Member Functions

 Organization ()=delete
 
 Organization (const Organization &other)=delete
 
 Organization (const Uuid &uuid, const Version &version, const QString &author, const ElementName &name_en_US, const QString &description_en_US, const QString &keywords_en_US)
 
 ~Organization () noexcept
 
const QByteArray & getLogoPng () const noexcept
 
QPixmap getLogoPixmap () const noexcept
 
const QUrl & getUrl () const noexcept
 
const QString & getCountry () const noexcept
 
const QStringList & getFabs () const noexcept
 
const QStringList & getShipping () const noexcept
 
bool isSponsor () const noexcept
 
int getPriority () const noexcept
 
const QVector< OrganizationPcbDesignRules > & getPcbDesignRules () const noexcept
 
const OrganizationPcbDesignRulesfindPcbDesignRules (const Uuid &uuid) const noexcept
 
const OutputJobListgetPcbOutputJobs () const noexcept
 
std::shared_ptr< const OutputJobfindPcbOutputJob (const QString &type) const noexcept
 
const OutputJobListgetAssemblyOutputJobs () const noexcept
 
const OutputJobListgetUserOutputJobs () const noexcept
 
void setLogoPng (const QByteArray &png) noexcept
 
void setUrl (const QUrl &url) noexcept
 
void setCountry (const QString &country) noexcept
 
void setFabs (const QStringList &list) noexcept
 
void setShipping (const QStringList &list) noexcept
 
void setIsSponsor (bool sponsor) noexcept
 
void setPriority (int priority) noexcept
 
void setPcbDesignRules (const QVector< OrganizationPcbDesignRules > &rules) noexcept
 
void setPcbOutputJobs (const OutputJobList &jobs) noexcept
 
void setAssemblyOutputJobs (const OutputJobList &jobs) noexcept
 
void setUserOutputJobs (const OutputJobList &jobs) noexcept
 
virtual RuleCheckMessageList runChecks () const override
 
virtual void save () override
 
Organizationoperator= (const Organization &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 setCreated (const QDateTime &created) 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
 
bool setMessageApproved (const SExpression &approval, bool approved) noexcept
 
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< Organizationopen (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
 

Protected Member Functions

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

Private Member Functions

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

Private Attributes

QByteArray mLogoPng
 
QUrl mUrl
 
QString mCountry
 
QStringList mFabs
 
QStringList mShipping
 
bool mIsSponsor
 
int mPriority
 Priority to influence the sort order of organizations.
 
QVector< OrganizationPcbDesignRulesmPcbDesignRules
 
OutputJobList mPcbOutputJobs
 
OutputJobList mAssemblyOutputJobs
 
OutputJobList mUserOutputJobs
 
QMap< QString, QList< SExpression > > mOptions
 

Additional Inherited Members

- Static Protected Member Functions inherited from LibraryBaseElement
static Version readFileFormat (const TransactionalDirectory &directory, const QString &fileName)
 
- Protected Attributes inherited from LibraryBaseElement
const QString mShortElementName
 e.g. "lib", "cmpcat"
 
const QString mLongElementName
 e.g. "library", "component_category"
 
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 Organization class represents a PCB manufacturer, assembly house etc.

Constructor & Destructor Documentation

◆ Organization() [1/4]

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

◆ Organization() [2/4]

Organization ( const Organization other)
delete

◆ Organization() [3/4]

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

◆ ~Organization()

~Organization ( )
noexcept

◆ Organization() [4/4]

Organization ( std::unique_ptr< TransactionalDirectory directory,
const SExpression root 
)
private
+ Here is the call graph for this function:

Member Function Documentation

◆ getLogoPng()

const QByteArray & getLogoPng ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getLogoPixmap()

QPixmap getLogoPixmap ( ) const
noexcept

◆ getUrl()

const QUrl & getUrl ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getCountry()

const QString & getCountry ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getFabs()

const QStringList & getFabs ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getShipping()

const QStringList & getShipping ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ isSponsor()

bool isSponsor ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getPriority()

int getPriority ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getPcbDesignRules()

const QVector< OrganizationPcbDesignRules > & getPcbDesignRules ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ findPcbDesignRules()

const OrganizationPcbDesignRules * findPcbDesignRules ( const Uuid uuid) const
noexcept

◆ getPcbOutputJobs()

const OutputJobList & getPcbOutputJobs ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ findPcbOutputJob()

std::shared_ptr< const OutputJob > findPcbOutputJob ( const QString &  type) const
noexcept

◆ getAssemblyOutputJobs()

const OutputJobList & getAssemblyOutputJobs ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ getUserOutputJobs()

const OutputJobList & getUserOutputJobs ( ) const
inlinenoexcept
+ Here is the caller graph for this function:

◆ setLogoPng()

void setLogoPng ( const QByteArray &  png)
inlinenoexcept
+ Here is the caller graph for this function:

◆ setUrl()

void setUrl ( const QUrl &  url)
inlinenoexcept
+ Here is the caller graph for this function:

◆ setCountry()

void setCountry ( const QString &  country)
inlinenoexcept

◆ setFabs()

void setFabs ( const QStringList &  list)
inlinenoexcept

◆ setShipping()

void setShipping ( const QStringList &  list)
inlinenoexcept

◆ setIsSponsor()

void setIsSponsor ( bool  sponsor)
inlinenoexcept

◆ setPriority()

void setPriority ( int  priority)
inlinenoexcept
+ Here is the caller graph for this function:

◆ setPcbDesignRules()

void setPcbDesignRules ( const QVector< OrganizationPcbDesignRules > &  rules)
noexcept
+ Here is the caller graph for this function:

◆ setPcbOutputJobs()

void setPcbOutputJobs ( const OutputJobList jobs)
inlinenoexcept
+ Here is the caller graph for this function:

◆ setAssemblyOutputJobs()

void setAssemblyOutputJobs ( const OutputJobList jobs)
inlinenoexcept
+ Here is the caller graph for this function:

◆ setUserOutputJobs()

void setUserOutputJobs ( const OutputJobList jobs)
inlinenoexcept

◆ runChecks()

RuleCheckMessageList runChecks ( ) const
overridevirtual

Reimplemented from LibraryBaseElement.

+ Here is the call graph for this function:

◆ save()

void save ( )
overridevirtual

Reimplemented from LibraryBaseElement.

+ Here is the call graph for this function:

◆ operator=()

Organization & operator= ( const Organization rhs)
delete

◆ open()

std::unique_ptr< Organization > 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 caller graph for this function:

◆ pcbDesignRulesModified

void pcbDesignRulesModified ( )
signal
+ Here is the caller graph for this function:

◆ 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

◆ mLogoPng

QByteArray mLogoPng
private

◆ mUrl

QUrl mUrl
private

◆ mCountry

QString mCountry
private

◆ mFabs

QStringList mFabs
private

◆ mShipping

QStringList mShipping
private

◆ mIsSponsor

bool mIsSponsor
private

◆ mPriority

int mPriority
private

Priority to influence the sort order of organizations.

Convention:

  • 100 for LibrePCB Fab
  • 50..99 for user-created organizations
  • 1..49 for important organizations (e.g. LibrePCB sponsors)
  • 0 for any other organizations (default value)

◆ mPcbDesignRules

QVector<OrganizationPcbDesignRules> mPcbDesignRules
private

◆ mPcbOutputJobs

OutputJobList mPcbOutputJobs
private

◆ mAssemblyOutputJobs

OutputJobList mAssemblyOutputJobs
private

◆ mUserOutputJobs

OutputJobList mUserOutputJobs
private

◆ mOptions

QMap<QString, QList<SExpression> > mOptions
private

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