LibrePCB Developers Documentation
EagleLibraryImport Class Referencefinal

EAGLE library (*.lbr) import. More...

#include <eaglelibraryimport.h>

Inherits QThread.

+ Collaboration diagram for EagleLibraryImport:

Classes

struct  Component
 
struct  Device
 
struct  Package
 
struct  Symbol
 

Signals

void symbolCheckStateChanged (const QString &name, Qt::CheckState state)
 
void packageCheckStateChanged (const QString &name, Qt::CheckState state)
 
void componentCheckStateChanged (const QString &name, Qt::CheckState state)
 
void progressStatus (const QString &status)
 
void progressPercent (int percent)
 
void errorOccurred (const QString &error)
 
void finished (const QStringList &errors)
 

Public Member Functions

 EagleLibraryImport (const EagleLibraryImport &other)=delete
 
 EagleLibraryImport (const FilePath &dstLibFp, QObject *parent=nullptr) noexcept
 
 ~EagleLibraryImport () noexcept
 
const FilePathgetLoadedFilePath () const noexcept
 
int getTotalElementsCount () const noexcept
 
int getCheckedElementsCount () const noexcept
 
int getCheckedSymbolsCount () const noexcept
 
int getCheckedPackagesCount () const noexcept
 
int getCheckedComponentsCount () const noexcept
 
int getCheckedDevicesCount () const noexcept
 
const QVector< Symbol > & getSymbols () const noexcept
 
const QVector< Package > & getPackages () const noexcept
 
const QVector< Component > & getComponents () const noexcept
 
const QVector< Device > & getDevices () const noexcept
 
void setNamePrefix (const QString &prefix) noexcept
 
void setSymbolCategories (const QSet< Uuid > &uuids) noexcept
 
void setPackageCategories (const QSet< Uuid > &uuids) noexcept
 
void setComponentCategories (const QSet< Uuid > &uuids) noexcept
 
void setDeviceCategories (const QSet< Uuid > &uuids) noexcept
 
void setSymbolChecked (const QString &name, bool checked) noexcept
 
void setPackageChecked (const QString &name, bool checked) noexcept
 
void setComponentChecked (const QString &name, bool checked) noexcept
 
void setDeviceChecked (const QString &name, bool checked) noexcept
 
void reset () noexcept
 
QStringList open (const FilePath &lbr)
 
EagleLibraryImportoperator= (const EagleLibraryImport &rhs)=delete
 

Private Member Functions

template<typename T >
int getCheckedElementsCount (const QVector< T > &elements) const noexcept
 
template<typename T >
void setElementChecked (QVector< T > &elements, const QString &name, bool checked) noexcept
 
void updateDependencies () noexcept
 
template<typename T >
bool setElementDependent (T &element, bool dependent) noexcept
 
QVector< std::shared_ptr< Polygon > > convertWires (const QString &element, const QList< parseagle::Wire > &wires)
 
void tryOrRaiseError (const QString &element, std::function< void()> func)
 
void raiseImportError (const QString &element, const QString &error) noexcept
 
void run () noexcept override
 

Private Attributes

FilePath mDestinationLibraryFp
 
QString mNamePrefix
 
Version mVersion
 
QString mAuthor
 
QString mKeywords
 
QSet< UuidmSymbolCategories
 
QSet< UuidmPackageCategories
 
QSet< UuidmComponentCategories
 
QSet< UuidmDeviceCategories
 
bool mAbort
 
FilePath mLoadedFilePath
 
QStringList mImportErrors
 
QVector< SymbolmSymbols
 
QVector< PackagemPackages
 
QVector< ComponentmComponents
 
QVector< DevicemDevices
 

Detailed Description

EAGLE library (*.lbr) import.

Constructor & Destructor Documentation

◆ EagleLibraryImport() [1/2]

EagleLibraryImport ( const EagleLibraryImport other)
delete

◆ EagleLibraryImport() [2/2]

EagleLibraryImport ( const FilePath dstLibFp,
QObject *  parent = nullptr 
)
noexcept

◆ ~EagleLibraryImport()

~EagleLibraryImport ( )
noexcept

Member Function Documentation

◆ getLoadedFilePath()

const FilePath& getLoadedFilePath ( ) const
inlinenoexcept

◆ getTotalElementsCount()

int getTotalElementsCount ( ) const
noexcept

◆ getCheckedElementsCount() [1/2]

int getCheckedElementsCount ( ) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCheckedSymbolsCount()

int getCheckedSymbolsCount ( ) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCheckedPackagesCount()

int getCheckedPackagesCount ( ) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCheckedComponentsCount()

int getCheckedComponentsCount ( ) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getCheckedDevicesCount()

int getCheckedDevicesCount ( ) const
noexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getSymbols()

const QVector<Symbol>& getSymbols ( ) const
inlinenoexcept

◆ getPackages()

const QVector<Package>& getPackages ( ) const
inlinenoexcept

◆ getComponents()

const QVector<Component>& getComponents ( ) const
inlinenoexcept

◆ getDevices()

const QVector<Device>& getDevices ( ) const
inlinenoexcept

◆ setNamePrefix()

void setNamePrefix ( const QString &  prefix)
inlinenoexcept

◆ setSymbolCategories()

void setSymbolCategories ( const QSet< Uuid > &  uuids)
inlinenoexcept

◆ setPackageCategories()

void setPackageCategories ( const QSet< Uuid > &  uuids)
inlinenoexcept

◆ setComponentCategories()

void setComponentCategories ( const QSet< Uuid > &  uuids)
inlinenoexcept

◆ setDeviceCategories()

void setDeviceCategories ( const QSet< Uuid > &  uuids)
inlinenoexcept

◆ setSymbolChecked()

void setSymbolChecked ( const QString &  name,
bool  checked 
)
noexcept
+ Here is the call graph for this function:

◆ setPackageChecked()

void setPackageChecked ( const QString &  name,
bool  checked 
)
noexcept
+ Here is the call graph for this function:

◆ setComponentChecked()

void setComponentChecked ( const QString &  name,
bool  checked 
)
noexcept
+ Here is the call graph for this function:

◆ setDeviceChecked()

void setDeviceChecked ( const QString &  name,
bool  checked 
)
noexcept
+ Here is the call graph for this function:

◆ reset()

void reset ( )
noexcept
+ Here is the caller graph for this function:

◆ open()

QStringList open ( const FilePath lbr)
+ Here is the call graph for this function:

◆ operator=()

EagleLibraryImport& operator= ( const EagleLibraryImport rhs)
delete

◆ symbolCheckStateChanged

void symbolCheckStateChanged ( const QString &  name,
Qt::CheckState  state 
)
signal
+ Here is the caller graph for this function:

◆ packageCheckStateChanged

void packageCheckStateChanged ( const QString &  name,
Qt::CheckState  state 
)
signal
+ Here is the caller graph for this function:

◆ componentCheckStateChanged

void componentCheckStateChanged ( const QString &  name,
Qt::CheckState  state 
)
signal
+ Here is the caller graph for this function:

◆ progressStatus

void progressStatus ( const QString &  status)
signal
+ Here is the caller graph for this function:

◆ progressPercent

void progressPercent ( int  percent)
signal
+ Here is the caller graph for this function:

◆ errorOccurred

void errorOccurred ( const QString &  error)
signal
+ Here is the caller graph for this function:

◆ finished

void finished ( const QStringList &  errors)
signal
+ Here is the caller graph for this function:

◆ getCheckedElementsCount() [2/2]

int getCheckedElementsCount ( const QVector< T > &  elements) const
privatenoexcept

◆ setElementChecked()

void setElementChecked ( QVector< T > &  elements,
const QString &  name,
bool  checked 
)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ updateDependencies()

void updateDependencies ( )
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setElementDependent()

bool setElementDependent ( T &  element,
bool  dependent 
)
privatenoexcept
+ Here is the caller graph for this function:

◆ convertWires()

QVector< std::shared_ptr< Polygon > > convertWires ( const QString &  element,
const QList< parseagle::Wire > &  wires 
)
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ tryOrRaiseError()

void tryOrRaiseError ( const QString &  element,
std::function< void()>  func 
)
private
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ raiseImportError()

void raiseImportError ( const QString &  element,
const QString &  error 
)
privatenoexcept
+ Here is the caller graph for this function:

◆ run()

void run ( )
overrideprivatenoexcept
+ Here is the call graph for this function:

Member Data Documentation

◆ mDestinationLibraryFp

FilePath mDestinationLibraryFp
private

◆ mNamePrefix

QString mNamePrefix
private

◆ mVersion

Version mVersion
private

◆ mAuthor

QString mAuthor
private

◆ mKeywords

QString mKeywords
private

◆ mSymbolCategories

QSet<Uuid> mSymbolCategories
private

◆ mPackageCategories

QSet<Uuid> mPackageCategories
private

◆ mComponentCategories

QSet<Uuid> mComponentCategories
private

◆ mDeviceCategories

QSet<Uuid> mDeviceCategories
private

◆ mAbort

bool mAbort
private

◆ mLoadedFilePath

FilePath mLoadedFilePath
private

◆ mImportErrors

QStringList mImportErrors
private

◆ mSymbols

QVector<Symbol> mSymbols
private

◆ mPackages

QVector<Package> mPackages
private

◆ mComponents

QVector<Component> mComponents
private

◆ mDevices

QVector<Device> mDevices
private

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