LibrePCB Developers Documentation
KiCadLibraryImport Class Referencefinal

KiCad library import. More...

#include <kicadlibraryimport.h>

Inherits QObject.

+ Collaboration diagram for KiCadLibraryImport:

Classes

struct  Footprint
 
struct  FootprintLibrary
 
struct  Gate
 
struct  Package3DLibrary
 
struct  Result
 
struct  Symbol
 
struct  SymbolLibrary
 

Public Types

enum class  State
 

Signals

void symbolCheckStateChanged (const QString &libName, const QString &symName, Qt::CheckState state)
 
void packageCheckStateChanged (const QString &libName, const QString &fptName, Qt::CheckState state)
 
void componentCheckStateChanged (const QString &libName, const QString &symName, Qt::CheckState state)
 
void progressPercent (int percent)
 
void progressStatus (QString status)
 
void scanFinished ()
 
void parseFinished ()
 
void importFinished ()
 

Public Member Functions

 KiCadLibraryImport (const KiCadLibraryImport &other)=delete
 
 KiCadLibraryImport (WorkspaceLibraryDb &db, const FilePath &dstLibFp, QObject *parent=nullptr) noexcept
 
 ~KiCadLibraryImport () noexcept
 
State getState () const noexcept
 
const FilePathgetLoadedLibsPath () const noexcept
 
const FilePathgetLoadedShapes3dPath () const noexcept
 
bool canStartParsing () const noexcept
 
bool canStartSelecting () const noexcept
 
bool canStartImport () 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 &libName, const QString &symName, bool checked) noexcept
 
void setPackageChecked (const QString &libName, const QString &fptName, bool checked) noexcept
 
void setComponentChecked (const QString &libName, const QString &symName, bool checked) noexcept
 
void setDeviceChecked (const QString &libName, const QString &symName, bool checked) noexcept
 
void reset () noexcept
 
bool startScan (const FilePath &libsFp, const FilePath &shapes3dFp, std::shared_ptr< MessageLogger > log) noexcept
 
bool startParse (std::shared_ptr< MessageLogger > log) noexcept
 
bool startImport (std::shared_ptr< MessageLogger > log) noexcept
 
bool isRunning () const noexcept
 
std::shared_ptr< ResultgetResult () noexcept
 
void cancel () noexcept
 
KiCadLibraryImportoperator= (const KiCadLibraryImport &rhs)=delete
 

Private Member Functions

std::shared_ptr< Resultscan (FilePath libsFp, const FilePath &shapes3dFp, std::shared_ptr< MessageLogger > log) noexcept
 
std::shared_ptr< Resultparse (std::shared_ptr< Result > result, std::shared_ptr< MessageLogger > log) noexcept
 
std::shared_ptr< Resultimport (std::shared_ptr< Result > result, std::shared_ptr< MessageLogger > log) noexcept
 
template<typename T >
bool isAlreadyImported (const QString &generatedBy) const noexcept
 
void updateDependencies (std::shared_ptr< Result > result) noexcept
 

Private Attributes

const FilePath mDestinationLibraryFp
 
WorkspaceLibraryDbmLibraryDb
 
QScopedPointer< KiCadLibraryConverterSettingsmSettings
 
FilePath mLoadedLibsFp
 
FilePath mLoadedShapes3dFp
 
QFuture< std::shared_ptr< Result > > mFuture
 
State mState
 
bool mAbort
 

Detailed Description

KiCad library import.

Member Enumeration Documentation

◆ State

enum class State
strong
Enumerator
Reset 
Scanning 
Scanned 
Parsing 
Parsed 
Importing 
Imported 

Constructor & Destructor Documentation

◆ KiCadLibraryImport() [1/2]

KiCadLibraryImport ( const KiCadLibraryImport other)
delete

◆ KiCadLibraryImport() [2/2]

KiCadLibraryImport ( WorkspaceLibraryDb db,
const FilePath dstLibFp,
QObject *  parent = nullptr 
)
noexcept

◆ ~KiCadLibraryImport()

~KiCadLibraryImport ( )
noexcept
+ Here is the call graph for this function:

Member Function Documentation

◆ getState()

State getState ( ) const
inlinenoexcept

◆ getLoadedLibsPath()

const FilePath & getLoadedLibsPath ( ) const
inlinenoexcept

◆ getLoadedShapes3dPath()

const FilePath & getLoadedShapes3dPath ( ) const
inlinenoexcept

◆ canStartParsing()

bool canStartParsing ( ) const
noexcept

◆ canStartSelecting()

bool canStartSelecting ( ) const
noexcept

◆ canStartImport()

bool canStartImport ( ) const
noexcept

◆ setNamePrefix()

void setNamePrefix ( const QString &  prefix)
noexcept

◆ setSymbolCategories()

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

◆ setPackageCategories()

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

◆ setComponentCategories()

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

◆ setDeviceCategories()

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

◆ setSymbolChecked()

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

◆ setPackageChecked()

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

◆ setComponentChecked()

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

◆ setDeviceChecked()

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

◆ reset()

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

◆ startScan()

bool startScan ( const FilePath libsFp,
const FilePath shapes3dFp,
std::shared_ptr< MessageLogger log 
)
noexcept
+ Here is the call graph for this function:

◆ startParse()

bool startParse ( std::shared_ptr< MessageLogger log)
noexcept
+ Here is the call graph for this function:

◆ startImport()

bool startImport ( std::shared_ptr< MessageLogger log)
noexcept
+ Here is the call graph for this function:

◆ isRunning()

bool isRunning ( ) const
noexcept

◆ getResult()

std::shared_ptr< KiCadLibraryImport::Result > getResult ( )
noexcept

◆ cancel()

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

◆ operator=()

KiCadLibraryImport & operator= ( const KiCadLibraryImport rhs)
delete

◆ symbolCheckStateChanged

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

◆ packageCheckStateChanged

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

◆ componentCheckStateChanged

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

◆ progressPercent

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

◆ progressStatus

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

◆ scanFinished

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

◆ parseFinished

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

◆ importFinished

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

◆ scan()

std::shared_ptr< KiCadLibraryImport::Result > scan ( FilePath  libsFp,
const FilePath shapes3dFp,
std::shared_ptr< MessageLogger log 
)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parse()

std::shared_ptr< KiCadLibraryImport::Result > parse ( std::shared_ptr< Result result,
std::shared_ptr< MessageLogger log 
)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ import()

std::shared_ptr< KiCadLibraryImport::Result > import ( std::shared_ptr< Result result,
std::shared_ptr< MessageLogger log 
)
privatenoexcept
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isAlreadyImported()

bool isAlreadyImported ( const QString &  generatedBy) const
privatenoexcept
+ Here is the call graph for this function:

◆ updateDependencies()

void updateDependencies ( std::shared_ptr< Result result)
privatenoexcept
+ Here is the call graph for this function:

Member Data Documentation

◆ mDestinationLibraryFp

const FilePath mDestinationLibraryFp
private

◆ mLibraryDb

WorkspaceLibraryDb& mLibraryDb
private

◆ mSettings

QScopedPointer<KiCadLibraryConverterSettings> mSettings
private

◆ mLoadedLibsFp

FilePath mLoadedLibsFp
private

◆ mLoadedShapes3dFp

FilePath mLoadedShapes3dFp
private

◆ mFuture

QFuture<std::shared_ptr<Result> > mFuture
private

◆ mState

State mState
private

◆ mAbort

bool mAbort
private

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