KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_drill_groups.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_GROUPS_H
21#define DIALOG_DRILL_GROUPS_H
22
23#include <vector>
24
26#include <board.h>
28#include <widgets/unit_binder.h>
29
30class PCB_EDIT_FRAME;
31
32
41{
42public:
44 ~DIALOG_DRILL_GROUPS() override;
45
49 void Reload();
50
51 void OnBoardItemAdded( BOARD& aBoard, BOARD_ITEM* aItem ) override { scheduleReload(); }
52 void OnBoardItemsAdded( BOARD& aBoard, std::vector<BOARD_ITEM*>& aItems ) override
53 {
55 }
56 void OnBoardItemRemoved( BOARD& aBoard, BOARD_ITEM* aItem ) override { scheduleReload(); }
57 void OnBoardItemsRemoved( BOARD& aBoard, std::vector<BOARD_ITEM*>& aItems ) override
58 {
60 }
61 void OnBoardItemChanged( BOARD& aBoard, BOARD_ITEM* aItem ) override { scheduleReload(); }
62 void OnBoardItemsChanged( BOARD& aBoard, std::vector<BOARD_ITEM*>& aItems ) override
63 {
65 }
66
67private:
68 void onFreezeChanged( wxCommandEvent& aEvent ) override;
69 void onFlash( wxCommandEvent& aEvent ) override;
70 void onClose( wxCommandEvent& aEvent ) override;
71
72 void onGridSelect( wxGridEvent& aEvent );
73
77 void commitDetail( int aRow );
78
83 void scheduleReload();
84
85 void showDetail( int aRow );
86
87 const DRILL_CHART_GROUP* selectedGroup() const;
88
90
91 std::vector<DRILL_CHART_GROUP> m_groups;
92
97
102
104
105};
106
107#endif // DIALOG_DRILL_GROUPS_H
A base class for any item which can be embedded within the BOARD container class, and therefore insta...
Definition board_item.h:84
Information pertinent to a Pcbnew printed circuit board.
Definition board.h:409
DIALOG_DRILL_GROUPS_BASE(wxWindow *parent, wxWindowID id=wxID_ANY, const wxString &title=_("Drill Groups"), const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxSize(760, 620), long style=wxDEFAULT_DIALOG_STYLE|wxRESIZE_BORDER)
const DRILL_CHART_GROUP * selectedGroup() const
void OnBoardItemsRemoved(BOARD &aBoard, std::vector< BOARD_ITEM * > &aItems) override
void onFreezeChanged(wxCommandEvent &aEvent) override
int m_detailRow
The row the detail pane is showing, so it can be committed before the selection moves.
void OnBoardItemsAdded(BOARD &aBoard, std::vector< BOARD_ITEM * > &aItems) override
void onClose(wxCommandEvent &aEvent) override
std::vector< DRILL_CHART_GROUP > m_groups
void Reload()
Rebuild from the board.
void OnBoardItemRemoved(BOARD &aBoard, BOARD_ITEM *aItem) override
void scheduleReload()
Coalesce a burst of board notifications into one rebuild, and keep the rebuild out of the notificatio...
void OnBoardItemAdded(BOARD &aBoard, BOARD_ITEM *aItem) override
void OnBoardItemsChanged(BOARD &aBoard, std::vector< BOARD_ITEM * > &aItems) override
bool m_loading
Guards against the detail pane writing back while it is being filled in.
void commitDetail(int aRow)
Push the detail pane back into the profile for the given row.
void onFlash(wxCommandEvent &aEvent) override
void onGridSelect(wxGridEvent &aEvent)
DIALOG_DRILL_GROUPS(PCB_EDIT_FRAME *aFrame)
void OnBoardItemChanged(BOARD &aBoard, BOARD_ITEM *aItem) override
PCB_EDIT_FRAME * m_frame
The main frame for Pcbnew.