20#ifndef PCB_DRILL_CHART_H
21#define PCB_DRILL_CHART_H
66 wxString
GetClass()
const override {
return wxT(
"PCB_DRILL_CHART" ); }
145 const std::vector<KICAD_T>& aScanTypes )
override;
155 void Serialize( google::protobuf::Any& aContainer )
const override;
156 bool Deserialize(
const google::protobuf::Any& aContainer )
override;
175 void migrateRows(
int aRows,
int aCols,
int aFirstDataRow,
176 const std::vector<std::string>& aNewRowKeys );
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
BOARD_ITEM(BOARD_ITEM *aParent, KICAD_T idtype, PCB_LAYER_ID aLayer=F_Cu)
Information pertinent to a Pcbnew printed circuit board.
The column set and formatting a new chart starts from.
Grouping rules and symbol assignments, shared by reference so a chart and its map can never disagree ...
The base class for create windows for drawing purpose.
A base class for most all the KiCad significant classes used in schematics and boards.
KICAD_T Type() const
Returns the type of object.
double Similarity(const BOARD_ITEM &aOther) const override
Return a measure of how likely the other object is to represent the same object.
~PCB_DRILL_CHART() override=default
PCB_DRILL_CHART(BOARD_ITEM *aParent)
void SetSymbolColumn(int aCol)
void Serialize(google::protobuf::Any &aContainer) const override
Serializes this object to the given Any message.
static bool ClassOf(const EDA_ITEM *aItem)
DRILL_CHART_UNITS GetUnits() const
bool Deserialize(const google::protobuf::Any &aContainer) override
Deserializes the given protobuf message into this object.
std::map< int, std::string > m_rowKeys
void ApplyTemplate(const DRILL_CHART_TEMPLATE &aTemplate)
Copy a template's formatting.
const std::map< int, int > & RowShapes() const
Curated shape index for each generated row, by table row.
std::map< int, int > & RowShapes()
std::vector< DRILL_CHART_COLUMN > & Columns()
void swapData(BOARD_ITEM *aImage) override
uint64_t GetBuiltGeneration() const
Board drill generation the cells were built at.
DRILL_CHART_UNITS m_units
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
std::map< int, int > m_rowShapes
void RebuildCells(const BOARD &aBoard, DRILL_SYMBOL_PROFILE *aAssignedProfile=nullptr)
Regenerate the cells from the board.
wxString GetClass() const override
Return the class name.
const std::map< int, std::string > & RowKeys() const
Drill group each generated row reports on, by table row.
PCB_DRILL_CHART & operator=(const PCB_DRILL_CHART &)=delete
std::vector< DRILL_CHART_COLUMN > m_columns
uint64_t m_builtGeneration
void SetShowTotals(bool aShow)
std::vector< DRILL_CHART_GROUP > buildGroups(const BOARD &aBoard) const
The board data this chart reports on, as chart rows.
bool operator==(const BOARD_ITEM &aOther) const override
const std::vector< DRILL_CHART_COLUMN > & Columns() const
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const override
Return a user-visible description string of this item.
void SetPrecision(int aPrecision)
Clamped.
void migrateRows(int aRows, int aCols, int aFirstDataRow, const std::vector< std::string > &aNewRowKeys)
Move each row's cells to the row that reports the same drill group.
INSPECT_RESULT Visit(INSPECTOR inspector, void *testData, const std::vector< KICAD_T > &aScanTypes) override
May be re-implemented for each derived class in order to handle all the types given by its member dat...
bool GetShowTotals() const
bool IsDataRow(int aRow) const
True for a row that reports a drill group, false for the title, heading and totals.
std::map< int, std::string > & RowKeys()
void SetUnits(DRILL_CHART_UNITS aUnits)
void GetMsgPanelInfo(EDA_DRAW_FRAME *aFrame, std::vector< MSG_PANEL_ITEM > &aList) override
Populate aList of MSG_PANEL_ITEM objects with it's internal state for display purposes.
DRILL_CHART_FILTER & Filter()
const DRILL_CHART_FILTER & Filter() const
int GetSymbolColumn() const
Table column the symbol is drawn in, or -1 when the chart has no symbol column.
DRILL_CHART_FILTER m_filter
PCB_TABLE(BOARD_ITEM *aParent, int aLineWidth)
Hole classification and drill span, shared by the drill model and the drill writers.
const INSPECTOR_FUNC & INSPECTOR
std::function passed to nested users by ref, avoids copying std::function.
void RefreshDrillCharts(BOARD &aBoard)
Bring every chart on the board up to date.
Which holes a chart reports on.
@ PCB_DRILL_CHART_T
class PCB_DRILL_CHART, a live drill chart derived from PCB_TABLE