KiCad PCB EDA Suite
Loading...
Searching...
No Matches
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 The 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
47
54{
55public:
57
61 void Sync( const wxString& aForceRefresh,
62 std::function<void( int, int, const wxString& )> aProgressCallback );
63
64 static std::unique_ptr<LIB_SYMBOL> CreateSymbol( const NEW_SYMBOL_PROPERTIES& aProps,
65 LIB_SYMBOL* aParent );
66
67 bool CreateNewSymbol( const wxString& aLibrary, const NEW_SYMBOL_PROPERTIES& aProps );
68
72 wxObjectDataPtr<LIB_TREE_MODEL_ADAPTER>& GetAdapter() { return m_adapter; }
73
74protected:
75 void OnDataChanged() const override;
76
77private:
82
83 wxObjectDataPtr<LIB_TREE_MODEL_ADAPTER> m_adapter;
84
86};
87
88
89#endif
bool CreateNewSymbol(const wxString &aLibrary, const NEW_SYMBOL_PROPERTIES &aProps)
wxObjectDataPtr< LIB_TREE_MODEL_ADAPTER > m_adapter
static std::unique_ptr< LIB_SYMBOL > CreateSymbol(const NEW_SYMBOL_PROPERTIES &aProps, LIB_SYMBOL *aParent)
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()
Define a library symbol object.
Definition lib_symbol.h:85
The symbol library editor main window.
SYMBOL_LIBRARY_MANAGER(SCH_BASE_FRAME &aFrame)