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 The 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, see <https://www.gnu.org/licenses/>.
19 */
20
21#pragma once
22
23#include <dialog_bom_base.h>
24#include <vector>
25
26class SCH_EDIT_FRAME;
29
30// BOM "plugins" are not actually plugins. They are external tools
31// (scripts or executables) called by this dialog.
32typedef std::vector<std::unique_ptr<BOM_GENERATOR_HANDLER>> BOM_GENERATOR_ARRAY;
33
34// The main dialog frame to run scripts to build bom
36{
37private:
41
43
44public:
45 DIALOG_BOM( SCH_EDIT_FRAME* parent );
47
48private:
49 void OnGeneratorSelected( wxCommandEvent& event ) override;
50 void OnRunGenerator( wxCommandEvent& event ) override;
51 void OnHelp( wxCommandEvent& event ) override;
52 void OnAddGenerator( wxCommandEvent& event ) override;
53 void OnRemoveGenerator( wxCommandEvent& event ) override;
54 void OnEditGenerator( wxCommandEvent& event ) override;
55 void OnCommandLineEdited( wxCommandEvent& event ) override;
56 void OnNameEdited( wxCommandEvent& event ) override;
57 void OnShowConsoleChanged( wxCommandEvent& event ) override;
58 void OnIdle( wxIdleEvent& event ) override;
59
60 void pluginInit();
62 BOM_GENERATOR_HANDLER* addGenerator( const wxString& aPath,
63 const wxString& aName = wxEmptyString );
64 bool pluginExists( const wxString& aName );
65
67
68 wxString chooseGenerator();
69};
Bill of material output generator.
Definition bom_plugins.h:42
DIALOG_BOM_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Bill of Materials"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
void OnEditGenerator(wxCommandEvent &event) override
SCH_EDIT_FRAME * m_parent
Definition dialog_bom.h:38
void OnRemoveGenerator(wxCommandEvent &event) override
void installGeneratorsList()
void pluginInit()
bool m_initialized
Definition dialog_bom.h:40
BOM_GENERATOR_HANDLER * selectedGenerator()
bool pluginExists(const wxString &aName)
BOM_GENERATOR_HANDLER * addGenerator(const wxString &aPath, const wxString &aName=wxEmptyString)
void OnIdle(wxIdleEvent &event) override
void OnHelp(wxCommandEvent &event) override
void OnCommandLineEdited(wxCommandEvent &event) override
wxString chooseGenerator()
void OnGeneratorSelected(wxCommandEvent &event) override
void OnNameEdited(wxCommandEvent &event) override
void OnRunGenerator(wxCommandEvent &event) override
HTML_MESSAGE_BOX * m_helpWindow
Definition dialog_bom.h:42
void OnShowConsoleChanged(wxCommandEvent &event) override
BOM_GENERATOR_ARRAY m_generators
Definition dialog_bom.h:39
DIALOG_BOM(SCH_EDIT_FRAME *parent)
void OnAddGenerator(wxCommandEvent &event) override
Schematic editor (Eeschema) main window.
std::vector< std::unique_ptr< BOM_GENERATOR_HANDLER > > BOM_GENERATOR_ARRAY
Definition dialog_bom.h:32