KiCad PCB EDA Suite
Loading...
Searching...
No Matches
DATA_MODEL_COL Struct Reference

The point of the data model classes is fundamentally to represent three things: More...

#include <fields_table_data_model.h>

Public Attributes

wxString m_fieldName
 
wxString m_label
 
bool m_userAdded
 
bool m_show
 
bool m_group
 

Detailed Description

The point of the data model classes is fundamentally to represent three things:

  1. The list of live "items" (symbols, footprints, etc). These are often pointers to the actual item, or instances in the case of symbols. This is where we get live data from on initial load, and when schematic/board changes come in in real-time, and where we write data back to when the user is done editing.
  2. The data store (m_dataStore), this is the map of the user's edited values. This lets us keep edits separate from the live values, especially since in some editors, this dialog is not modal, and the user can change the live items while the dialog is open and contains edits.
  3. The wx grid view of the table, which is the actual row of grids and columns that we generate from the data store. This is what the user sees and interacts with. This changes with filtering/scoping/grouping, etc. and is rebuilt from the data store as needed. DATA_MODEL_COL and DATA_MODEL_ROW are used together in vectors of both (m_cols and m_rows) to represent the current view of the fields table.

This is not where the fields data itself is stored. See the data model for that.

The columns are rebuilt as the user changes the display options, presets, etc.

The rows are rebuilt according to grouping, filtering, sorting, etc. as well as user actions like expanding and collapsing rows with groupable fields.

A row can contain multiple items because they are grouped together because of the user's grouping settings. Or, a row may contain multiple references to a multi-unit symbol, etc. So, it does not necessarily represent a single symbol in the schematic.

Definition at line 91 of file fields_table_data_model.h.

Member Data Documentation

◆ m_fieldName

◆ m_group

bool DATA_MODEL_COL::m_group

Definition at line 97 of file fields_table_data_model.h.

◆ m_label

wxString DATA_MODEL_COL::m_label

Definition at line 94 of file fields_table_data_model.h.

◆ m_show

bool DATA_MODEL_COL::m_show

◆ m_userAdded

bool DATA_MODEL_COL::m_userAdded

The documentation for this struct was generated from the following file: