KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_erc_base.cpp
Go to the documentation of this file.
1
2// C++ code generated with wxFormBuilder (version 4.0.0-0-g0efcecf)
3// http://www.wxformbuilder.org/
4//
5// PLEASE DO *NOT* EDIT THIS FILE!
7
10
11#include "dialog_erc_base.h"
12
14
15DIALOG_ERC_BASE::DIALOG_ERC_BASE( wxWindow* parent, wxWindowID id, const wxString& title, const wxPoint& pos, const wxSize& size, long style ) : DIALOG_SHIM( parent, id, title, pos, size, style )
16{
17 this->SetSizeHints( wxDefaultSize, wxDefaultSize );
18
19 wxBoxSizer* bSizer1;
20 bSizer1 = new wxBoxSizer( wxVERTICAL );
21
22 m_infoBar = new WX_INFOBAR( this );
23 m_infoBar->SetShowHideEffects( wxSHOW_EFFECT_NONE, wxSHOW_EFFECT_NONE );
24 m_infoBar->SetEffectDuration( 500 );
25 m_infoBar->Hide();
26
27 bSizer1->Add( m_infoBar, 0, wxEXPAND, 5 );
28
29 wxBoxSizer* bMainSizer;
30 bMainSizer = new wxBoxSizer( wxVERTICAL );
31
32 m_runningResultsBook = new wxSimplebook( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
33 running = new wxPanel( m_runningResultsBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
34 wxBoxSizer* bSizer14;
35 bSizer14 = new wxBoxSizer( wxVERTICAL );
36
37 m_runningNotebook = new wxNotebook( running, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
38 m_panelMessages = new wxPanel( m_runningNotebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
39 wxBoxSizer* bSizer10;
40 bSizer10 = new wxBoxSizer( wxVERTICAL );
41
42 m_messages = new WX_HTML_REPORT_BOX( m_panelMessages, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxHW_SCROLLBAR_AUTO );
43 bSizer10->Add( m_messages, 1, wxEXPAND|wxTOP|wxRIGHT|wxLEFT, 5 );
44
45 wxBoxSizer* bGaugeMargins;
46 bGaugeMargins = new wxBoxSizer( wxVERTICAL );
47
48 m_gauge = new wxGauge( m_panelMessages, wxID_ANY, 1000, wxDefaultPosition, wxDefaultSize, wxGA_HORIZONTAL );
49 m_gauge->SetValue( 0 );
50 bGaugeMargins->Add( m_gauge, 0, wxALL|wxEXPAND, 5 );
51
52
53 bSizer10->Add( bGaugeMargins, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
54
55
56 m_panelMessages->SetSizer( bSizer10 );
57 m_panelMessages->Layout();
58 bSizer10->Fit( m_panelMessages );
59 m_runningNotebook->AddPage( m_panelMessages, _("Tests Running..."), true );
60
61 bSizer14->Add( m_runningNotebook, 1, wxEXPAND, 5 );
62
63
64 running->SetSizer( bSizer14 );
65 running->Layout();
66 bSizer14->Fit( running );
67 m_runningResultsBook->AddPage( running, _("a page"), false );
68 results = new wxPanel( m_runningResultsBook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
69 wxBoxSizer* bSizer13;
70 bSizer13 = new wxBoxSizer( wxVERTICAL );
71
72 m_notebook = new wxNotebook( results, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
73 violationsPanel = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
74 wxBoxSizer* bViolationsSizer;
75 bViolationsSizer = new wxBoxSizer( wxVERTICAL );
76
77 m_markerDataView = new wxDataViewCtrl( violationsPanel, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxDV_NO_HEADER );
78 m_markerDataView->SetToolTip( _("Click on items to highlight them on the board.") );
79 m_markerDataView->SetMinSize( wxSize( 640,260 ) );
80
81 bViolationsSizer->Add( m_markerDataView, 2, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
82
83
84 bViolationsSizer->Add( 0, 8, 0, wxEXPAND, 5 );
85
86
87 violationsPanel->SetSizer( bViolationsSizer );
88 violationsPanel->Layout();
89 bViolationsSizer->Fit( violationsPanel );
90 m_notebook->AddPage( violationsPanel, _("Violations (%s)"), false );
91 m_panelIgnored = new wxPanel( m_notebook, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL );
92 wxBoxSizer* bSizer15;
93 bSizer15 = new wxBoxSizer( wxVERTICAL );
94
95 m_ignoredList = new wxListCtrl( m_panelIgnored, wxID_ANY, wxDefaultPosition, wxDefaultSize, wxLC_NO_HEADER|wxLC_REPORT );
96 bSizer15->Add( m_ignoredList, 1, wxEXPAND|wxBOTTOM|wxRIGHT|wxLEFT, 5 );
97
98 m_violationSeveritiesLink = new wxHyperlinkCtrl( m_panelIgnored, wxID_ANY, _("Edit ignored tests"), wxEmptyString, wxDefaultPosition, wxDefaultSize, wxHL_DEFAULT_STYLE );
99 bSizer15->Add( m_violationSeveritiesLink, 0, wxBOTTOM|wxRIGHT|wxLEFT, 5 );
100
101
102 bSizer15->Add( 0, 8, 0, wxEXPAND, 5 );
103
104
105 m_panelIgnored->SetSizer( bSizer15 );
106 m_panelIgnored->Layout();
107 bSizer15->Fit( m_panelIgnored );
108 m_notebook->AddPage( m_panelIgnored, _("Ignored Tests (%s)"), false );
109
110 bSizer13->Add( m_notebook, 1, wxEXPAND, 5 );
111
112
113 results->SetSizer( bSizer13 );
114 results->Layout();
115 bSizer13->Fit( results );
116 m_runningResultsBook->AddPage( results, _("a page"), true );
117
118 bMainSizer->Add( m_runningResultsBook, 1, wxEXPAND|wxTOP|wxRIGHT, 5 );
119
120 wxBoxSizer* bSizer11;
121 bSizer11 = new wxBoxSizer( wxVERTICAL );
122
123 wxBoxSizer* bSeveritySizer;
124 bSeveritySizer = new wxBoxSizer( wxHORIZONTAL );
125
126 m_showLabel = new wxStaticText( this, wxID_ANY, _("Show:"), wxDefaultPosition, wxDefaultSize, 0 );
127 m_showLabel->Wrap( -1 );
128 bSeveritySizer->Add( m_showLabel, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 5 );
129
130 m_showAll = new wxCheckBox( this, wxID_ANY, _("All"), wxDefaultPosition, wxDefaultSize, 0 );
131 bSeveritySizer->Add( m_showAll, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
132
133
134 bSeveritySizer->Add( 35, 0, 0, wxEXPAND, 5 );
135
136 m_showErrors = new wxCheckBox( this, wxID_ANY, _("Errors"), wxDefaultPosition, wxDefaultSize, 0 );
137 bSeveritySizer->Add( m_showErrors, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
138
139 m_errorsBadge = new NUMBER_BADGE( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
140 bSeveritySizer->Add( m_errorsBadge, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 25 );
141
142 m_showWarnings = new wxCheckBox( this, wxID_ANY, _("Warnings"), wxDefaultPosition, wxDefaultSize, 0 );
143 bSeveritySizer->Add( m_showWarnings, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
144
145 m_warningsBadge = new NUMBER_BADGE( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
146 bSeveritySizer->Add( m_warningsBadge, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 25 );
147
148 m_showExclusions = new wxCheckBox( this, wxID_ANY, _("Exclusions"), wxDefaultPosition, wxDefaultSize, 0 );
149 bSeveritySizer->Add( m_showExclusions, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
150
151 m_exclusionsBadge = new NUMBER_BADGE( this, wxID_ANY, wxDefaultPosition, wxDefaultSize, 0 );
152 bSeveritySizer->Add( m_exclusionsBadge, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT, 25 );
153
154
155 bSeveritySizer->Add( 0, 0, 1, wxEXPAND, 5 );
156
157 m_saveReport = new wxButton( this, wxID_ANY, _("Save..."), wxDefaultPosition, wxDefaultSize, 0 );
158 bSeveritySizer->Add( m_saveReport, 0, wxALIGN_CENTER_VERTICAL|wxRIGHT|wxLEFT, 5 );
159
160
161 bSizer11->Add( bSeveritySizer, 0, wxEXPAND|wxALL, 5 );
162
163
164 bMainSizer->Add( bSizer11, 0, wxEXPAND|wxRIGHT|wxLEFT, 5 );
165
166
167 bSizer1->Add( bMainSizer, 1, wxEXPAND|wxALL, 5 );
168
169 m_buttonsSizer = new wxBoxSizer( wxHORIZONTAL );
170
171 m_deleteOneMarker = new wxButton( this, wxID_ANY, _("Delete Marker"), wxDefaultPosition, wxDefaultSize, 0 );
172 m_buttonsSizer->Add( m_deleteOneMarker, 0, wxALL|wxALIGN_CENTER_VERTICAL, 5 );
173
174 m_deleteAllMarkers = new wxButton( this, ID_ERASE_DRC_MARKERS, _("Delete All Markers"), wxDefaultPosition, wxDefaultSize, 0 );
175 m_buttonsSizer->Add( m_deleteAllMarkers, 0, wxRIGHT|wxLEFT|wxALIGN_CENTER_VERTICAL, 8 );
176
177
178 m_buttonsSizer->Add( 0, 0, 1, wxEXPAND, 5 );
179
180 m_sdbSizer1 = new wxStdDialogButtonSizer();
181 m_sdbSizer1OK = new wxButton( this, wxID_OK );
182 m_sdbSizer1->AddButton( m_sdbSizer1OK );
183 m_sdbSizer1Cancel = new wxButton( this, wxID_CANCEL );
184 m_sdbSizer1->AddButton( m_sdbSizer1Cancel );
185 m_sdbSizer1->Realize();
186
187 m_buttonsSizer->Add( m_sdbSizer1, 0, wxEXPAND|wxALL, 5 );
188
189
190 bSizer1->Add( m_buttonsSizer, 0, wxEXPAND|wxLEFT, 10 );
191
192
193 this->SetSizer( bSizer1 );
194 this->Layout();
195 bSizer1->Fit( this );
196
197 // Connect Events
198 this->Connect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_ERC_BASE::OnCloseErcDialog ) );
199 m_messages->Connect( wxEVT_COMMAND_HTML_LINK_CLICKED, wxHtmlLinkEventHandler( DIALOG_ERC_BASE::OnLinkClicked ), NULL, this );
200 m_markerDataView->Connect( wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler( DIALOG_ERC_BASE::OnERCItemDClick ), NULL, this );
201 m_markerDataView->Connect( wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU, wxDataViewEventHandler( DIALOG_ERC_BASE::OnERCItemRClick ), NULL, this );
202 m_markerDataView->Connect( wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler( DIALOG_ERC_BASE::OnERCItemSelected ), NULL, this );
203 m_ignoredList->Connect( wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, wxListEventHandler( DIALOG_ERC_BASE::OnIgnoredItemRClick ), NULL, this );
204 m_violationSeveritiesLink->Connect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( DIALOG_ERC_BASE::OnEditViolationSeverities ), NULL, this );
205 m_showAll->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnSeverity ), NULL, this );
206 m_showErrors->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnSeverity ), NULL, this );
207 m_showWarnings->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnSeverity ), NULL, this );
208 m_showExclusions->Connect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnSeverity ), NULL, this );
209 m_saveReport->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnSaveReport ), NULL, this );
210 m_deleteOneMarker->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnDeleteOneClick ), NULL, this );
211 m_deleteAllMarkers->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnDeleteAllClick ), NULL, this );
212 m_sdbSizer1Cancel->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnCancelClick ), NULL, this );
213 m_sdbSizer1OK->Connect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnRunERCClick ), NULL, this );
214}
215
217{
218 // Disconnect Events
219 this->Disconnect( wxEVT_CLOSE_WINDOW, wxCloseEventHandler( DIALOG_ERC_BASE::OnCloseErcDialog ) );
220 m_messages->Disconnect( wxEVT_COMMAND_HTML_LINK_CLICKED, wxHtmlLinkEventHandler( DIALOG_ERC_BASE::OnLinkClicked ), NULL, this );
221 m_markerDataView->Disconnect( wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED, wxDataViewEventHandler( DIALOG_ERC_BASE::OnERCItemDClick ), NULL, this );
222 m_markerDataView->Disconnect( wxEVT_COMMAND_DATAVIEW_ITEM_CONTEXT_MENU, wxDataViewEventHandler( DIALOG_ERC_BASE::OnERCItemRClick ), NULL, this );
223 m_markerDataView->Disconnect( wxEVT_COMMAND_DATAVIEW_SELECTION_CHANGED, wxDataViewEventHandler( DIALOG_ERC_BASE::OnERCItemSelected ), NULL, this );
224 m_ignoredList->Disconnect( wxEVT_COMMAND_LIST_ITEM_RIGHT_CLICK, wxListEventHandler( DIALOG_ERC_BASE::OnIgnoredItemRClick ), NULL, this );
225 m_violationSeveritiesLink->Disconnect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( DIALOG_ERC_BASE::OnEditViolationSeverities ), NULL, this );
226 m_showAll->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnSeverity ), NULL, this );
227 m_showErrors->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnSeverity ), NULL, this );
228 m_showWarnings->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnSeverity ), NULL, this );
229 m_showExclusions->Disconnect( wxEVT_COMMAND_CHECKBOX_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnSeverity ), NULL, this );
230 m_saveReport->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnSaveReport ), NULL, this );
231 m_deleteOneMarker->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnDeleteOneClick ), NULL, this );
232 m_deleteAllMarkers->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnDeleteAllClick ), NULL, this );
233 m_sdbSizer1Cancel->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnCancelClick ), NULL, this );
234 m_sdbSizer1OK->Disconnect( wxEVT_COMMAND_BUTTON_CLICKED, wxCommandEventHandler( DIALOG_ERC_BASE::OnRunERCClick ), NULL, this );
235
236}
wxButton * m_saveReport
wxPanel * m_panelIgnored
wxButton * m_sdbSizer1Cancel
wxSimplebook * m_runningResultsBook
wxPanel * m_panelMessages
wxCheckBox * m_showExclusions
virtual void OnLinkClicked(wxHtmlLinkEvent &event)
NUMBER_BADGE * m_errorsBadge
virtual void OnDeleteOneClick(wxCommandEvent &event)
WX_INFOBAR * m_infoBar
wxHyperlinkCtrl * m_violationSeveritiesLink
virtual void OnCancelClick(wxCommandEvent &event)
virtual void OnSeverity(wxCommandEvent &event)
wxStaticText * m_showLabel
virtual void OnSaveReport(wxCommandEvent &event)
wxPanel * violationsPanel
wxCheckBox * m_showErrors
wxNotebook * m_notebook
wxCheckBox * m_showAll
virtual void OnERCItemRClick(wxDataViewEvent &event)
NUMBER_BADGE * m_exclusionsBadge
wxListCtrl * m_ignoredList
wxStdDialogButtonSizer * m_sdbSizer1
wxBoxSizer * m_buttonsSizer
WX_HTML_REPORT_BOX * m_messages
wxDataViewCtrl * m_markerDataView
wxButton * m_deleteAllMarkers
NUMBER_BADGE * m_warningsBadge
virtual void OnERCItemSelected(wxDataViewEvent &event)
virtual void OnIgnoredItemRClick(wxListEvent &event)
wxButton * m_deleteOneMarker
virtual void OnDeleteAllClick(wxCommandEvent &event)
virtual void OnEditViolationSeverities(wxHyperlinkEvent &event)
virtual void OnRunERCClick(wxCommandEvent &event)
wxCheckBox * m_showWarnings
wxButton * m_sdbSizer1OK
DIALOG_ERC_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Electrical Rules Checker"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
wxNotebook * m_runningNotebook
virtual void OnERCItemDClick(wxDataViewEvent &event)
virtual void OnCloseErcDialog(wxCloseEvent &event)
Dialog helper object to sit in the inheritance tree between wxDialog and any class written by wxFormB...
Definition: dialog_shim.h:88
A simple UI element that puts a number on top of a colored rounded rectangle with a fill color that s...
Definition: number_badge.h:40
A slimmed down version of WX_HTML_REPORT_PANEL.
A modified version of the wxInfoBar class that allows us to:
Definition: wx_infobar.h:76
#define ID_ERASE_DRC_MARKERS
#define _(s)