KiCad PCB EDA Suite
Loading...
Searching...
No Matches
panel_setup_severities.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 The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
20
21#ifndef KICAD_PANEL_SETUP_SEVERITIES_H
22#define KICAD_PANEL_SETUP_SEVERITIES_H
23
24#include <map>
25#include <wx/panel.h>
26
27class PAGED_DIALOG;
28class EDA_DRAW_FRAME;
29class wxRadioBox;
30class wxRadioButton;
31
32
33class PANEL_SETUP_SEVERITIES : public wxPanel
34{
35public:
43 PANEL_SETUP_SEVERITIES( wxWindow* aParentWindow,
44 std::vector<std::reference_wrapper<RC_ITEM>> aItems,
45 std::map<int, SEVERITY>& aSeverities,
46 RC_ITEM* aPinMapSpecialCase = nullptr );
47
48 void ImportSettingsFrom( std::map<int, SEVERITY>& aSettings );
49
50private:
51 bool TransferDataToWindow() override;
52 bool TransferDataFromWindow() override;
53
54 void checkReload();
55
56private:
57 std::map<int, SEVERITY>& m_severities;
58
60 std::vector<std::reference_wrapper<RC_ITEM>> m_items;
61
64
65 std::map<int, wxRadioButton*[4]> m_buttonMap; // map from DRC error code to button group
66
67 std::map<int, SEVERITY> m_lastLoaded;
68};
69
70#endif // KICAD_PANEL_SETUP_SEVERITIES_H
The base class for create windows for drawing purpose.
void ImportSettingsFrom(std::map< int, SEVERITY > &aSettings)
std::map< int, SEVERITY > & m_severities
RC_ITEM * m_pinMapSpecialCase
For ERC settings; a pointer to ERC_ITEM::pinTableConflict.
PANEL_SETUP_SEVERITIES(wxWindow *aParentWindow, std::vector< std::reference_wrapper< RC_ITEM > > aItems, std::map< int, SEVERITY > &aSeverities, RC_ITEM *aPinMapSpecialCase=nullptr)
Create the severities setup panel.
std::map< int, wxRadioButton *[4]> m_buttonMap
std::map< int, SEVERITY > m_lastLoaded
std::vector< std::reference_wrapper< RC_ITEM > > m_items
A list of item templates (to get descriptive text and error codes from)
A holder for a rule check item, DRC in Pcbnew or ERC in Eeschema.
Definition rc_item.h:80