20#ifndef PCB_DRILL_CHART_H
21#define PCB_DRILL_CHART_H
83 wxString
GetClass()
const override {
return wxT(
"PCB_DRILL_CHART" ); }
124 bool IsDataRow(
int aRow )
const override;
140 void Serialize( google::protobuf::Any& aContainer )
const override;
141 bool Deserialize(
const google::protobuf::Any& aContainer )
override;
144 std::unique_ptr<GENERATED_TABLE_CONTENT>
generate(
const BOARD& aBoard,
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
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.
Board state a table rebuild wants to change, held back until the whole refresh has succeeded.
One pass of rebuilding tables.
The columns one generator (the drill chart, a stackup table, ...) can produce, and the units and prec...
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)
bool Deserialize(const google::protobuf::Any &aContainer) override
Deserializes the given protobuf message into this object.
const GENERATED_TABLE_SCHEMA & Schema() const override
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()
void swapData(BOARD_ITEM *aImage) override
uint64_t GetBuiltGeneration() const
Board drill generation the cells were built at.
EDA_ITEM * Clone() const override
Create a duplicate of this item with linked list members set to NULL.
void onRebuilt(const BOARD &aBoard, const GENERATED_TABLE_CONTENT &aContent) override
Called once the cells are laid out, with the content they were built from.
std::map< int, int > m_rowShapes
wxString GetClass() const override
Return the class name.
PCB_DRILL_CHART & operator=(const PCB_DRILL_CHART &)=delete
uint64_t m_builtGeneration
void SetShowTotals(bool aShow)
bool operator==(const BOARD_ITEM &aOther) const override
wxString GetItemDescription(UNITS_PROVIDER *aUnitsProvider, bool aFull) const override
Return a user-visible description string of this item.
std::unique_ptr< GENERATED_TABLE_CONTENT > generate(const BOARD &aBoard, GENERATED_TABLE_REFRESH *aRefresh) const override
The rows this table reports.
std::vector< DRILL_CHART_GROUP > buildGroups(const BOARD &aBoard, const DRILL_SYMBOL_PROFILE &aProfile) const
The board data this chart reports on, as chart rows grouped the way aProfile says.
bool IsDataRow(int aRow) const override
True for a row that reports a drill group, false for the title, heading and totals.
bool GetShowTotals() const
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.
bool IsStale(const BOARD &aBoard) const override
One integer comparison, so a board with nothing drill related changed pays nothing.
DRILL_CHART_COLUMN_ID columnId(int aCol) const
The typed id a column at this index holds, so generate's switch stays exhaustive even though a stored...
DRILL_CHART_FILTER m_filter
PCB_GENERATED_TABLE(BOARD_ITEM *aParent, KICAD_T aType, int aLineWidth)
const GENERATED_TABLE_SCHEMA & DrillChartSchema()
Every column the drill chart schema knows how to build, in the order the schema lists them.
Hole classification and drill span, shared by the drill model and the drill writers.
A drill chart's rows, with the symbol each one is drawn with.
std::vector< std::optional< int > > m_RowShapes
Per m_Rows entry, empty when the mark is not a shape.
Which holes a chart reports on.
DRILL_SYMBOL_PROFILE m_Profile
void Commit(BOARD &aBoard) override
DRILL_PROFILE_PENDING(BOARD &aBoard)
What a generated table reports, one entry per cell below the heading row.
@ PCB_DRILL_CHART_T
class PCB_DRILL_CHART, a live drill chart derived from PCB_TABLE