KiCad PCB EDA Suite
Loading...
Searching...
No Matches
symbol_library_query.h File Reference
#include <vector>
#include <lib_id.h>
#include <wx/string.h>

Go to the source code of this file.

Classes

struct  FOOTPRINT_USERS_QUERY
 All the information needed to query the symbol libraries for the symbols using a footprint. More...
 
struct  FOOTPRINT_USER_MATCH
 One symbol that uses a footprint, and the reason it matched. More...
 
struct  FOOTPRINT_USERS_RESULT
 The outcome of a footprint users query, and the JSON encoding used to move it across the Eeschema kiface. More...
 

Functions

FOOTPRINT_USERS_RESULT QueryFootprintUsers (KIWAY &aKiway, const FOOTPRINT_USERS_QUERY &aQuery)
 Ask the symbol libraries, for the symbols that use a given footprint (over the Eeschema kiface).
 
bool StartSymbolLibrariesLoad (KIWAY &aKiway)
 Start loading the symbol libraries in the background.
 
float GetSymbolLibrariesLoadProgress (KIWAY &aKiway)
 Return how far the background load of the symbol libraries has got.
 

Function Documentation

◆ GetSymbolLibrariesLoadProgress()

float GetSymbolLibrariesLoadProgress ( KIWAY & aKiway)

Return how far the background load of the symbol libraries has got.

Never blocks, so it can be polled while showing a loading indication.

Parameters
aKiwayis used to reach the eeschema kiface.
Returns
the fraction of the queued libraries processed so far, or 1.0 when there is nothing to wait for (for example without the Eeschema kiface).

Definition at line 251 of file symbol_library_query.cpp.

References KIWAY::FACE_SCH, KIWAY::KiFACE(), kiface(), and KIFACE_SYMBOLS_LOAD_PROGRESS.

Referenced by DIALOG_FOOTPRINT_USERS::symbolLibrariesReady().

◆ QueryFootprintUsers()

FOOTPRINT_USERS_RESULT QueryFootprintUsers ( KIWAY & aKiway,
const FOOTPRINT_USERS_QUERY & aQuery )

Ask the symbol libraries, for the symbols that use a given footprint (over the Eeschema kiface).

Parameters
aKiwayis used to reach the eeschema kiface.
aQueryis the footprint to look for and the kind of matches to return.
Returns
the matching "library:symbol" IDs. On failure Success is false and MatchingNames is empty, which happens when the eeschema kiface is unavailable (for example in a standalone tool without symbol support) or the query could not be performed.

Definition at line 182 of file symbol_library_query.cpp.

References KIWAY::FACE_SCH, FOOTPRINT_USERS_RESULT::FromJsonStr(), KIWAY::KiFACE(), kiface(), KIFACE_FILTER_FOOTPRINT_USERS, result, and FOOTPRINT_USERS_QUERY::ToJsonStr().

Referenced by DIALOG_FOOTPRINT_USERS::updateUsers().

◆ StartSymbolLibrariesLoad()

bool StartSymbolLibrariesLoad ( KIWAY & aKiway)

Start loading the symbol libraries in the background.

This call does not block. It is a no-op if the libraries are already loaded, or a load is already running.

Returns
true if the background load was successfully started, false otherwise.

Definition at line 220 of file symbol_library_query.cpp.

References KIWAY::FACE_SCH, KIWAY::KiFACE(), kiface(), and KIFACE_TRIGGER_SYMBOLS_LOAD.

Referenced by DIALOG_FOOTPRINT_USERS::DIALOG_FOOTPRINT_USERS().