|
KiCad PCB EDA Suite
|
Panel used in the rule editor conditions to select object filters. More...
#include <drc_re_object_selector_panel.h>
Public Member Functions | |
| DRC_RE_OBJECT_SELECTOR_PANEL (wxWindow *parent, BOARD *board, const wxString &label) | |
| void | SetLabelText (const wxString &text) |
| void | SetCustomQueryCtrl (wxStyledTextCtrl *ctrl) |
| void | ParseCondition (const wxString &aExpr, const wxString &aPrefix=wxEmptyString) |
| Populate the panel controls from a rule condition expression. | |
| wxString | BuildCondition (const wxString &aPrefix) const |
| Build a rule condition expression based on the panel state. | |
| bool | HasCustomQuerySelected () const |
| void | SetChoiceChangeCallback (std::function< void()> aCallback) |
| Set a callback to be invoked when the choice selection changes. | |
Private Member Functions | |
| void | onChoice (const wxCommandEvent &aEvent) |
Private Attributes | |
| wxStaticText * | m_label |
| wxChoice * | m_choice |
| NET_SELECTOR * | m_netSelector |
| NETCLASS_SELECTOR * | m_netclassSelector |
| AREA_SELECTOR * | m_areaSelector |
| wxStyledTextCtrl * | m_customQueryCtrl |
| wxBoxSizer * | m_rowSizer |
| std::function< void()> | m_choiceChangeCallback |
Panel used in the rule editor conditions to select object filters.
Definition at line 19 of file drc_re_object_selector_panel.h.
| DRC_RE_OBJECT_SELECTOR_PANEL::DRC_RE_OBJECT_SELECTOR_PANEL | ( | wxWindow * | parent, |
| BOARD * | board, | ||
| const wxString & | label ) |
Definition at line 14 of file drc_re_object_selector_panel.cpp.
References _, BOARD::GetNetInfo(), m_areaSelector, m_choice, m_customQueryCtrl, m_label, m_netclassSelector, m_netSelector, m_rowSizer, and onChoice().
| wxString DRC_RE_OBJECT_SELECTOR_PANEL::BuildCondition | ( | const wxString & | aPrefix | ) | const |
Build a rule condition expression based on the panel state.
| aPrefix | object designator ("A" or "B") used when the expression refers to a single object. Custom queries are returned verbatim without the prefix. |
Definition at line 170 of file drc_re_object_selector_panel.cpp.
References m_areaSelector, m_choice, m_customQueryCtrl, m_netclassSelector, and m_netSelector.
| bool DRC_RE_OBJECT_SELECTOR_PANEL::HasCustomQuerySelected | ( | ) | const |
Definition at line 104 of file drc_re_object_selector_panel.cpp.
References m_choice.
|
private |
Definition at line 70 of file drc_re_object_selector_panel.cpp.
References m_areaSelector, m_choice, m_choiceChangeCallback, m_customQueryCtrl, m_netclassSelector, and m_netSelector.
Referenced by DRC_RE_OBJECT_SELECTOR_PANEL(), and ParseCondition().
| void DRC_RE_OBJECT_SELECTOR_PANEL::ParseCondition | ( | const wxString & | aExpr, |
| const wxString & | aPrefix = wxEmptyString ) |
Populate the panel controls from a rule condition expression.
| aExpr | the rule expression without the surrounding (condition "...") wrapper |
| aPrefix | optional object designator ("A" or "B") that will be stripped if present |
Definition at line 110 of file drc_re_object_selector_panel.cpp.
References m_areaSelector, m_choice, m_customQueryCtrl, m_netclassSelector, m_netSelector, and onChoice().
|
inline |
Set a callback to be invoked when the choice selection changes.
Definition at line 51 of file drc_re_object_selector_panel.h.
References m_choiceChangeCallback.
| void DRC_RE_OBJECT_SELECTOR_PANEL::SetCustomQueryCtrl | ( | wxStyledTextCtrl * | ctrl | ) |
Definition at line 63 of file drc_re_object_selector_panel.cpp.
References m_customQueryCtrl.
| void DRC_RE_OBJECT_SELECTOR_PANEL::SetLabelText | ( | const wxString & | text | ) |
Definition at line 58 of file drc_re_object_selector_panel.cpp.
|
private |
Definition at line 63 of file drc_re_object_selector_panel.h.
Referenced by BuildCondition(), DRC_RE_OBJECT_SELECTOR_PANEL(), onChoice(), and ParseCondition().
|
private |
Definition at line 60 of file drc_re_object_selector_panel.h.
Referenced by BuildCondition(), DRC_RE_OBJECT_SELECTOR_PANEL(), HasCustomQuerySelected(), onChoice(), and ParseCondition().
|
private |
Definition at line 67 of file drc_re_object_selector_panel.h.
Referenced by onChoice(), and SetChoiceChangeCallback().
|
private |
Definition at line 64 of file drc_re_object_selector_panel.h.
Referenced by BuildCondition(), DRC_RE_OBJECT_SELECTOR_PANEL(), onChoice(), ParseCondition(), and SetCustomQueryCtrl().
|
private |
Definition at line 59 of file drc_re_object_selector_panel.h.
Referenced by DRC_RE_OBJECT_SELECTOR_PANEL(), and SetLabelText().
|
private |
Definition at line 62 of file drc_re_object_selector_panel.h.
Referenced by BuildCondition(), DRC_RE_OBJECT_SELECTOR_PANEL(), onChoice(), and ParseCondition().
|
private |
Definition at line 61 of file drc_re_object_selector_panel.h.
Referenced by BuildCondition(), DRC_RE_OBJECT_SELECTOR_PANEL(), onChoice(), and ParseCondition().
|
private |
Definition at line 65 of file drc_re_object_selector_panel.h.
Referenced by DRC_RE_OBJECT_SELECTOR_PANEL().