KiCad PCB EDA Suite
Loading...
Searching...
No Matches
database_lib_settings.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) 2022 Jon Evans <[email protected]>
5 * Copyright (C) 2022 KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software: you can redistribute it and/or modify it
8 * under the terms of the GNU General Public License as published by the
9 * Free Software Foundation, either version 3 of the License, or (at your
10 * option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful, but
13 * WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License along
18 * with this program. If not, see <http://www.gnu.org/licenses/>.
19 */
20
21#ifndef KICAD_DATABASE_LIB_SETTINGS_H
22#define KICAD_DATABASE_LIB_SETTINGS_H
23
25
26
28{
29 ODBC,
31};
32
33
35{
37 std::string dsn;
38 std::string username;
39 std::string password;
41 std::string connection_string;
42};
43
44
46{
47 std::string column;
48 std::string name;
51 bool show_name;
53};
54
55
57{
58 std::string description;
59 std::string footprint_filters;
60 std::string keywords;
61 std::string exclude_from_sim;
62 std::string exclude_from_bom;
63 std::string exclude_from_board;
64};
65
66
81{
82 std::string name;
83 std::string table;
84 std::string key_col;
85 std::string symbols_col;
86 std::string footprints_col;
87
89 std::vector<DATABASE_FIELD_MAPPING> fields;
90};
91
92
94{
96 int max_age;
97};
98
99
101{
102public:
103 DATABASE_LIB_SETTINGS( const std::string& aFilename );
104
106
108
109 std::vector<DATABASE_LIB_TABLE> m_Tables;
110
112
113protected:
114 wxString getFileExt() const override;
115};
116
117#endif //KICAD_DATABASE_LIB_SETTINGS_H
wxString getFileExt() const override
std::vector< DATABASE_LIB_TABLE > m_Tables
DATABASE_CACHE_SETTINGS m_Cache
DATABASE_SOURCE_TYPE
int max_age
Max age of cached rows before they expire, in seconds.
int max_size
Maximum number of single-row results to cache.
bool visible_in_chooser
Whether the column is shown by default in the chooser.
std::string column
Database column name.
std::string name
KiCad field name.
bool inherit_properties
Whether or not to inherit properties from symbol field.
bool visible_on_add
Whether to show the field when placing the symbol.
bool show_name
Whether or not to show the field name as well as its value.
A database library table will be mapped to a sub-library provided by the database library entry in th...
std::string key_col
Unique key column name (will form part of the LIB_ID)
std::string name
KiCad library nickname (will form part of the LIB_ID)
std::string symbols_col
Column name containing KiCad symbol refs.
std::string footprints_col
Column name containing KiCad footprint refs.
std::vector< DATABASE_FIELD_MAPPING > fields
std::string table
Database table to pull content from.
MAPPABLE_SYMBOL_PROPERTIES properties
std::string connection_string
DATABASE_SOURCE_TYPE type