KiCad PCB EDA Suite
Loading...
Searching...
No Matches
lib_symbol_library_manager.cpp
Go to the documentation of this file.
1/*
2* This program source code file is part of KiCad, a free EDA CAD application.
3*
4* Copyright (C) 2022 KiCad Developers, see AUTHORS.txt for contributors.
5*
6* This program is free software: you can redistribute it and/or modify it
7* under the terms of the GNU General Public License as published by the
8* Free Software Foundation, either version 3 of the License, or (at your
9* option) any later version.
10*
11* This program is distributed in the hope that it will be useful, but
12* WITHOUT ANY WARRANTY; without even the implied warranty of
13* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14* General Public License for more details.
15*
16* You should have received a copy of the GNU General Public License along
17* with this program. If not, see <http://www.gnu.org/licenses/>.
18*/
19
20#include <lib_logger.h>
22#include <symbol_edit_frame.h>
23
24
26 SYMBOL_LIBRARY_MANAGER( aFrame ),
27 m_syncHash( 0 )
28{
30 m_adapter->ShowUnits( false );
31}
32
33
34void LIB_SYMBOL_LIBRARY_MANAGER::Sync( const wxString& aForceRefresh,
35 std::function<void( int, int,
36 const wxString& )> aProgressCallback )
37{
39 {
40 getAdapter()->Sync( aForceRefresh, aProgressCallback );
42 }
44}
45
46
48{
49 static_cast<SYMBOL_EDIT_FRAME&>( m_frame ).SyncLibraries( false );
50}
void Deactivate()
Definition: lib_logger.cpp:49
void Activate()
Definition: lib_logger.cpp:39
wxObjectDataPtr< LIB_TREE_MODEL_ADAPTER > m_adapter
void OnDataChanged() const override
Extract library name basing on the file name.
void Sync(const wxString &aForceRefresh, std::function< void(int, int, const wxString &)> aProgressCallback)
Updates the SYMBOL_LIBRARY_MANAGER data to synchronize with Symbol Library Table.
int m_syncHash
Symbol lib table hash value from last synchronization.
LIB_SYMBOL_LIBRARY_MANAGER(SYMBOL_EDIT_FRAME &aFrame)
SYMBOL_TREE_SYNCHRONIZING_ADAPTER * getAdapter()
The symbol library editor main window.
Class to handle modifications to the symbol libraries.
SYMBOL_LIB_TABLE * symTable() const
Class to store a working copy of a LIB_SYMBOL object and editor context.
SCH_BASE_FRAME & m_frame
Parent frame.
static wxObjectDataPtr< LIB_TREE_MODEL_ADAPTER > Create(SYMBOL_EDIT_FRAME *aParent, SYMBOL_LIBRARY_MANAGER *aLibs)
void Sync(const wxString &aForceRefresh, std::function< void(int, int, const wxString &)> aProgressCallback)