|
KiCad PCB EDA Suite
|
A single condition row in the condition group panel. More...
#include <drc_re_condition_row_panel.h>
Public Types | |
| enum class | OBJECT_TARGET { OBJECT_A , OBJECT_B } |
| enum class | CONDITION_TYPE { ANY = 0 , NET , NETCLASS , WITHIN_AREA , CUSTOM } |
Public Member Functions | |
| DRC_RE_CONDITION_ROW_PANEL (wxWindow *aParent, BOARD *aBoard, bool aShowObjectSelector) | |
| void | SetObjectTarget (OBJECT_TARGET aTarget) |
| OBJECT_TARGET | GetObjectTarget () const |
| void | SetConditionType (CONDITION_TYPE aType) |
| CONDITION_TYPE | GetConditionType () const |
| void | SetValue (const wxString &aValue) |
| wxString | GetValue () const |
| bool | ParseExpression (const wxString &aExpr) |
| Parse a condition expression and set the row's state. | |
| wxString | BuildExpression () const |
| Build a condition expression from the row's current state. | |
| void | SetDeleteCallback (std::function< void()> aCallback) |
| void | SetChangeCallback (std::function< void()> aCallback) |
| void | ShowDeleteButton (bool aShow) |
| bool | HasCustomQuerySelected () const |
Private Member Functions | |
| void | onObjectChoice (wxCommandEvent &aEvent) |
| void | onConditionChoice (wxCommandEvent &aEvent) |
| void | onDeleteClicked (wxCommandEvent &aEvent) |
| void | updateVisibility () |
Private Attributes | |
| bool | m_showObjectSelector |
| wxChoice * | m_objectChoice |
| wxChoice * | m_conditionChoice |
| NET_SELECTOR * | m_netSelector |
| NETCLASS_SELECTOR * | m_netclassSelector |
| AREA_SELECTOR * | m_areaSelector |
| wxStyledTextCtrl * | m_customQueryCtrl |
| wxBitmapButton * | m_deleteBtn |
| wxBoxSizer * | m_mainSizer |
| wxBoxSizer * | m_contentSizer |
| wxBoxSizer * | m_rowSizer |
| std::function< void()> | m_deleteCallback |
| std::function< void()> | m_changeCallback |
A single condition row in the condition group panel.
Each row contains:
Definition at line 47 of file drc_re_condition_row_panel.h.
|
strong |
| Enumerator | |
|---|---|
| ANY | |
| NET | |
| NETCLASS | |
| WITHIN_AREA | |
| CUSTOM | |
Definition at line 56 of file drc_re_condition_row_panel.h.
|
strong |
| Enumerator | |
|---|---|
| OBJECT_A | |
| OBJECT_B | |
Definition at line 50 of file drc_re_condition_row_panel.h.
| DRC_RE_CONDITION_ROW_PANEL::DRC_RE_CONDITION_ROW_PANEL | ( | wxWindow * | aParent, |
| BOARD * | aBoard, | ||
| bool | aShowObjectSelector ) |
Definition at line 42 of file drc_re_condition_row_panel.cpp.
References _, BOARD::GetNetInfo(), KiBitmapBundle(), m_areaSelector, m_conditionChoice, m_contentSizer, m_customQueryCtrl, m_deleteBtn, m_mainSizer, m_netclassSelector, m_netSelector, m_objectChoice, m_rowSizer, m_showObjectSelector, onConditionChoice(), onDeleteClicked(), onObjectChoice(), TRACE_COND, and trash.
| wxString DRC_RE_CONDITION_ROW_PANEL::BuildExpression | ( | ) | const |
Build a condition expression from the row's current state.
Definition at line 276 of file drc_re_condition_row_panel.cpp.
References CUSTOM, GetConditionType(), GetObjectTarget(), m_areaSelector, m_customQueryCtrl, m_netclassSelector, m_netSelector, m_showObjectSelector, NET, NETCLASS, OBJECT_A, and WITHIN_AREA.
| DRC_RE_CONDITION_ROW_PANEL::CONDITION_TYPE DRC_RE_CONDITION_ROW_PANEL::GetConditionType | ( | ) | const |
Definition at line 153 of file drc_re_condition_row_panel.cpp.
References m_conditionChoice.
Referenced by BuildExpression(), GetValue(), HasCustomQuerySelected(), SetValue(), and updateVisibility().
| DRC_RE_CONDITION_ROW_PANEL::OBJECT_TARGET DRC_RE_CONDITION_ROW_PANEL::GetObjectTarget | ( | ) | const |
Definition at line 140 of file drc_re_condition_row_panel.cpp.
References m_objectChoice.
Referenced by BuildExpression().
| wxString DRC_RE_CONDITION_ROW_PANEL::GetValue | ( | ) | const |
Definition at line 185 of file drc_re_condition_row_panel.cpp.
References CUSTOM, GetConditionType(), m_areaSelector, m_customQueryCtrl, m_netclassSelector, m_netSelector, NET, NETCLASS, and WITHIN_AREA.
| bool DRC_RE_CONDITION_ROW_PANEL::HasCustomQuerySelected | ( | ) | const |
Definition at line 330 of file drc_re_condition_row_panel.cpp.
References CUSTOM, and GetConditionType().
|
private |
Definition at line 343 of file drc_re_condition_row_panel.cpp.
References m_changeCallback, and updateVisibility().
Referenced by DRC_RE_CONDITION_ROW_PANEL().
|
private |
Definition at line 352 of file drc_re_condition_row_panel.cpp.
References m_deleteCallback.
Referenced by DRC_RE_CONDITION_ROW_PANEL().
|
private |
Definition at line 336 of file drc_re_condition_row_panel.cpp.
References m_changeCallback.
Referenced by DRC_RE_CONDITION_ROW_PANEL().
| bool DRC_RE_CONDITION_ROW_PANEL::ParseExpression | ( | const wxString & | aExpr | ) |
Parse a condition expression and set the row's state.
| aExpr | The expression to parse (e.g., "A.NetName == 'VCC'") |
Definition at line 207 of file drc_re_condition_row_panel.cpp.
References ANY, CUSTOM, m_areaSelector, m_customQueryCtrl, m_netclassSelector, m_netSelector, NET, NETCLASS, OBJECT_A, OBJECT_B, SetConditionType(), SetObjectTarget(), TRACE_COND, and WITHIN_AREA.
|
inline |
Definition at line 92 of file drc_re_condition_row_panel.h.
References m_changeCallback.
Referenced by DRC_RE_CONDITION_GROUP_PANEL::addConditionRow().
| void DRC_RE_CONDITION_ROW_PANEL::SetConditionType | ( | CONDITION_TYPE | aType | ) |
Definition at line 146 of file drc_re_condition_row_panel.cpp.
References m_conditionChoice, and updateVisibility().
Referenced by ParseExpression().
|
inline |
Definition at line 91 of file drc_re_condition_row_panel.h.
References m_deleteCallback.
Referenced by DRC_RE_CONDITION_GROUP_PANEL::addConditionRow().
| void DRC_RE_CONDITION_ROW_PANEL::SetObjectTarget | ( | OBJECT_TARGET | aTarget | ) |
Definition at line 134 of file drc_re_condition_row_panel.cpp.
References m_objectChoice.
Referenced by ParseExpression().
| void DRC_RE_CONDITION_ROW_PANEL::SetValue | ( | const wxString & | aValue | ) |
Definition at line 159 of file drc_re_condition_row_panel.cpp.
References CUSTOM, GetConditionType(), m_areaSelector, m_customQueryCtrl, m_netclassSelector, m_netSelector, NET, NETCLASS, and WITHIN_AREA.
| void DRC_RE_CONDITION_ROW_PANEL::ShowDeleteButton | ( | bool | aShow | ) |
Definition at line 323 of file drc_re_condition_row_panel.cpp.
References m_deleteBtn.
|
private |
Definition at line 359 of file drc_re_condition_row_panel.cpp.
References CUSTOM, GetConditionType(), m_areaSelector, m_customQueryCtrl, m_netclassSelector, m_netSelector, NET, NETCLASS, and WITHIN_AREA.
Referenced by onConditionChoice(), and SetConditionType().
|
private |
Definition at line 109 of file drc_re_condition_row_panel.h.
Referenced by BuildExpression(), DRC_RE_CONDITION_ROW_PANEL(), GetValue(), ParseExpression(), SetValue(), and updateVisibility().
|
private |
Definition at line 117 of file drc_re_condition_row_panel.h.
Referenced by onConditionChoice(), onObjectChoice(), and SetChangeCallback().
|
private |
Definition at line 106 of file drc_re_condition_row_panel.h.
Referenced by DRC_RE_CONDITION_ROW_PANEL(), GetConditionType(), and SetConditionType().
|
private |
Definition at line 113 of file drc_re_condition_row_panel.h.
Referenced by DRC_RE_CONDITION_ROW_PANEL().
|
private |
Definition at line 110 of file drc_re_condition_row_panel.h.
Referenced by BuildExpression(), DRC_RE_CONDITION_ROW_PANEL(), GetValue(), ParseExpression(), SetValue(), and updateVisibility().
|
private |
Definition at line 111 of file drc_re_condition_row_panel.h.
Referenced by DRC_RE_CONDITION_ROW_PANEL(), and ShowDeleteButton().
|
private |
Definition at line 116 of file drc_re_condition_row_panel.h.
Referenced by onDeleteClicked(), and SetDeleteCallback().
|
private |
Definition at line 112 of file drc_re_condition_row_panel.h.
Referenced by DRC_RE_CONDITION_ROW_PANEL().
|
private |
Definition at line 108 of file drc_re_condition_row_panel.h.
Referenced by BuildExpression(), DRC_RE_CONDITION_ROW_PANEL(), GetValue(), ParseExpression(), SetValue(), and updateVisibility().
|
private |
Definition at line 107 of file drc_re_condition_row_panel.h.
Referenced by BuildExpression(), DRC_RE_CONDITION_ROW_PANEL(), GetValue(), ParseExpression(), SetValue(), and updateVisibility().
|
private |
Definition at line 105 of file drc_re_condition_row_panel.h.
Referenced by DRC_RE_CONDITION_ROW_PANEL(), GetObjectTarget(), and SetObjectTarget().
|
private |
Definition at line 114 of file drc_re_condition_row_panel.h.
Referenced by DRC_RE_CONDITION_ROW_PANEL().
|
private |
Definition at line 103 of file drc_re_condition_row_panel.h.
Referenced by BuildExpression(), and DRC_RE_CONDITION_ROW_PANEL().