KiCad PCB EDA Suite
Loading...
Searching...
No Matches
design_block_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) 2014-2024 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 DESIGN_BLOCK_TREE_MODEL_ADAPTER_H
21#define DESIGN_BLOCK_TREE_MODEL_ADAPTER_H
22
24
25class LIB_TABLE;
27
29{
30public:
36 static wxObjectDataPtr<LIB_TREE_MODEL_ADAPTER> Create( EDA_BASE_FRAME* aParent,
37 LIB_TABLE* aLibs );
38
39 void AddLibraries( EDA_BASE_FRAME* aParent );
40 void ClearLibraries();
41
42 wxString GenerateInfo( LIB_ID const& aLibId, int aUnit ) override;
43
45
46protected:
51
52 std::vector<LIB_TREE_ITEM*> getDesignBlocks( EDA_BASE_FRAME* aParent,
53 const wxString& aLibName );
54
56
57protected:
60};
61
62#endif // DESIGN_BLOCK_TREE_MODEL_ADAPTER_H
std::vector< LIB_TREE_ITEM * > getDesignBlocks(EDA_BASE_FRAME *aParent, const wxString &aLibName)
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.
wxString GenerateInfo(LIB_ID const &aLibId, int aUnit) override
TOOL_INTERACTIVE * GetContextMenuTool() override
PROJECT::LIB_TYPE_T getLibType() override
The base frame for deriving all KiCad main window classes.
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.
LIB_TYPE_T
Definition: project.h:189
@ DESIGN_BLOCK_LIB
Definition: project.h:192