KiCad PCB EDA Suite
Loading...
Searching...
No Matches
symbol_tree_model_adapter.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) 2017 Chris Pavlina <[email protected]>
5 * Copyright (C) 2014 Henner Zeller <[email protected]>
6 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
7 *
8 * This program is free software: you can redistribute it and/or modify it
9 * under the terms of the GNU General Public License as published by the
10 * Free Software Foundation, either version 3 of the License, or (at your
11 * option) any later version.
12 *
13 * This program is distributed in the hope that it will be useful, but
14 * WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * General Public License for more details.
17 *
18 * You should have received a copy of the GNU General Public License along
19 * with this program. If not, see <http://www.gnu.org/licenses/>.
20 */
21
22#ifndef SYMBOL_TREE_MODEL_ADAPTER_H
23#define SYMBOL_TREE_MODEL_ADAPTER_H
24
26
28class SCH_BASE_FRAME;
29
31{
32public:
39
45 static wxObjectDataPtr<LIB_TREE_MODEL_ADAPTER> Create( SCH_BASE_FRAME* aParent,
47
53 void AddLibraries( SCH_BASE_FRAME* aFrame );
54
55 void AddLibrary( wxString const& aLibNickname, bool pinned );
56
57 wxString GenerateInfo( LIB_ID const& aLibId, int aUnit ) override;
58
59protected:
64
66
67private:
71 static bool m_show_progress;
72
74
75 std::set<wxString> m_pending_load_libraries;
76 std::unique_ptr<wxTimer> m_check_pending_libraries_timer;
77};
78
79#endif // SYMBOL_TREE_MODEL_ADAPTER_H
A logical library item identifier and consists of various portions much like a URI.
Definition lib_id.h:49
LIB_TREE_MODEL_ADAPTER(EDA_BASE_FRAME *aParent, const wxString &aPinnedKey, APP_SETTINGS_BASE::LIB_TREE &aSettingsStruct)
Create the adapter.
@ SYMBOL_LIB
Definition project.h:195
A shim class between EDA_DRAW_FRAME and several derived classes: SYMBOL_EDIT_FRAME,...
An interface to the global shared library manager that is schematic-specific and linked to one projec...
wxString GenerateInfo(LIB_ID const &aLibId, int aUnit) override
void AddLibraries(SCH_BASE_FRAME *aFrame)
Add all the libraries in a SYMBOL_LIB_TABLE to the model.
static wxObjectDataPtr< LIB_TREE_MODEL_ADAPTER > Create(SCH_BASE_FRAME *aParent, SYMBOL_LIBRARY_ADAPTER *aLibs)
Factory function: create a model adapter in a reference-counting container.
std::unique_ptr< wxTimer > m_check_pending_libraries_timer
static bool m_show_progress
Flag to only show the symbol library table load progress dialog the first time.
void AddLibrary(wxString const &aLibNickname, bool pinned)
PROJECT::LIB_TYPE_T getLibType() override
SYMBOL_LIBRARY_ADAPTER * m_adapter
std::set< wxString > m_pending_load_libraries
SYMBOL_TREE_MODEL_ADAPTER(SCH_BASE_FRAME *aParent, SYMBOL_LIBRARY_ADAPTER *aManager)
Constructor; takes a set of libraries to be included in the search.