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;
30class PCB_BASE_FRAME;
31
33{
34public:
40 static wxObjectDataPtr<LIB_TREE_MODEL_ADAPTER> Create( PCB_BASE_FRAME* aParent,
41 LIB_TABLE* aLibs );
42
43 void AddLibraries( EDA_BASE_FRAME* aParent );
44
45 wxString GenerateInfo( LIB_ID const& aLibId, int aUnit ) override;
46
47protected:
52
53 std::vector<LIB_TREE_ITEM*> getFootprints( const wxString& aLibName );
54
56
57protected:
59};
60
61#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
PROJECT::LIB_TYPE_T getLibType() override
void AddLibraries(EDA_BASE_FRAME *aParent)
std::vector< LIB_TREE_ITEM * > getFootprints(const wxString &aLibName)
static wxObjectDataPtr< LIB_TREE_MODEL_ADAPTER > Create(PCB_BASE_FRAME *aParent, LIB_TABLE *aLibs)
Factory function: create a model adapter in a reference-counting container.
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.
Base PCB main window class for Pcbnew, Gerbview, and CvPcb footprint viewer.
LIB_TYPE_T
Definition: project.h:189
@ FOOTPRINT_LIB
Definition: project.h:191