KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_bom.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) 2019 Jean-Pierre Charras, jp.charras at wanadoo.fr
5 * Copyright (C) 1992-2021 KiCad Developers, see AUTHORS.txt for contributors.
6 *
7 * This program is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License
9 * as published by the Free Software Foundation; either version 2
10 * of the License, or (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, you may find one here:
19 * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
20 * or you may search the http://www.gnu.org website for the version 2 license,
21 * or you may write to the Free Software Foundation, Inc.,
22 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
23 */
24
25#pragma once
26
27#include <dialog_bom_base.h>
28#include <vector>
29
30class SCH_EDIT_FRAME;
33
34// BOM "plugins" are not actually plugins. They are external tools
35// (scripts or executables) called by this dialog.
36typedef std::vector<std::unique_ptr<BOM_GENERATOR_HANDLER>> BOM_GENERATOR_ARRAY;
37
38// The main dialog frame to run scripts to build bom
40{
41private:
45
47
48public:
49 DIALOG_BOM( SCH_EDIT_FRAME* parent );
51
52private:
53 void OnGeneratorSelected( wxCommandEvent& event ) override;
54 void OnRunGenerator( wxCommandEvent& event ) override;
55 void OnHelp( wxCommandEvent& event ) override;
56 void OnAddGenerator( wxCommandEvent& event ) override;
57 void OnRemoveGenerator( wxCommandEvent& event ) override;
58 void OnEditGenerator( wxCommandEvent& event ) override;
59 void OnCommandLineEdited( wxCommandEvent& event ) override;
60 void OnNameEdited( wxCommandEvent& event ) override;
61 void OnShowConsoleChanged( wxCommandEvent& event ) override;
62 void OnIdle( wxIdleEvent& event ) override;
63
64 void pluginInit();
66 BOM_GENERATOR_HANDLER* addGenerator( const wxString& aPath,
67 const wxString& aName = wxEmptyString );
68 bool pluginExists( const wxString& aName );
69
71
72 wxString chooseGenerator();
73};
Bill of material output generator.
Definition: bom_plugins.h:46
Class DIALOG_BOM_BASE.
void OnEditGenerator(wxCommandEvent &event) override
Definition: dialog_bom.cpp:382
SCH_EDIT_FRAME * m_parent
Definition: dialog_bom.h:42
void OnRemoveGenerator(wxCommandEvent &event) override
Definition: dialog_bom.cpp:309
void installGeneratorsList()
Definition: dialog_bom.cpp:135
void pluginInit()
Definition: dialog_bom.cpp:226
bool m_initialized
Definition: dialog_bom.h:44
BOM_GENERATOR_HANDLER * selectedGenerator()
Definition: dialog_bom.cpp:484
bool pluginExists(const wxString &aName)
Definition: dialog_bom.cpp:208
BOM_GENERATOR_HANDLER * addGenerator(const wxString &aPath, const wxString &aName=wxEmptyString)
Definition: dialog_bom.cpp:184
void OnIdle(wxIdleEvent &event) override
Definition: dialog_bom.cpp:472
void OnHelp(wxCommandEvent &event) override
Definition: dialog_bom.cpp:406
void OnCommandLineEdited(wxCommandEvent &event) override
Definition: dialog_bom.cpp:425
wxString chooseGenerator()
Definition: dialog_bom.cpp:367
void OnGeneratorSelected(wxCommandEvent &event) override
Definition: dialog_bom.cpp:220
void OnNameEdited(wxCommandEvent &event) override
Definition: dialog_bom.cpp:434
void OnRunGenerator(wxCommandEvent &event) override
Definition: dialog_bom.cpp:276
HTML_MESSAGE_BOX * m_helpWindow
Definition: dialog_bom.h:46
void OnShowConsoleChanged(wxCommandEvent &event) override
Definition: dialog_bom.cpp:449
BOM_GENERATOR_ARRAY m_generators
Definition: dialog_bom.h:43
void OnAddGenerator(wxCommandEvent &event) override
Definition: dialog_bom.cpp:327
Schematic editor (Eeschema) main window.
std::vector< std::unique_ptr< BOM_GENERATOR_HANDLER > > BOM_GENERATOR_ARRAY
Definition: dialog_bom.h:36