KiCad PCB EDA Suite
lib_symbol_library_manager.h
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#ifndef KICAD_LIB_SYMBOL_LIBRARY_MANAGER_H
21#define KICAD_LIB_SYMBOL_LIBRARY_MANAGER_H
22
25
26
33{
34public:
36
40 void Sync( const wxString& aForceRefresh,
41 std::function<void( int, int, const wxString& )> aProgressCallback );
42
46 wxObjectDataPtr<LIB_TREE_MODEL_ADAPTER>& GetAdapter() { return m_adapter; }
47
48protected:
49 void OnDataChanged() const override;
50
51private:
53 {
54 return static_cast<SYMBOL_TREE_SYNCHRONIZING_ADAPTER*>( m_adapter.get() );
55 }
56
57 wxObjectDataPtr<LIB_TREE_MODEL_ADAPTER> m_adapter;
58
60};
61
62
63#endif
Symbol library management helper that is specific to the symbol library editor frame.
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.
wxObjectDataPtr< LIB_TREE_MODEL_ADAPTER > & GetAdapter()
Return the adapter object that provides the stored data.
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.