KiCad PCB EDA Suite
FIELDS_GRID_TABLE< T > Class Template Reference

#include <fields_grid_table.h>

Inheritance diagram for FIELDS_GRID_TABLE< T >:

Public Member Functions

 FIELDS_GRID_TABLE (DIALOG_SHIM *aDialog, SCH_BASE_FRAME *aFrame, LIB_PART *aPart)
 
 ~FIELDS_GRID_TABLE ()
 
int GetNumberRows () override
 
int GetNumberCols () override
 
wxString GetColLabelValue (int aCol) 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
 
void SetValue (int aRow, int aCol, const wxString &aValue) override
 
void SetValueAsBool (int aRow, int aCol, bool aValue) override
 
wxString StringFromBool (bool aValue)
 
bool BoolFromString (wxString aValue)
 

Private Attributes

SCH_BASE_FRAMEm_frame
 
EDA_UNITS_T m_userUnits
 
LIB_PARTm_part
 
SCH_FIELD_VALIDATOR m_fieldNameValidator
 
SCH_FIELD_VALIDATOR m_referenceValidator
 
SCH_FIELD_VALIDATOR m_valueValidator
 
wxGridCellAttr * m_readOnlyAttr
 
wxGridCellAttr * m_fieldNameAttr
 
wxGridCellAttr * m_referenceAttr
 
wxGridCellAttr * m_valueAttr
 
wxGridCellAttr * m_footprintAttr
 
wxGridCellAttr * m_urlAttr
 
wxGridCellAttr * m_nonUrlAttr
 
wxGridCellAttr * m_boolAttr
 
wxGridCellAttr * m_vAlignAttr
 
wxGridCellAttr * m_hAlignAttr
 
wxGridCellAttr * m_orientationAttr
 

Detailed Description

template<class T>
class FIELDS_GRID_TABLE< T >

Definition at line 71 of file fields_grid_table.h.

Constructor & Destructor Documentation

◆ FIELDS_GRID_TABLE()

template<class T >
FIELDS_GRID_TABLE< T >::FIELDS_GRID_TABLE ( DIALOG_SHIM aDialog,
SCH_BASE_FRAME aFrame,
LIB_PART aPart 
)

Definition at line 48 of file fields_grid_table.cpp.

49  :
50  m_frame( aFrame ),
51  m_userUnits( aDialog->GetUserUnits() ),
52  m_part( aPart ),
56 {
57  // Build the various grid cell attributes.
58 
59  m_readOnlyAttr = new wxGridCellAttr;
60  m_readOnlyAttr->SetReadOnly( true );
61 
62  m_fieldNameAttr = new wxGridCellAttr;
63  GRID_CELL_TEXT_EDITOR* nameEditor = new GRID_CELL_TEXT_EDITOR();
64  nameEditor->SetValidator( m_fieldNameValidator );
65  m_fieldNameAttr->SetEditor( nameEditor );
66 
67  m_referenceAttr = new wxGridCellAttr;
68  GRID_CELL_TEXT_EDITOR* referenceEditor = new GRID_CELL_TEXT_EDITOR();
69  referenceEditor->SetValidator( m_referenceValidator );
70  m_referenceAttr->SetEditor( referenceEditor );
71 
72  m_valueAttr = new wxGridCellAttr;
73  GRID_CELL_TEXT_EDITOR* valueEditor = new GRID_CELL_TEXT_EDITOR();
74  valueEditor->SetValidator( m_valueValidator );
75  m_valueAttr->SetEditor( valueEditor );
76 
77  m_footprintAttr = new wxGridCellAttr;
79  fpIdEditor->SetValidator( LIB_ID_VALIDATOR( LIB_ID::ID_PCB ) );
80  m_footprintAttr->SetEditor( fpIdEditor );
81 
82  m_urlAttr = new wxGridCellAttr;
83  GRID_CELL_URL_EDITOR* urlEditor = new GRID_CELL_URL_EDITOR( aDialog );
84  urlEditor->SetValidator( SCH_FIELD_VALIDATOR( aFrame->IsType( FRAME_SCH_LIB_EDITOR ),
85  DATASHEET ) );
86  m_urlAttr->SetEditor( urlEditor );
87 
88  m_nonUrlAttr = new wxGridCellAttr;
89  wxGridCellTextEditor* nonUrlEditor = new wxGridCellTextEditor();
90  nonUrlEditor->SetValidator( SCH_FIELD_VALIDATOR( aFrame->IsType( FRAME_SCH_LIB_EDITOR ),
91  DATASHEET ) );
92  m_nonUrlAttr->SetEditor( nonUrlEditor );
93 
94  m_boolAttr = new wxGridCellAttr;
95  m_boolAttr->SetRenderer( new wxGridCellBoolRenderer() );
96  m_boolAttr->SetEditor( new wxGridCellBoolEditor() );
97  m_boolAttr->SetAlignment( wxALIGN_CENTER, wxALIGN_BOTTOM );
98 
99  wxArrayString vAlignNames;
100  vAlignNames.Add( _( "Top" ) );
101  vAlignNames.Add( _( "Center" ) );
102  vAlignNames.Add( _( "Bottom" ) );
103  m_vAlignAttr = new wxGridCellAttr;
104  m_vAlignAttr->SetEditor( new wxGridCellChoiceEditor( vAlignNames ) );
105  m_vAlignAttr->SetAlignment( wxALIGN_CENTER, wxALIGN_BOTTOM );
106 
107  wxArrayString hAlignNames;
108  hAlignNames.Add( _( "Left" ) );
109  hAlignNames.Add(_( "Center" ) );
110  hAlignNames.Add(_( "Right" ) );
111  m_hAlignAttr = new wxGridCellAttr;
112  m_hAlignAttr->SetEditor( new wxGridCellChoiceEditor( hAlignNames ) );
113  m_hAlignAttr->SetAlignment( wxALIGN_CENTER, wxALIGN_BOTTOM );
114 
115  wxArrayString orientationNames;
116  orientationNames.Add( _( "Horizontal" ) );
117  orientationNames.Add(_( "Vertical" ) );
118  m_orientationAttr = new wxGridCellAttr;
119  m_orientationAttr->SetEditor( new wxGridCellChoiceEditor( orientationNames ) );
120  m_orientationAttr->SetAlignment( wxALIGN_CENTER, wxALIGN_BOTTOM );
121 }
name of datasheet
wxGridCellAttr * m_referenceAttr
SCH_BASE_FRAME * m_frame
Field Reference of part, i.e. "IC21".
This class works around a bug in wxGrid where the first keystroke doesn't get sent through the valida...
Definition: validators.h:44
wxGridCellAttr * m_readOnlyAttr
#define VALUE
wxGridCellAttr * m_hAlignAttr
SCH_FIELD_VALIDATOR m_referenceValidator
SCH_FIELD_VALIDATOR m_fieldNameValidator
wxGridCellAttr * m_boolAttr
Custom validator that verifies that a string defines a valid LIB_ID.
Definition: validators.h:170
#define FIELD_NAME
virtual void SetValidator(const wxValidator &validator) override
Definition: validators.cpp:46
wxGridCellAttr * m_fieldNameAttr
wxGridCellAttr * m_urlAttr
SCH_FIELD_VALIDATOR m_valueValidator
bool IsType(FRAME_T aType) const
wxGridCellAttr * m_vAlignAttr
wxGridCellAttr * m_orientationAttr
wxGridCellAttr * m_valueAttr
wxGridCellAttr * m_nonUrlAttr
A text control validator used for validating the text allowed in library and schematic component fiel...
wxGridCellAttr * m_footprintAttr
EDA_UNITS_T GetUserUnits() const override
Definition: dialog_shim.h:133

◆ ~FIELDS_GRID_TABLE()

template<class T >
FIELDS_GRID_TABLE< T >::~FIELDS_GRID_TABLE ( )

Definition at line 125 of file fields_grid_table.cpp.

126 {
127  m_readOnlyAttr->DecRef();
128  m_fieldNameAttr->DecRef();
129  m_boolAttr->DecRef();
130  m_referenceAttr->DecRef();
131  m_valueAttr->DecRef();
132  m_footprintAttr->DecRef();
133  m_urlAttr->DecRef();
134  m_vAlignAttr->DecRef();
135  m_hAlignAttr->DecRef();
136  m_orientationAttr->DecRef();
137 }
wxGridCellAttr * m_referenceAttr
wxGridCellAttr * m_readOnlyAttr
wxGridCellAttr * m_hAlignAttr
wxGridCellAttr * m_boolAttr
wxGridCellAttr * m_fieldNameAttr
wxGridCellAttr * m_urlAttr
wxGridCellAttr * m_vAlignAttr
wxGridCellAttr * m_orientationAttr
wxGridCellAttr * m_valueAttr
wxGridCellAttr * m_footprintAttr

Member Function Documentation

◆ BoolFromString()

template<class T >
bool FIELDS_GRID_TABLE< T >::BoolFromString ( wxString  aValue)

Definition at line 562 of file fields_grid_table.cpp.

563 {
564  if( aValue == "1" )
565  {
566  return true;
567  }
568  else if( aValue == "0" )
569  {
570  return false;
571  }
572  else
573  {
574  wxFAIL_MSG( wxString::Format( "string \"%s\" can't be converted to boolean "
575  "correctly, it will have been perceived as FALSE", aValue ) );
576  return false;
577  }
578 }
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, CPTREE &aTree)
Function Format outputs a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:205

◆ CanGetValueAs()

template<class T >
bool FIELDS_GRID_TABLE< T >::CanGetValueAs ( int  aRow,
int  aCol,
const wxString &  aTypeName 
)
override

Definition at line 162 of file fields_grid_table.cpp.

163 {
164  switch( aCol )
165  {
166  case FDC_NAME:
167  case FDC_VALUE:
168  case FDC_H_ALIGN:
169  case FDC_V_ALIGN:
170  case FDC_TEXT_SIZE:
171  case FDC_ORIENTATION:
172  case FDC_POSX:
173  case FDC_POSY:
174  return aTypeName == wxGRID_VALUE_STRING;
175 
176  case FDC_SHOWN:
177  case FDC_ITALIC:
178  case FDC_BOLD:
179  return aTypeName == wxGRID_VALUE_BOOL;
180 
181  default:
182  wxFAIL;
183  return false;
184  }
185 }

◆ CanSetValueAs()

template<class T >
bool FIELDS_GRID_TABLE< T >::CanSetValueAs ( int  aRow,
int  aCol,
const wxString &  aTypeName 
)
override

Definition at line 189 of file fields_grid_table.cpp.

190 {
191  return CanGetValueAs( aRow, aCol, aTypeName );
192 }
bool CanGetValueAs(int aRow, int aCol, const wxString &aTypeName) override

◆ GetAttr()

template<class T >
wxGridCellAttr * FIELDS_GRID_TABLE< T >::GetAttr ( int  row,
int  col,
wxGridCellAttr::wxAttrKind  kind 
)
override

Definition at line 196 of file fields_grid_table.cpp.

197 {
198  switch( aCol )
199  {
200  case FDC_NAME:
201  if( aRow < MANDATORY_FIELDS )
202  {
203  m_readOnlyAttr->IncRef();
204  return m_readOnlyAttr;
205  }
206  else
207  {
208  m_fieldNameAttr->IncRef();
209  return m_fieldNameAttr;
210  }
211 
212  case FDC_VALUE:
213  if( aRow == REFERENCE )
214  {
215  m_referenceAttr->IncRef();
216  return m_referenceAttr;
217  }
218  else if( aRow == VALUE )
219  {
220  // For power symbols, the value is not editable, because value and pin name must
221  // be the same and can be edited only in library editor.
223  {
224  m_readOnlyAttr->IncRef();
225  return m_readOnlyAttr;
226  }
227  else
228  {
229  m_valueAttr->IncRef();
230  return m_valueAttr;
231  }
232  }
233  else if( aRow == FOOTPRINT )
234  {
235  m_footprintAttr->IncRef();
236  return m_footprintAttr;
237  }
238  else if( aRow == DATASHEET )
239  {
240  m_urlAttr->IncRef();
241  return m_urlAttr;
242  }
243  else
244  {
245  wxString fieldname = GetValue( aRow, FDC_NAME );
246  const TEMPLATE_FIELDNAME* templateFn = m_frame->GetTemplateFieldName( fieldname );
247 
248  if( templateFn && templateFn->m_URL )
249  {
250  m_urlAttr->IncRef();
251  return m_urlAttr;
252  }
253  else
254  {
255  m_nonUrlAttr->IncRef();
256  return m_nonUrlAttr;
257  }
258  }
259  return nullptr;
260 
261  case FDC_TEXT_SIZE:
262  case FDC_POSX:
263  case FDC_POSY:
264  return nullptr;
265 
266  case FDC_H_ALIGN:
267  m_hAlignAttr->IncRef();
268  return m_hAlignAttr;
269 
270  case FDC_V_ALIGN:
271  m_vAlignAttr->IncRef();
272  return m_vAlignAttr;
273 
274  case FDC_ORIENTATION:
275  m_orientationAttr->IncRef();
276  return m_orientationAttr;
277 
278  case FDC_SHOWN:
279  case FDC_ITALIC:
280  case FDC_BOLD:
281  m_boolAttr->IncRef();
282  return m_boolAttr;
283 
284  default:
285  wxFAIL;
286  return nullptr;
287  }
288 }
name of datasheet
The first 4 are mandatory, and must be instantiated in SCH_COMPONENT and LIB_PART constructors.
wxGridCellAttr * m_referenceAttr
bool m_URL
If field should have a browse button.
SCH_BASE_FRAME * m_frame
Field Name Module PCB, i.e. "16DIP300".
Field Reference of part, i.e. "IC21".
wxGridCellAttr * m_readOnlyAttr
#define VALUE
wxGridCellAttr * m_hAlignAttr
wxString GetValue(int aRow, int aCol) override
wxGridCellAttr * m_boolAttr
wxGridCellAttr * m_fieldNameAttr
wxGridCellAttr * m_urlAttr
bool IsPower() const
bool IsType(FRAME_T aType) const
wxGridCellAttr * m_vAlignAttr
const TEMPLATE_FIELDNAME * GetTemplateFieldName(const wxString &aName) const
Search for aName in the the template field name list.
wxGridCellAttr * m_orientationAttr
wxGridCellAttr * m_valueAttr
Struct TEMPLATE_FIELDNAME holds a name of a component's field, field value, and default visibility.
wxGridCellAttr * m_nonUrlAttr
wxGridCellAttr * m_footprintAttr

◆ GetColLabelValue()

template<class T >
wxString FIELDS_GRID_TABLE< T >::GetColLabelValue ( int  aCol)
override

Definition at line 141 of file fields_grid_table.cpp.

142 {
143  switch( aCol )
144  {
145  case FDC_NAME: return _( "Name" );
146  case FDC_VALUE: return _( "Value" );
147  case FDC_SHOWN: return _( "Show" );
148  case FDC_H_ALIGN: return _( "H Align" );
149  case FDC_V_ALIGN: return _( "V Align" );
150  case FDC_ITALIC: return _( "Italic" );
151  case FDC_BOLD: return _( "Bold" );
152  case FDC_TEXT_SIZE: return _( "Text Size" );
153  case FDC_ORIENTATION: return _( "Orientation" );
154  case FDC_POSX: return _( "X Position" );
155  case FDC_POSY: return _( "Y Position" );
156  default: wxFAIL; return wxEmptyString;
157  }
158 }

◆ GetNumberCols()

template<class T>
int FIELDS_GRID_TABLE< T >::GetNumberCols ( )
inlineoverride

Definition at line 78 of file fields_grid_table.h.

78 { return FDC_COUNT; }

◆ GetNumberRows()

template<class T>
int FIELDS_GRID_TABLE< T >::GetNumberRows ( )
inlineoverride

Definition at line 77 of file fields_grid_table.h.

77 { return (int) this->size(); }

Referenced by DIALOG_EDIT_COMPONENT_IN_LIBRARY::OnMoveDown(), and DIALOG_EDIT_COMPONENT_IN_LIBRARY::TransferDataToWindow().

◆ GetValue()

template<class T >
wxString FIELDS_GRID_TABLE< T >::GetValue ( int  aRow,
int  aCol 
)
override

Definition at line 292 of file fields_grid_table.cpp.

293 {
294  wxCHECK( aRow < GetNumberRows(), wxEmptyString );
295  const T& field = this->at( (size_t) aRow );
296 
297  switch( aCol )
298  {
299  case FDC_NAME:
300  // Use default field name for mandatory fields, because they are translated
301  // according to the current locale
302  if( aRow < MANDATORY_FIELDS )
304  else
305  return field.GetName( false );
306 
307  case FDC_VALUE:
308  return field.GetText();
309 
310  case FDC_SHOWN:
311  return StringFromBool( field.IsVisible() );
312 
313  case FDC_H_ALIGN:
314  switch ( field.GetHorizJustify() )
315  {
317  return _( "Left" );
319  return _( "Center" );
321  return _( "Right" );
322  }
323 
324  break;
325 
326  case FDC_V_ALIGN:
327  switch ( field.GetVertJustify() )
328  {
330  return _( "Top" );
332  return _( "Center" );
334  return _( "Bottom" );
335  }
336 
337  break;
338 
339  case FDC_ITALIC:
340  return StringFromBool( field.IsItalic() );
341 
342  case FDC_BOLD:
343  return StringFromBool( field.IsBold() );
344 
345  case FDC_TEXT_SIZE:
346  return StringFromValue( m_userUnits, field.GetTextSize().GetHeight(), true, true );
347 
348  case FDC_ORIENTATION:
349  switch ( (int) field.GetTextAngle() )
350  {
351  case TEXT_ANGLE_HORIZ:
352  return _( "Horizontal" );
353  case TEXT_ANGLE_VERT:
354  return _( "Vertical" );
355  }
356 
357  break;
358 
359  case FDC_POSX:
360  return StringFromValue( m_userUnits, field.GetTextPos().x, true );
361 
362  case FDC_POSY:
363  return StringFromValue( m_userUnits, field.GetTextPos().y, true );
364 
365  default:
366  // we can't assert here because wxWidgets sometimes calls this without checking
367  // the column type when trying to see if there's an overflow
368  break;
369  }
370 
371  return wxT( "bad wxWidgets!" );
372 }
#define TEXT_ANGLE_HORIZ
int GetNumberRows() override
#define TEXT_ANGLE_VERT
The first 4 are mandatory, and must be instantiated in SCH_COMPONENT and LIB_PART constructors.
static const wxString GetDefaultFieldName(int aFieldNdx)
Function GetDefaultFieldName returns a default symbol field name for field aFieldNdx for all componen...
wxString StringFromValue(EDA_UNITS_T aUnits, int aValue, bool aAddUnitSymbol, bool aUseMils)
Function StringFromValue returns the string from aValue according to units (inch, mm ....
Definition: base_units.cpp:210
wxString StringFromBool(bool aValue)

◆ GetValueAsBool()

template<class T >
bool FIELDS_GRID_TABLE< T >::GetValueAsBool ( int  aRow,
int  aCol 
)
override

Definition at line 376 of file fields_grid_table.cpp.

377 {
378  wxCHECK( aRow < GetNumberRows(), false );
379  const T& field = this->at( (size_t) aRow );
380 
381  switch( aCol )
382  {
383  case FDC_SHOWN: return field.IsVisible();
384  case FDC_ITALIC: return field.IsItalic();
385  case FDC_BOLD: return field.IsBold();
386  default:
387  wxFAIL_MSG( wxString::Format( wxT( "column %d doesn't hold a bool value" ), aCol ) );
388  return false;
389  }
390 }
int GetNumberRows() override
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, CPTREE &aTree)
Function Format outputs a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:205

◆ IsEmptyCell()

template<class T>
bool FIELDS_GRID_TABLE< T >::IsEmptyCell ( int  row,
int  col 
)
inlineoverride

Definition at line 82 of file fields_grid_table.h.

83  {
84  return false; // don't allow adjacent cell overflow, even if we are actually empty
85  }

◆ SetValue()

template<class T >
void FIELDS_GRID_TABLE< T >::SetValue ( int  aRow,
int  aCol,
const wxString &  aValue 
)
override

Definition at line 394 of file fields_grid_table.cpp.

395 {
396  wxCHECK( aRow < GetNumberRows(), /*void*/ );
397  T& field = this->at( (size_t) aRow );
398  wxPoint pos;
399 
400  switch( aCol )
401  {
402  case FDC_NAME:
403  field.SetName( aValue );
404  break;
405 
406  case FDC_VALUE:
407  field.SetText( aValue );
408  break;
409 
410  case FDC_SHOWN:
411  field.SetVisible( BoolFromString( aValue ) );
412  break;
413 
414  case FDC_H_ALIGN:
415  if( aValue == _( "Left" ) )
416  field.SetHorizJustify( GR_TEXT_HJUSTIFY_LEFT );
417  else if( aValue == _( "Center" ) )
418  field.SetHorizJustify( GR_TEXT_HJUSTIFY_CENTER );
419  else if( aValue == _( "Right" ) )
420  field.SetHorizJustify( GR_TEXT_HJUSTIFY_RIGHT );
421  else
422  wxFAIL_MSG( wxT( "unknown horizontal alignment: " ) + aValue );
423  break;
424 
425  case FDC_V_ALIGN:
426  if( aValue == _( "Top" ) )
427  field.SetVertJustify( GR_TEXT_VJUSTIFY_TOP );
428  else if( aValue == _( "Center" ) )
429  field.SetVertJustify( GR_TEXT_VJUSTIFY_CENTER );
430  else if( aValue == _( "Bottom" ) )
431  field.SetVertJustify( GR_TEXT_VJUSTIFY_BOTTOM );
432  else
433  wxFAIL_MSG( wxT( "unknown vertical alignment: " ) + aValue);
434  break;
435 
436  case FDC_ITALIC:
437  field.SetItalic( BoolFromString( aValue ) );
438  break;
439 
440  case FDC_BOLD:
441  field.SetBold( BoolFromString( aValue ) );
442  break;
443 
444  case FDC_TEXT_SIZE:
445  field.SetTextSize( wxSize( ValueFromString( m_userUnits, aValue ),
446  ValueFromString( m_userUnits, aValue ) ) );
447  break;
448 
449  case FDC_ORIENTATION:
450  if( aValue == _( "Horizontal" ) )
451  field.SetTextAngle( TEXT_ANGLE_HORIZ );
452  else if( aValue == _( "Vertical" ) )
453  field.SetTextAngle( TEXT_ANGLE_VERT );
454  else
455  wxFAIL_MSG( wxT( "unknown orientation: " ) + aValue );
456  break;
457 
458  case FDC_POSX:
459  case FDC_POSY:
460  pos = field.GetTextPos();
461  if( aCol == FDC_POSX )
462  pos.x = ValueFromString( m_userUnits, aValue );
463  else
464  pos.y = ValueFromString( m_userUnits, aValue );
465  field.SetTextPos( pos );
466  break;
467 
468  default:
469  wxFAIL_MSG( wxString::Format( wxT( "column %d doesn't hold a string value" ), aCol ) );
470  break;
471  }
472 
473  GetView()->Refresh();
474 }
#define TEXT_ANGLE_HORIZ
int GetNumberRows() override
#define TEXT_ANGLE_VERT
int ValueFromString(EDA_UNITS_T aUnits, const wxString &aTextValue, bool aUseMils)
Function ValueFromString converts aTextValue in aUnits to internal units used by the application.
Definition: base_units.cpp:409
bool BoolFromString(wxString aValue)
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, CPTREE &aTree)
Function Format outputs a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:205

◆ SetValueAsBool()

template<class T >
void FIELDS_GRID_TABLE< T >::SetValueAsBool ( int  aRow,
int  aCol,
bool  aValue 
)
override

Definition at line 478 of file fields_grid_table.cpp.

479 {
480  wxCHECK( aRow < GetNumberRows(), /*void*/ );
481  T& field = this->at( (size_t) aRow );
482 
483  switch( aCol )
484  {
485  case FDC_SHOWN:
486  field.SetVisible( aValue );
487  break;
488  case FDC_ITALIC:
489  field.SetItalic( aValue );
490  break;
491  case FDC_BOLD:
492  field.SetBold( aValue );
493  break;
494  default:
495  wxFAIL_MSG( wxString::Format( wxT( "column %d doesn't hold a bool value" ), aCol ) );
496  break;
497  }
498 }
int GetNumberRows() override
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, CPTREE &aTree)
Function Format outputs a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
Definition: ptree.cpp:205

◆ StringFromBool()

template<class T >
wxString FIELDS_GRID_TABLE< T >::StringFromBool ( bool  aValue)

Definition at line 552 of file fields_grid_table.cpp.

553 {
554  if( aValue )
555  return wxT( "1" );
556  else
557  return wxT( "0" );
558 }

Member Data Documentation

◆ m_boolAttr

template<class T>
wxGridCellAttr* FIELDS_GRID_TABLE< T >::m_boolAttr
private

◆ m_fieldNameAttr

template<class T>
wxGridCellAttr* FIELDS_GRID_TABLE< T >::m_fieldNameAttr
private

◆ m_fieldNameValidator

template<class T>
SCH_FIELD_VALIDATOR FIELDS_GRID_TABLE< T >::m_fieldNameValidator
private

◆ m_footprintAttr

template<class T>
wxGridCellAttr* FIELDS_GRID_TABLE< T >::m_footprintAttr
private

◆ m_frame

template<class T>
SCH_BASE_FRAME* FIELDS_GRID_TABLE< T >::m_frame
private

Definition at line 101 of file fields_grid_table.h.

◆ m_hAlignAttr

template<class T>
wxGridCellAttr* FIELDS_GRID_TABLE< T >::m_hAlignAttr
private

◆ m_nonUrlAttr

template<class T>
wxGridCellAttr* FIELDS_GRID_TABLE< T >::m_nonUrlAttr
private

◆ m_orientationAttr

template<class T>
wxGridCellAttr* FIELDS_GRID_TABLE< T >::m_orientationAttr
private

◆ m_part

template<class T>
LIB_PART* FIELDS_GRID_TABLE< T >::m_part
private

Definition at line 103 of file fields_grid_table.h.

◆ m_readOnlyAttr

template<class T>
wxGridCellAttr* FIELDS_GRID_TABLE< T >::m_readOnlyAttr
private

◆ m_referenceAttr

template<class T>
wxGridCellAttr* FIELDS_GRID_TABLE< T >::m_referenceAttr
private

◆ m_referenceValidator

template<class T>
SCH_FIELD_VALIDATOR FIELDS_GRID_TABLE< T >::m_referenceValidator
private

◆ m_urlAttr

template<class T>
wxGridCellAttr* FIELDS_GRID_TABLE< T >::m_urlAttr
private

◆ m_userUnits

template<class T>
EDA_UNITS_T FIELDS_GRID_TABLE< T >::m_userUnits
private

Definition at line 102 of file fields_grid_table.h.

◆ m_vAlignAttr

template<class T>
wxGridCellAttr* FIELDS_GRID_TABLE< T >::m_vAlignAttr
private

◆ m_valueAttr

template<class T>
wxGridCellAttr* FIELDS_GRID_TABLE< T >::m_valueAttr
private

◆ m_valueValidator

template<class T>
SCH_FIELD_VALIDATOR FIELDS_GRID_TABLE< T >::m_valueValidator
private

The documentation for this class was generated from the following files: