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#pragma once
21
24
25
46
53{
54public:
56
60 void Sync( const wxString& aForceRefresh,
61 std::function<void( int, int, const wxString& )> aProgressCallback );
62
63 static std::unique_ptr<LIB_SYMBOL> CreateSymbol( const NEW_SYMBOL_PROPERTIES& aProps, LIB_SYMBOL* aParent );
64
65 bool CreateNewSymbol( const wxString& aLibrary, const NEW_SYMBOL_PROPERTIES& aProps );
66
70 wxObjectDataPtr<LIB_TREE_MODEL_ADAPTER>& GetAdapter() { return m_adapter; }
71
72protected:
73 void OnDataChanged() const override;
74
75private:
80
81 wxObjectDataPtr<LIB_TREE_MODEL_ADAPTER> m_adapter;
82};
83
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.
LIB_SYMBOL_LIBRARY_MANAGER(SYMBOL_EDIT_FRAME &aFrame)
Symbol library management helper that is specific to the symbol library editor frame.
SYMBOL_TREE_SYNCHRONIZING_ADAPTER * getAdapter()
Define a library symbol object.
Definition lib_symbol.h:83
The symbol library editor main window.
SYMBOL_LIBRARY_MANAGER(SCH_BASE_FRAME &aFrame)