KiCad PCB EDA Suite
dialog_migrate_buses.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 (C) 2018 CERN
5  * Copyright (C) 2021 KiCad Developers, see AUTHORS.txt for contributors.
6  * @author Jon Evans <jon@craftyjon.com>
7  *
8  * This program is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU General Public License
10  * as published by the Free Software Foundation; either version 2
11  * of the License, or (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License along
19  * with this program. If not, see <http://www.gnu.org/licenses/>.
20  */
21 
22 #ifndef _DIALOG_MIGRATE_BUSES_H
23 #define _DIALOG_MIGRATE_BUSES_H
24 
25 #include <vector>
26 
27 #include <sch_edit_frame.h>
28 
30 
32 
33 
35 {
37 
38  std::vector<wxString> labels;
39 
40  std::vector<wxString> possible_labels;
41 
42  wxString approved_label;
43 
44  bool approved;
45 };
46 
48 {
49 public:
50 
52 
53 private:
54 
55  void loadGraphData();
56 
57  void updateUi();
58 
59  std::vector<wxString> getProposedLabels( const std::vector<wxString>& aLabelList );
60 
61  void onItemSelected( wxListEvent& aEvent );
62 
63  void onAcceptClicked( wxCommandEvent& aEvent );
64 
65 
67 
68  unsigned m_selected_index;
69 
70  std::vector<BUS_MIGRATION_STATUS> m_items;
71 };
72 
73 #endif
void onItemSelected(wxListEvent &aEvent)
std::vector< BUS_MIGRATION_STATUS > m_items
SCH_EDIT_FRAME * m_frame
Schematic editor (Eeschema) main window.
std::vector< wxString > labels
A subgraph is a set of items that are electrically connected on a single sheet.
std::vector< wxString > getProposedLabels(const std::vector< wxString > &aLabelList)
void onAcceptClicked(wxCommandEvent &aEvent)
DIALOG_MIGRATE_BUSES(SCH_EDIT_FRAME *aParent)
Migrates buses using legacy multi-label joining behavior.
std::vector< wxString > possible_labels
Class DIALOG_MIGRATE_BUSES_BASE.
const CONNECTION_SUBGRAPH * subgraph