KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_drill_chart_properties.h
Go to the documentation of this file.
1/*
2 * This program source code file is part of KiCad, a free EDA CAD application.
3 *
4 * Copyright The KiCad Developers, see AUTHORS.txt for contributors.
5 *
6 * This program is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU General Public License
8 * as published by the Free Software Foundation; either version 2
9 * of the License, or (at your option) any later version.
10 *
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
15 *
16 * You should have received a copy of the GNU General Public License
17 * along with this program. If not, see <https://www.gnu.org/licenses/>.
18 */
19
20#ifndef DIALOG_DRILL_CHART_PROPERTIES_H
21#define DIALOG_DRILL_CHART_PROPERTIES_H
22
23#include <vector>
24
27#include <drill/drill_span.h>
29#include <widgets/unit_binder.h>
30
31
33class PCB_DRILL_CHART;
34
35
44{
45public:
48
49private:
50 bool TransferDataToWindow() override;
51 bool TransferDataFromWindow() override;
52
53 void onBorderChecked( wxCommandEvent& aEvent ) override;
54 void onMoveUp( wxCommandEvent& aEvent ) override;
55 void onMoveDown( wxCommandEvent& aEvent ) override;
56 void onResetColumns( wxCommandEvent& aEvent ) override;
57 void onImportTemplate( wxCommandEvent& aEvent ) override;
58 void onExportTemplate( wxCommandEvent& aEvent ) override;
59
63 void applyTemplate( const DRILL_CHART_TEMPLATE& aTemplate );
64
65
69 void fillColumnGrid();
70
74 bool harvestColumnGrid();
75
76 void moveColumn( int aDelta );
77
81 void fitColumnGrid();
82
83 void onColumnGridSize( wxSizeEvent& aEvent );
84
87
93
98 std::vector<DRILL_CHART_COLUMN> m_columns;
99 std::vector<bool> m_shown;
100
101
104};
105
106#endif // DIALOG_DRILL_CHART_PROPERTIES_H
DIALOG_DRILL_CHART_PROPERTIES_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Drill Chart Properties"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(-1,-1), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
void onExportTemplate(wxCommandEvent &aEvent) override
void onMoveUp(wxCommandEvent &aEvent) override
std::vector< DRILL_CHART_COLUMN > m_columns
Every known column, checked ones first in chart order.
void fitColumnGrid()
Share the grid's width out across its columns so none of it goes unused.
DIALOG_DRILL_CHART_PROPERTIES(PCB_BASE_EDIT_FRAME *aFrame, PCB_DRILL_CHART *aChart)
void onBorderChecked(wxCommandEvent &aEvent) override
DRILL_SYMBOL_PROFILE m_profile
The board's grouping, edited through the Group By column.
void onMoveDown(wxCommandEvent &aEvent) override
void fillColumnGrid()
Fill the column grid from m_columns, preserving the selected row.
void applyTemplate(const DRILL_CHART_TEMPLATE &aTemplate)
Rebuild m_columns/m_shown from a template, keeping unused columns available.
void onImportTemplate(wxCommandEvent &aEvent) override
bool harvestColumnGrid()
Read the grid back into m_columns.
void onResetColumns(wxCommandEvent &aEvent) override
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 ...
Common, abstract interface for edit frames.
A drill chart placed on the board, kept in step with the holes.
Hole classification and drill span, shared by the drill model and the drill writers.