KiCad PCB EDA Suite
Loading...
Searching...
No Matches
fp_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 (C) 2014-2022 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 FP_TREE_MODEL_ADAPTER_H
23#define FP_TREE_MODEL_ADAPTER_H
24
26#include <footprint_info.h>
27
28class LIB_TABLE;
29class FP_LIB_TABLE;
30
32{
33public:
39 static wxObjectDataPtr<LIB_TREE_MODEL_ADAPTER> Create( EDA_BASE_FRAME* aParent,
40 LIB_TABLE* aLibs );
41
42 void AddLibraries( EDA_BASE_FRAME* aParent );
43
44 wxString GenerateInfo( LIB_ID const& aLibId, int aUnit ) override;
45
46protected:
51
52 std::vector<LIB_TREE_ITEM*> getFootprints( const wxString& aLibName );
53
54 bool isSymbolModel() override { return false; }
55
56protected:
58};
59
60#endif // FP_TREE_MODEL_ADAPTER_H
The base frame for deriving all KiCad main window classes.
wxString GenerateInfo(LIB_ID const &aLibId, int aUnit) override
static wxObjectDataPtr< LIB_TREE_MODEL_ADAPTER > Create(EDA_BASE_FRAME *aParent, LIB_TABLE *aLibs)
Factory function: create a model adapter in a reference-counting container.
void AddLibraries(EDA_BASE_FRAME *aParent)
std::vector< LIB_TREE_ITEM * > getFootprints(const wxString &aLibName)
A logical library item identifier and consists of various portions much like a URI.
Definition: lib_id.h:49
Manage LIB_TABLE_ROW records (rows), and can be searched based on library nickname.