#include <fp_text_grid_table.h>
|
| FP_TEXT_GRID_TABLE (PCB_BASE_FRAME *aFrame) |
|
| ~FP_TEXT_GRID_TABLE () |
|
int | GetNumberRows () override |
|
int | GetNumberCols () override |
|
wxString | GetColLabelValue (int aCol) override |
|
wxString | GetRowLabelValue (int aRow) override |
|
bool | IsEmptyCell (int row, int col) override |
|
bool | CanGetValueAs (int aRow, int aCol, const wxString &aTypeName) override |
|
bool | CanSetValueAs (int aRow, int aCol, const wxString &aTypeName) override |
|
wxGridCellAttr * | GetAttr (int row, int col, wxGridCellAttr::wxAttrKind kind) override |
|
wxString | GetValue (int aRow, int aCol) override |
|
bool | GetValueAsBool (int aRow, int aCol) override |
|
long | GetValueAsLong (int aRow, int aCol) override |
|
void | SetValue (int aRow, int aCol, const wxString &aValue) override |
|
void | SetValueAsBool (int aRow, int aCol, bool aValue) override |
|
void | SetValueAsLong (int aRow, int aCol, long aValue) override |
|
Definition at line 54 of file fp_text_grid_table.h.
◆ FP_TEXT_GRID_TABLE()
Definition at line 43 of file fp_text_grid_table.cpp.
54 m_boolColAttr->SetAlignment( wxALIGN_CENTER, wxALIGN_CENTER );
wxGridCellAttr * m_orientationColAttr
wxGridCellAttr * m_layerColAttr
wxString GetAbbreviatedUnitsLabel(EDA_UNITS aUnit, EDA_DATA_TYPE aType)
Get the units string for a given units type.
wxGridCellAttr * m_readOnlyAttr
void onUnitsChanged(wxCommandEvent &aEvent)
wxGridCellAttr * m_boolColAttr
wxArrayString g_menuOrientations
References DEGREES, g_menuOrientations, GetAbbreviatedUnitsLabel(), m_boolColAttr, m_frame, m_layerColAttr, m_orientationColAttr, m_readOnlyAttr, and onUnitsChanged().
◆ ~FP_TEXT_GRID_TABLE()
FP_TEXT_GRID_TABLE::~FP_TEXT_GRID_TABLE |
( |
| ) |
|
◆ CanGetValueAs()
bool FP_TEXT_GRID_TABLE::CanGetValueAs |
( |
int |
aRow, |
|
|
int |
aCol, |
|
|
const wxString & |
aTypeName |
|
) |
| |
|
override |
Definition at line 130 of file fp_text_grid_table.cpp.
141 return aTypeName == wxGRID_VALUE_STRING;
146 return aTypeName == wxGRID_VALUE_BOOL;
149 return aTypeName == wxGRID_VALUE_NUMBER;
References FPT_HEIGHT, FPT_ITALIC, FPT_LAYER, FPT_ORIENTATION, FPT_SHOWN, FPT_TEXT, FPT_THICKNESS, FPT_UPRIGHT, FPT_WIDTH, FPT_XOFFSET, and FPT_YOFFSET.
Referenced by CanSetValueAs().
◆ CanSetValueAs()
bool FP_TEXT_GRID_TABLE::CanSetValueAs |
( |
int |
aRow, |
|
|
int |
aCol, |
|
|
const wxString & |
aTypeName |
|
) |
| |
|
override |
◆ GetAttr()
wxGridCellAttr * FP_TEXT_GRID_TABLE::GetAttr |
( |
int |
row, |
|
|
int |
col, |
|
|
wxGridCellAttr::wxAttrKind |
kind |
|
) |
| |
|
override |
Definition at line 164 of file fp_text_grid_table.cpp.
wxGridCellAttr * m_orientationColAttr
wxGridCellAttr * m_layerColAttr
wxGridCellAttr * m_boolColAttr
References FPT_HEIGHT, FPT_ITALIC, FPT_LAYER, FPT_ORIENTATION, FPT_SHOWN, FPT_TEXT, FPT_THICKNESS, FPT_UPRIGHT, FPT_WIDTH, FPT_XOFFSET, FPT_YOFFSET, m_boolColAttr, m_layerColAttr, and m_orientationColAttr.
◆ GetColLabelValue()
wxString FP_TEXT_GRID_TABLE::GetColLabelValue |
( |
int |
aCol | ) |
|
|
override |
Definition at line 99 of file fp_text_grid_table.cpp.
114 default: wxFAIL;
return wxEmptyString;
References _, FPT_HEIGHT, FPT_ITALIC, FPT_LAYER, FPT_ORIENTATION, FPT_SHOWN, FPT_TEXT, FPT_THICKNESS, FPT_UPRIGHT, FPT_WIDTH, FPT_XOFFSET, and FPT_YOFFSET.
◆ GetNumberCols()
int FP_TEXT_GRID_TABLE::GetNumberCols |
( |
| ) |
|
|
inlineoverride |
◆ GetNumberRows()
int FP_TEXT_GRID_TABLE::GetNumberRows |
( |
| ) |
|
|
inlineoverride |
◆ GetRowLabelValue()
wxString FP_TEXT_GRID_TABLE::GetRowLabelValue |
( |
int |
aRow | ) |
|
|
override |
Definition at line 119 of file fp_text_grid_table.cpp.
123 case 0:
return _(
"Reference designator" );
124 case 1:
return _(
"Value" );
125 default:
return wxEmptyString;
References _.
◆ GetValue()
wxString FP_TEXT_GRID_TABLE::GetValue |
( |
int |
aRow, |
|
|
int |
aCol |
|
) |
| |
|
override |
Definition at line 197 of file fp_text_grid_table.cpp.
204 return text.GetText();
216 return text.GetLayerName();
231 return wxT(
"bad wxWidgets!" );
T NormalizeAnglePos(T Angle)
Normalize angle to be in the 0.0 .. 360.0 range: angle is in 1/10 degrees.
wxString StringFromValue(EDA_UNITS aUnits, double aValue, bool aAddUnitSymbol, EDA_DATA_TYPE aType)
Convert a value to a string using double notation.
EDA_UNITS GetUserUnits() const
Return the user units currently in use.
References DEGREES, FPT_HEIGHT, FPT_LAYER, FPT_ORIENTATION, FPT_TEXT, FPT_THICKNESS, FPT_WIDTH, FPT_XOFFSET, FPT_YOFFSET, EDA_BASE_FRAME::GetUserUnits(), m_frame, NormalizeAnglePos(), StringFromValue(), and text.
◆ GetValueAsBool()
bool FP_TEXT_GRID_TABLE::GetValueAsBool |
( |
int |
aRow, |
|
|
int |
aCol |
|
) |
| |
|
override |
◆ GetValueAsLong()
long FP_TEXT_GRID_TABLE::GetValueAsLong |
( |
int |
aRow, |
|
|
int |
aCol |
|
) |
| |
|
override |
Definition at line 252 of file fp_text_grid_table.cpp.
260 wxFAIL_MSG(
wxString::Format( wxT(
"column %d doesn't hold a long value" ), aCol ) );
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
References Format(), FPT_LAYER, and text.
◆ IsEmptyCell()
bool FP_TEXT_GRID_TABLE::IsEmptyCell |
( |
int |
row, |
|
|
int |
col |
|
) |
| |
|
inlineoverride |
◆ onUnitsChanged()
void FP_TEXT_GRID_TABLE::onUnitsChanged |
( |
wxCommandEvent & |
aEvent | ) |
|
|
protected |
◆ SetValue()
void FP_TEXT_GRID_TABLE::SetValue |
( |
int |
aRow, |
|
|
int |
aCol, |
|
|
const wxString & |
aValue |
|
) |
| |
|
override |
Definition at line 266 of file fp_text_grid_table.cpp.
274 text.SetText( aValue );
295 pos =
text.GetPos0();
307 wxFAIL_MSG(
wxString::Format( wxT(
"column %d doesn't hold a string value" ), aCol ) );
311 GetView()->Refresh();
long long int ValueFromString(EDA_UNITS aUnits, const wxString &aTextValue, EDA_DATA_TYPE aType)
Function ValueFromString converts aTextValue in aUnits to internal units used by the application.
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
double DoubleValueFromString(EDA_UNITS aUnits, const wxString &aTextValue, EDA_DATA_TYPE aType)
Function DoubleValueFromString converts aTextValue to a double.
EDA_UNITS GetUserUnits() const
Return the user units currently in use.
References DEGREES, DoubleValueFromString(), Format(), FPT_HEIGHT, FPT_ORIENTATION, FPT_TEXT, FPT_THICKNESS, FPT_WIDTH, FPT_XOFFSET, FPT_YOFFSET, EDA_BASE_FRAME::GetUserUnits(), m_frame, text, and ValueFromString().
◆ SetValueAsBool()
void FP_TEXT_GRID_TABLE::SetValueAsBool |
( |
int |
aRow, |
|
|
int |
aCol, |
|
|
bool |
aValue |
|
) |
| |
|
override |
◆ SetValueAsLong()
void FP_TEXT_GRID_TABLE::SetValueAsLong |
( |
int |
aRow, |
|
|
int |
aCol, |
|
|
long |
aValue |
|
) |
| |
|
override |
Definition at line 339 of file fp_text_grid_table.cpp.
351 wxFAIL_MSG(
wxString::Format( wxT(
"column %d doesn't hold a long value" ), aCol ) );
bool IsBackLayer(PCB_LAYER_ID aLayerId)
Layer classification: check if it's a back layer.
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
PCB_LAYER_ID ToLAYER_ID(int aLayer)
References Format(), FPT_LAYER, IsBackLayer(), text, and ToLAYER_ID().
◆ m_boolColAttr
wxGridCellAttr* FP_TEXT_GRID_TABLE::m_boolColAttr |
|
private |
◆ m_frame
◆ m_layerColAttr
wxGridCellAttr* FP_TEXT_GRID_TABLE::m_layerColAttr |
|
private |
◆ m_orientationColAttr
wxGridCellAttr* FP_TEXT_GRID_TABLE::m_orientationColAttr |
|
private |
◆ m_readOnlyAttr
wxGridCellAttr* FP_TEXT_GRID_TABLE::m_readOnlyAttr |
|
private |
The documentation for this class was generated from the following files: